From 22de8b10b2e5b6729342101d3cab4307af5ca10e Mon Sep 17 00:00:00 2001
From: cb-alish
Date: Fri, 12 Jun 2026 15:09:06 +0530
Subject: [PATCH] Updating Open API Specs Jun 12th, 2026
---
spec/chargebee_api_v1_spec.json | 339 +-
spec/chargebee_api_v1_spec.yaml | 424 +-
spec/chargebee_api_v2_pc_v1_spec.json | 849 ++--
spec/chargebee_api_v2_pc_v1_spec.yaml | 772 +--
spec/chargebee_api_v2_pc_v2_spec.json | 5912 ++++++++++++++++-------
spec/chargebee_api_v2_pc_v2_spec.yaml | 6313 ++++++++++++++++++-------
spec/chargebee_sdk_spec.json | 2988 +++++++++++-
spec/chargebee_sdk_spec.yaml | 2583 +++++++++-
8 files changed, 15159 insertions(+), 5021 deletions(-)
diff --git a/spec/chargebee_api_v1_spec.json b/spec/chargebee_api_v1_spec.json
index f1aaa1a2..782471c0 100644
--- a/spec/chargebee_api_v1_spec.json
+++ b/spec/chargebee_api_v1_spec.json
@@ -7,10 +7,10 @@
"url" : "https://www.chargebee.com",
"email" : "support@chargebee.com"
},
- "version" : "2026-06-08.8b15a3575b64635c16a22ad29253d68a470d2304",
+ "version" : "2026-06-12.a49b34edd262e3e190bd6d8616ff9e401c37bd21",
"x-cb-api-version" : 1,
"x-cb-product-catalog-version" : 1,
- "x-generated-on" : 1780886209338
+ "x-generated-on" : 1781239677988
},
"servers" : [ {
"url" : "{protocol}://{site}.{environment}:{port}/api/v1",
@@ -19114,330 +19114,6 @@
} ]
}
},
- "/hosted_pages/update_payment_method" : {
- "post" : {
- "summary" : "Update Payment Method",
- "description" : "Using this API, you can request your customers to update their payment method details or change their payment method. This is used in scenarios like customers updating their payment methods before the end of trial or customers switching among payment methods.\n\nWhen this API is invoked, it returns a hosted page URL. When the customers are directed to this URL, they will be able to change/update their payment methods.\n\nDepending on the payment methods (Card, PayPal Express Checkout, Amazon Payments) that you offer your customers, they will find options to switch among the various methods of payment.\n**Note:**\n\n* If the card\\[gateway\\] parameter is passed, and the customer chooses Card as a payment method, then the card details are stored in the gateway which is passed. However, if the card\\[gateway\\] parameter is passed and the customer chooses PayPal Express Checkout/Amazon Payments as a payment method, the gateway passed will be ignored.\n* The option of embedding into an iframe is not supported for PayPal Express Checkout and Amazon Payments as customers are redirected to the respective website pages. Hence if you have PayPal Express Checkout/Amazon Payments configured and pass the parameter embed=true, this will result in an unsuccessful API request. Also, if you have all the three payment methods (Card, Paypal Express Checkout and Amazon Payments) configured and pass the parameter embed=true, the returned hosted page URL will show only Card Payment as a payment method.\n",
- "operationId" : "update_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-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
- }
- } ],
- "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.\nAlthough the customer will be redirected to the redirect_url\nafter successful checkout,\nwe do not recommend relying on it for completing critical post-checkout actions.\nThis is because redirection may not happen due to unforeseen reasons.\nChargebee recommends listening to appropriate webhooks such as subscription_created
\nor invoice_generated\nto verify a successful checkout.
\nNote\n: - Redirect URL configured in Settings > Hosted Pages Settings would be overriden by this redirect URL.\nEg : http://yoursite.com?id=&state=succeeded
\n\n- This parameter is not applicable for iframe messaging.
\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" : "You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page.\n",
- "maxLength" : 2048,
- "example" : null
- },
- "embed" : {
- "type" : "boolean",
- "default" : true,
- "deprecated" : false,
- "description" : "If true then hosted page formatted to be shown in iframe. If false, it is formatted to be shown as a separate page.\n\n**Note**\n: For [in-app](https://www.chargebee.com/docs/checkout-v3.html)\ncheckout, default is false.\n",
- "example" : null
- },
- "iframe_messaging" : {
- "type" : "boolean",
- "default" : false,
- "deprecated" : false,
- "description" : "If true then iframe will communicate with the parent window. Applicable only for embedded(iframe) hosted pages. If you're using iframe_messaging you need to implement onSuccess \\& onCancel callbacks.\n\n**Note**\n: This parameter is not applicable for [in-app](https://www.chargebee.com/docs/checkout-v3.html)\ncheckout.\n",
- "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" : {
- "type" : "string",
- "deprecated" : false,
- "description" : "Name of the gateway this payment source is stored with.\n\\* sage_pay -\n\nSage Pay is a payment gateway.\n\\* wirecard -\n\nWireCard Account is a payment service provider.\n\\* balanced_payments -\n\nBalanced is a payment gateway\n\\* elavon -\n\nElavon Virtual Merchant is a payment solution.\n\\* migs -\n\nMasterCard Internet Gateway Service payment gateway.\n\\* paymill -\n\nPAYMILL is a payment gateway.\n\\* first_data_global -\n\nFirst Data Global Gateway Virtual Terminal Account\n\\* ogone -\n\nIngenico ePayments (formerly known as Ogone) is a payment gateway.\n\\* eway_rapid -\n\neWAY Rapid is a payment gateway.\n\\* chargebee -\n\nChargebee test gateway.\n\\* beanstream -\n\nBambora(formerly known as Beanstream) is a payment gateway.\n\\* braintree -\n\nBraintree is a payment gateway.\n\\* tco -\n\n2Checkout is a payment gateway.\n\\* bluepay -\n\nBluePay is a payment gateway.\n\\* paypal_payflow_pro -\n\nPayPal Payflow Pro is a payment gateway.\n\\* eway -\n\neWAY Account is a payment gateway.\n\\* pin -\n\nPin is a payment gateway\n\\* paypal_pro -\n\nPayPal Pro Account is a payment gateway.\n\\* authorize_net -\n\nAuthorize.net is a payment gateway\n\\* stripe -\n\nStripe is a payment gateway.\n\\* worldpay -\n\nWorldPay is a payment gateway\n\\* nmi -\n\nNMI is a payment gateway.\n\\* hdfc -\n\nHDFC Account is a payment gateway.\n",
- "enum" : [ "chargebee", "stripe", "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" ],
- "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/checkout_new" : {
"post" : {
"summary" : "Checkout new subscription",
@@ -34218,8 +33894,8 @@
"type" : {
"type" : "string",
"deprecated" : false,
- "description" : "Type of the requested hosted page.\n\\* checkout_onetime_addons -\n\nCheckout One time Addons\n\\* update_payment_method - \\* checkout_new -\n\nCheckout new Subscription\n\\* update_card -\n\nUpdate Card for a Customer\n\\* checkout_one_time -\n\nCheckout one time\n\\* checkout_onetime_charge -\n\nCheckout One time Charge\n\\* checkout_existing -\n\nCheckout existing Subscription\n",
- "enum" : [ "checkout_new", "checkout_existing", "update_card", "checkout_onetime_charge", "checkout_onetime_addons", "update_payment_method", "checkout_one_time" ],
+ "description" : "Type of the requested hosted page.\n\\* checkout_onetime_addons -\n\nCheckout One time Addons\n\\* checkout_new -\n\nCheckout new Subscription\n\\* update_card -\n\nUpdate Card for a Customer\n\\* checkout_one_time -\n\nCheckout one time\n\\* checkout_onetime_charge -\n\nCheckout One time Charge\n\\* checkout_existing -\n\nCheckout existing Subscription\n",
+ "enum" : [ "checkout_new", "checkout_existing", "update_card", "checkout_onetime_charge", "checkout_onetime_addons", "checkout_one_time" ],
"example" : null
},
"url" : {
@@ -34265,6 +33941,13 @@
"description" : "Indicates when this hosted page url will expire. After this, the hosted page cannot be accessed.\n",
"example" : null
},
+ "layout" : {
+ "type" : "string",
+ "deprecated" : false,
+ "description" : "Specifies the UI layout for the hosted page. The value is always in_app for this API version.
\nApplicable only when type is checkout_new or checkout_existing.
\n* in_app - The hosted page is rendered in the in-app layout.
\n* full_page - Not supported for this API version. Upgrade to the latest API version to use this layout.
",
+ "enum" : [ "in_app", "full_page" ],
+ "example" : null
+ },
"content" : {
"type" : "object",
"additionalProperties" : true,
diff --git a/spec/chargebee_api_v1_spec.yaml b/spec/chargebee_api_v1_spec.yaml
index 3f5b3d04..95654df3 100644
--- a/spec/chargebee_api_v1_spec.yaml
+++ b/spec/chargebee_api_v1_spec.yaml
@@ -5,10 +5,10 @@ info:
name: Chargebee Support
url: https://www.chargebee.com
email: support@chargebee.com
- version: 2026-06-08.8b15a3575b64635c16a22ad29253d68a470d2304
+ version: 2026-06-12.a49b34edd262e3e190bd6d8616ff9e401c37bd21
x-cb-api-version: 1
x-cb-product-catalog-version: 1
- x-generated-on: 1780886209338
+ x-generated-on: 1781239677988
servers:
- url: "{protocol}://{site}.{environment}:{port}/api/v1"
variables:
@@ -18034,411 +18034,6 @@ paths:
deprecated: false
security:
- BasicAuth: []
- /hosted_pages/update_payment_method:
- post:
- summary: Update Payment Method
- description: |
- Using this API, you can request your customers to update their payment method details or change their payment method. This is used in scenarios like customers updating their payment methods before the end of trial or customers switching among payment methods.
-
- When this API is invoked, it returns a hosted page URL. When the customers are directed to this URL, they will be able to change/update their payment methods.
-
- Depending on the payment methods (Card, PayPal Express Checkout, Amazon Payments) that you offer your customers, they will find options to switch among the various methods of payment.
- **Note:**
-
- * If the card\[gateway\] parameter is passed, and the customer chooses Card as a payment method, then the card details are stored in the gateway which is passed. However, if the card\[gateway\] parameter is passed and the customer chooses PayPal Express Checkout/Amazon Payments as a payment method, the gateway passed will be ignored.
- * The option of embedding into an iframe is not supported for PayPal Express Checkout and Amazon Payments as customers are redirected to the respective website pages. Hence if you have PayPal Express Checkout/Amazon Payments configured and pass the parameter embed=true, this will result in an unsuccessful API request. Also, if you have all the three payment methods (Card, Paypal Express Checkout and Amazon Payments) configured and pass the parameter embed=true, the returned hosted page URL will show only Card Payment as a payment method.
- operationId: update_payment_method
- parameters:
- - name: chargebee-request-origin-device
- in: header
- description: |
- The device from which the customer has made the request
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-device"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- The device from which the customer has made the request
- example: Android
- - name: chargebee-request-origin-user
- in: header
- description: |
- The email address of your customer/user. Use this when the email address has only ASCII characters.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user"
- style: simple
- explode: 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
- - name: chargebee-request-origin-user-encoded
- in: header
- description: |
- The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
- style: simple
- explode: false
- schema:
- type: string
- format: email
- description: |
- The Base64-encoded email address of your customer/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
- - name: chargebee-request-origin-ip
- in: header
- description: |
- The IP address of the customer where the request originated
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-ip"
- 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})))?::)))))$"
- - name: chargebee-event-actions
- in: header
- description: |
- skip all actions to be done on the events
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-actions"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip all actions to be done on the events
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-email
- in: header
- description: |
- skip only emails
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-email"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only emails
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-webhook
- in: header
- description: |
- skip only webhooks
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-webhook"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only webhooks
- enum:
- - all-disabled
- 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.
- Although the customer will be redirected to the redirect_url
- after successful checkout,
- we do not recommend relying on it for completing critical post-checkout actions.
- This is because redirection may not happen due to unforeseen reasons.
- Chargebee recommends listening to appropriate webhooks such as subscription_created
- or invoice_generated
- to verify a successful checkout.
- Note
- : - Redirect URL configured in Settings > Hosted Pages Settings would be overriden by this redirect URL.
- Eg : http://yoursite.com?id=&state=succeeded
-
- - This parameter is not applicable for iframe messaging.
-
- 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.
-
- **Note**
- : - Cancel URL configured in Settings \> Hosted Pages Settings would be overriden by this cancel URL.
- *Eg : http://yoursite.com?id=\&state=cancelled*
-
- * This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.
- maxLength: 250
- example: null
- pass_thru_content:
- type: string
- deprecated: false
- description: |
- You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page.
- maxLength: 2048
- example: null
- embed:
- type: boolean
- default: true
- deprecated: false
- description: |
- If true then hosted page formatted to be shown in iframe. If false, it is formatted to be shown as a separate page.
-
- **Note**
- : For [in-app](https://www.chargebee.com/docs/checkout-v3.html)
- checkout, default is false.
- example: null
- iframe_messaging:
- type: boolean
- default: false
- deprecated: false
- description: |
- If true then iframe will communicate with the parent window. Applicable only for embedded(iframe) hosted pages. If you're using iframe_messaging you need to implement onSuccess \& onCancel callbacks.
-
- **Note**
- : This parameter is not applicable for [in-app](https://www.chargebee.com/docs/checkout-v3.html)
- checkout.
- example: null
- customer:
- type: object
- deprecated: false
- description: |
- Parameters for customer
- properties:
- id:
- type: string
- deprecated: false
- description: |
- Identifier of the customer.
- maxLength: 50
- example: null
- required:
- - id
- example: null
- card:
- type: object
- deprecated: false
- description: |
- Parameters for card
- properties:
- gateway:
- type: string
- deprecated: false
- description: |
- Name of the gateway this payment source is stored with.
- \* sage_pay -
-
- Sage Pay is a payment gateway.
- \* wirecard -
-
- WireCard Account is a payment service provider.
- \* balanced_payments -
-
- Balanced is a payment gateway
- \* elavon -
-
- Elavon Virtual Merchant is a payment solution.
- \* migs -
-
- MasterCard Internet Gateway Service payment gateway.
- \* paymill -
-
- PAYMILL is a payment gateway.
- \* first_data_global -
-
- First Data Global Gateway Virtual Terminal Account
- \* ogone -
-
- Ingenico ePayments (formerly known as Ogone) is a payment gateway.
- \* eway_rapid -
-
- eWAY Rapid is a payment gateway.
- \* chargebee -
-
- Chargebee test gateway.
- \* beanstream -
-
- Bambora(formerly known as Beanstream) is a payment gateway.
- \* braintree -
-
- Braintree is a payment gateway.
- \* tco -
-
- 2Checkout is a payment gateway.
- \* bluepay -
-
- BluePay is a payment gateway.
- \* paypal_payflow_pro -
-
- PayPal Payflow Pro is a payment gateway.
- \* eway -
-
- eWAY Account is a payment gateway.
- \* pin -
-
- Pin is a payment gateway
- \* paypal_pro -
-
- PayPal Pro Account is a payment gateway.
- \* authorize_net -
-
- Authorize.net is a payment gateway
- \* stripe -
-
- Stripe is a payment gateway.
- \* worldpay -
-
- WorldPay is a payment gateway
- \* nmi -
-
- NMI is a payment gateway.
- \* hdfc -
-
- HDFC Account is a payment gateway.
- enum:
- - chargebee
- - stripe
- - 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
- 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/checkout_new:
post:
summary: Checkout new subscription
@@ -33761,7 +33356,7 @@ components:
\* checkout_onetime_addons -
Checkout One time Addons
- \* update_payment_method - \* checkout_new -
+ \* checkout_new -
Checkout new Subscription
\* update_card -
@@ -33782,7 +33377,6 @@ components:
- update_card
- checkout_onetime_charge
- checkout_onetime_addons
- - update_payment_method
- checkout_one_time
example: null
url:
@@ -33848,6 +33442,18 @@ components:
description: |
Indicates when this hosted page url will expire. After this, the hosted page cannot be accessed.
example: null
+ layout:
+ type: string
+ deprecated: false
+ description: |-
+ Specifies the UI layout for the hosted page. The value is always in_app for this API version.
+ Applicable only when type is checkout_new or checkout_existing.
+ * in_app - The hosted page is rendered in the in-app layout.
+ * full_page - Not supported for this API version. Upgrade to the latest API version to use this layout.
+ enum:
+ - in_app
+ - full_page
+ example: null
content:
type: object
additionalProperties: true
diff --git a/spec/chargebee_api_v2_pc_v1_spec.json b/spec/chargebee_api_v2_pc_v1_spec.json
index eaf0e67e..fcfe8627 100644
--- a/spec/chargebee_api_v2_pc_v1_spec.json
+++ b/spec/chargebee_api_v2_pc_v1_spec.json
@@ -7,10 +7,10 @@
"url" : "https://www.chargebee.com",
"email" : "support@chargebee.com"
},
- "version" : "2026-06-08.8b15a3575b64635c16a22ad29253d68a470d2304",
+ "version" : "2026-06-12.a49b34edd262e3e190bd6d8616ff9e401c37bd21",
"x-cb-api-version" : 2,
"x-cb-product-catalog-version" : 1,
- "x-generated-on" : 1780886217001
+ "x-generated-on" : 1781239687838
},
"servers" : [ {
"url" : "{protocol}://{site}.{environment}:{port}/api/v2",
@@ -64448,330 +64448,6 @@
} ]
}
},
- "/hosted_pages/update_payment_method" : {
- "post" : {
- "summary" : "Update Payment Method",
- "description" : "**Note:** If you're using [In-App Checkout](https://www.chargebee.com/docs/2.0/checkout.html) , use [Manage Payment Sources API](/docs/api/hosted_pages/manage-payment-sources) to request your customers to update their payment method details or change their payment method.\n\nUsing this API, you can request your customers to update their payment method details or change their payment method. This is used in scenarios like customers updating their payment methods before the end of trial or customers switching among payment methods.\n\nWhen this API is invoked, it returns a hosted page URL. When the customers are directed to this URL, they will be able to change/update their payment methods.\n\nDepending on the payment methods (Card, PayPal Express Checkout, Amazon Payments) that you offer your customers, they will find options to switch among the various methods of payment.\n**Note:**\n\n* If the card\\[gateway\\] parameter is passed, and the customer chooses Card as a payment method, then the card details are stored in the gateway which is passed. However, if the card\\[gateway\\] parameter is passed and the customer chooses PayPal Express Checkout/Amazon Payments as a payment method, the gateway passed will be ignored.\n* The option of embedding into an iframe is not supported for PayPal Express Checkout and Amazon Payments as customers are redirected to the respective website pages. Hence if you have PayPal Express Checkout/Amazon Payments configured and pass the parameter embed=true, this will result in an unsuccessful API request. Also, if you have all the three payment methods (Card, Paypal Express Checkout and Amazon Payments) configured and pass the parameter embed=true, the returned hosted page URL will show only Card Payment as a payment method.\n",
- "operationId" : "update_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-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
- }
- } ],
- "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.\nAlthough the customer will be redirected to the redirect_url\nafter successful checkout,\nwe do not recommend relying on it for completing critical post-checkout actions.\nThis is because redirection may not happen due to unforeseen reasons.\nChargebee recommends listening to appropriate webhooks such as subscription_created
\nor invoice_generated\nto verify a successful checkout.
\nNote\n: - Redirect URL configured in Settings > Hosted Pages Settings would be overriden by this redirect URL.\nEg : http://yoursite.com?id=&state=succeeded
\n\n- This parameter is not applicable for iframe messaging.
\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 session, 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
- },
- "embed" : {
- "type" : "boolean",
- "default" : true,
- "deprecated" : false,
- "description" : "If true then hosted page formatted to be shown in iframe. If false, it is formatted to be shown as a separate page.\n\n**Note**\n: For [in-app](https://www.chargebee.com/docs/checkout-v3.html)\ncheckout, default is false.\n",
- "example" : null
- },
- "iframe_messaging" : {
- "type" : "boolean",
- "default" : false,
- "deprecated" : false,
- "description" : "If true then iframe will communicate with the parent window. Applicable only for embedded(iframe) hosted pages. If you're using iframe_messaging you need to implement onSuccess \\& onCancel callbacks.\n\n**Note**\n: This parameter is not applicable for [in-app](https://www.chargebee.com/docs/checkout-v3.html)\ncheckout.\n",
- "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/extend_subscription" : {
"post" : {
"summary" : "Extend Subscription",
@@ -65480,27 +65156,27 @@
"properties" : {
"is" : {
"type" : "string",
- "description" : "\\* \\`checkout_new\\` - Checkout new Subscription \\* \\`checkout_existing\\` - Checkout existing Subscription \\* \\`update_card\\` - \\*\\*(Deprecated)\\*\\* Update Card for a Customer \\* \\`update_payment_method\\` - Update Payment Method for a Customer \\* \\`manage_payment_sources\\` - Manage Payments for a customer \\* \\`collect_now\\` - Collect Unpaid Invoices for a Customer \\* \\`extend_subscription\\` - To extend a Subscription period \\* \\`checkout_gift\\` - Checkout a gift subscription \\* \\`claim_gift\\` - Claim a gift subscription \\* \\`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", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_gift", "claim_gift", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "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_gift\\` - Checkout a gift subscription \\* \\`claim_gift\\` - Claim a gift subscription \\* \\`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_gift", "claim_gift", "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\\` - 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_gift\\` - Checkout a gift subscription \\* \\`claim_gift\\` - Claim a gift subscription \\* \\`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", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_gift", "claim_gift", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "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_gift\\` - Checkout a gift subscription \\* \\`claim_gift\\` - Claim a gift subscription \\* \\`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_gift", "claim_gift", "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\\` - 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_gift\\` - Checkout a gift subscription \\* \\`claim_gift\\` - Claim a gift subscription \\* \\`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", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_gift", "claim_gift", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "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_gift\\` - Checkout a gift subscription \\* \\`claim_gift\\` - Claim a gift subscription \\* \\`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_gift", "claim_gift", "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_gift|claim_gift|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_gift|claim_gift|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\\` - 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_gift\\` - Checkout a gift subscription \\* \\`claim_gift\\` - Claim a gift subscription \\* \\`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", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_gift", "claim_gift", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "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_gift\\` - Checkout a gift subscription \\* \\`claim_gift\\` - Claim a gift subscription \\* \\`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_gift", "claim_gift", "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_gift|claim_gift|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_gift|claim_gift|checkout_one_time|pre_cancel|view_voucher|accept_quote))*\\]$",
"example" : null
}
@@ -127442,6 +127118,418 @@
"BasicAuth" : [ ]
} ]
}
+ },
+ "/grant_blocks" : {
+ "get" : {
+ "summary" : "List Grant Blocks",
+ "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}(?:(?: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" : "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" : "subscription_id",
+ "in" : "query",
+ "required" : true,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "description" : "Subscription id.\n",
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
+ }
+ },
+ "example" : null
+ }
+ }, {
+ "name" : "unit_id",
+ "in" : "query",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "description" : "Unit id.\n",
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
+ }
+ },
+ "example" : null
+ }
+ }, {
+ "name" : "effective_from",
+ "in" : "query",
+ "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",
+ "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",
+ "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",
+ "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" : [ ]
+ } ]
+ }
}
},
"components" : {
@@ -131362,6 +131450,17 @@
"minimum" : -50000,
"example" : null
},
+ "notes" : {
+ "type" : "array",
+ "deprecated" : false,
+ "items" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 3500,
+ "example" : null
+ },
+ "example" : null
+ },
"deleted" : {
"type" : "boolean",
"deprecated" : false,
@@ -140307,15 +140406,13 @@
"id" : {
"type" : "string",
"deprecated" : false,
- "maxLength" : 40,
+ "maxLength" : 50,
"example" : null
},
"granted_amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "maxLength" : 36,
"example" : null
},
"effective_from" : {
@@ -140331,51 +140428,39 @@
"example" : null
},
"balance" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "maxLength" : 36,
"example" : null
},
"hold_amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "maxLength" : 36,
"example" : null
},
"used_amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "maxLength" : 36,
"example" : null
},
"expired_amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "maxLength" : 36,
"example" : null
},
"rolled_over_amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "maxLength" : 36,
"example" : null
},
"voided_amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "maxLength" : 36,
"example" : null
},
"origin_grant_block_id" : {
@@ -140412,19 +140497,19 @@
"account_type" : {
"type" : "string",
"deprecated" : false,
- "maxLength" : 50,
+ "enum" : [ "provisioned", "overdraft" ],
"example" : null
},
"unit_id" : {
"type" : "string",
"deprecated" : false,
- "maxLength" : 100,
+ "maxLength" : 50,
"example" : null
},
"unit_type" : {
"type" : "string",
"deprecated" : false,
- "maxLength" : 50,
+ "enum" : [ "credit_unit" ],
"example" : null
}
},
@@ -140611,8 +140696,8 @@
"type" : {
"type" : "string",
"deprecated" : false,
- "description" : "Type of the requested hosted page.\n\\* accept_quote - \\* collect_now -\n\nCollect Unpaid Invoices for a Customer\n\\* checkout_gift -\n\nCheckout a gift subscription\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\\* update_payment_method - \\* 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\\* claim_gift -\n\nClaim a gift subscription\n",
- "enum" : [ "checkout_new", "checkout_existing", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_gift", "claim_gift", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "description" : "Type of the requested hosted page.\n\\* accept_quote - \\* collect_now -\n\nCollect Unpaid Invoices for a Customer\n\\* checkout_gift -\n\nCheckout a gift subscription\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\\* claim_gift -\n\nClaim a gift subscription\n",
+ "enum" : [ "checkout_new", "checkout_existing", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_gift", "claim_gift", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
"example" : null
},
"url" : {
@@ -140658,6 +140743,13 @@
"description" : "The date and time when the hosted page URL expires. After this timestamp, the page can no longer be accessed.\nThe expiration period depends on the type of hosted page:
\n\n- For
checkout_new, checkout_existing, and checkout_one_time, the URL expires 3 hours after the page is created. \n- For
collect_now and manage_payment_sources, the URL expires 5 days after creation. \n
",
"example" : null
},
+ "layout" : {
+ "type" : "string",
+ "deprecated" : false,
+ "description" : "Specifies the UI layout for the hosted page. The value is always in_app for this API version.
\nApplicable only when type is checkout_new, checkout_existing, checkout_one_time, manage_payment_sources, checkout_gift, or claim_gift.
\n* in_app - The hosted page is rendered in the in-app layout.
\n* full_page - Not supported for this API version. Upgrade to the latest API version to use this layout.
",
+ "enum" : [ "in_app", "full_page" ],
+ "example" : null
+ },
"content" : {
"type" : "object",
"additionalProperties" : true,
@@ -149425,6 +149517,12 @@
"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,
@@ -149445,9 +149543,15 @@
"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" ],
+ "required" : [ "id", "site_id" ],
"example" : null
},
"PortalSession" : {
@@ -153338,6 +153442,13 @@
"enum" : [ "admin_console", "api", "bulk_operation", "scheduled_job", "hosted_page", "portal", "system", "none", "js_api", "migration", "external_service" ],
"example" : null
},
+ "Status" : {
+ "type" : "string",
+ "default" : "available",
+ "deprecated" : false,
+ "enum" : [ "available", "exhausted", "scheduled", "in_grace_period" ],
+ "example" : null
+ },
"Subscription" : {
"type" : "object",
"additionalProperties" : true,
diff --git a/spec/chargebee_api_v2_pc_v1_spec.yaml b/spec/chargebee_api_v2_pc_v1_spec.yaml
index 03cbd726..7dcdd260 100644
--- a/spec/chargebee_api_v2_pc_v1_spec.yaml
+++ b/spec/chargebee_api_v2_pc_v1_spec.yaml
@@ -5,10 +5,10 @@ info:
name: Chargebee Support
url: https://www.chargebee.com
email: support@chargebee.com
- version: 2026-06-08.8b15a3575b64635c16a22ad29253d68a470d2304
+ version: 2026-06-12.a49b34edd262e3e190bd6d8616ff9e401c37bd21
x-cb-api-version: 2
x-cb-product-catalog-version: 1
- x-generated-on: 1780886217001
+ x-generated-on: 1781239687838
servers:
- url: "{protocol}://{site}.{environment}:{port}/api/v2"
variables:
@@ -69891,322 +69891,6 @@ paths:
deprecated: false
security:
- BasicAuth: []
- /hosted_pages/update_payment_method:
- post:
- summary: Update Payment Method
- description: |
- **Note:** If you're using [In-App Checkout](https://www.chargebee.com/docs/2.0/checkout.html) , use [Manage Payment Sources API](/docs/api/hosted_pages/manage-payment-sources) to request your customers to update their payment method details or change their payment method.
-
- Using this API, you can request your customers to update their payment method details or change their payment method. This is used in scenarios like customers updating their payment methods before the end of trial or customers switching among payment methods.
-
- When this API is invoked, it returns a hosted page URL. When the customers are directed to this URL, they will be able to change/update their payment methods.
-
- Depending on the payment methods (Card, PayPal Express Checkout, Amazon Payments) that you offer your customers, they will find options to switch among the various methods of payment.
- **Note:**
-
- * If the card\[gateway\] parameter is passed, and the customer chooses Card as a payment method, then the card details are stored in the gateway which is passed. However, if the card\[gateway\] parameter is passed and the customer chooses PayPal Express Checkout/Amazon Payments as a payment method, the gateway passed will be ignored.
- * The option of embedding into an iframe is not supported for PayPal Express Checkout and Amazon Payments as customers are redirected to the respective website pages. Hence if you have PayPal Express Checkout/Amazon Payments configured and pass the parameter embed=true, this will result in an unsuccessful API request. Also, if you have all the three payment methods (Card, Paypal Express Checkout and Amazon Payments) configured and pass the parameter embed=true, the returned hosted page URL will show only Card Payment as a payment method.
- operationId: update_payment_method
- parameters:
- - name: chargebee-request-origin-device
- in: header
- description: |
- The device from which the customer has made the request
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-device"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- The device from which the customer has made the request
- example: Android
- - name: chargebee-request-origin-user
- in: header
- description: |
- The email address of your customer/user. Use this when the email address has only ASCII characters.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user"
- style: simple
- explode: 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
- - name: chargebee-request-origin-user-encoded
- in: header
- description: |
- The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
- style: simple
- explode: false
- schema:
- type: string
- format: email
- description: |
- The Base64-encoded email address of your customer/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
- - name: chargebee-request-origin-ip
- in: header
- description: |
- The IP address of the customer where the request originated
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-ip"
- 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})))?::)))))$"
- - name: chargebee-event-actions
- in: header
- description: |
- skip all actions to be done on the events
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-actions"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip all actions to be done on the events
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-email
- in: header
- description: |
- skip only emails
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-email"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only emails
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-webhook
- in: header
- description: |
- skip only webhooks
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-webhook"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only webhooks
- enum:
- - all-disabled
- 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.
- Although the customer will be redirected to the redirect_url
- after successful checkout,
- we do not recommend relying on it for completing critical post-checkout actions.
- This is because redirection may not happen due to unforeseen reasons.
- Chargebee recommends listening to appropriate webhooks such as subscription_created
- or invoice_generated
- to verify a successful checkout.
- Note
- : - Redirect URL configured in Settings > Hosted Pages Settings would be overriden by this redirect URL.
- Eg : http://yoursite.com?id=&state=succeeded
-
- - This parameter is not applicable for iframe messaging.
-
- 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.
-
- **Note**
- : - Cancel URL configured in Settings \> Hosted Pages Settings would be overriden by this cancel URL.
- *Eg : http://yoursite.com?id=\&state=cancelled*
-
- * This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.
- 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.
- For example, you can store the ID of the marketing campaign that initiated the user session. After a successful session, 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
- embed:
- type: boolean
- default: true
- deprecated: false
- description: |
- If true then hosted page formatted to be shown in iframe. If false, it is formatted to be shown as a separate page.
-
- **Note**
- : For [in-app](https://www.chargebee.com/docs/checkout-v3.html)
- checkout, default is false.
- example: null
- iframe_messaging:
- type: boolean
- default: false
- deprecated: false
- description: |
- If true then iframe will communicate with the parent window. Applicable only for embedded(iframe) hosted pages. If you're using iframe_messaging you need to implement onSuccess \& onCancel callbacks.
-
- **Note**
- : This parameter is not applicable for [in-app](https://www.chargebee.com/docs/checkout-v3.html)
- checkout.
- example: null
- customer:
- type: object
- deprecated: false
- description: |
- Parameters for customer
- properties:
- id:
- type: string
- deprecated: false
- description: |
- Identifier of the customer.
- maxLength: 50
- example: null
- required:
- - id
- example: null
- card:
- type: object
- deprecated: false
- description: |
- Parameters for card
- properties:
- gateway_account_id:
- type: string
- deprecated: false
- description: |
- The gateway account in which this payment source is stored.
- 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/extend_subscription:
post:
summary: Extend Subscription
@@ -70864,11 +70548,10 @@ paths:
is:
type: string
description: |
- \* \`checkout_new\` - Checkout new Subscription \* \`checkout_existing\` - Checkout existing Subscription \* \`update_card\` - \*\*(Deprecated)\*\* Update Card for a Customer \* \`update_payment_method\` - Update Payment Method for a Customer \* \`manage_payment_sources\` - Manage Payments for a customer \* \`collect_now\` - Collect Unpaid Invoices for a Customer \* \`extend_subscription\` - To extend a Subscription period \* \`checkout_gift\` - Checkout a gift subscription \* \`claim_gift\` - Claim a gift subscription \* \`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
+ \* \`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_gift\` - Checkout a gift subscription \* \`claim_gift\` - Claim a gift subscription \* \`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
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -70882,11 +70565,10 @@ paths:
is_not:
type: string
description: |
- \* \`checkout_new\` - Checkout new Subscription \* \`checkout_existing\` - Checkout existing Subscription \* \`update_card\` - \*\*(Deprecated)\*\* Update Card for a Customer \* \`update_payment_method\` - Update Payment Method for a Customer \* \`manage_payment_sources\` - Manage Payments for a customer \* \`collect_now\` - Collect Unpaid Invoices for a Customer \* \`extend_subscription\` - To extend a Subscription period \* \`checkout_gift\` - Checkout a gift subscription \* \`claim_gift\` - Claim a gift subscription \* \`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
+ \* \`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_gift\` - Checkout a gift subscription \* \`claim_gift\` - Claim a gift subscription \* \`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
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -70900,11 +70582,10 @@ paths:
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\` - 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_gift\` - Checkout a gift subscription \* \`claim_gift\` - Claim a gift subscription \* \`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
+ \* \`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_gift\` - Checkout a gift subscription \* \`claim_gift\` - Claim a gift subscription \* \`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
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -70920,11 +70601,10 @@ paths:
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\` - 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_gift\` - Checkout a gift subscription \* \`claim_gift\` - Claim a gift subscription \* \`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
+ \* \`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_gift\` - Checkout a gift subscription \* \`claim_gift\` - Claim a gift subscription \* \`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
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -135324,6 +135004,348 @@ paths:
deprecated: false
security:
- BasicAuth: []
+ /grant_blocks:
+ get:
+ summary: List Grant Blocks
+ operationId: list_grant_blocks
+ parameters:
+ - name: chargebee-request-origin-device
+ in: header
+ description: |
+ The device from which the customer has made the request
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - 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.
+ 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.
+ maxLength: 1000
+ example: null
+ - name: subscription_id
+ in: query
+ required: true
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ description: |
+ Subscription id.
+ properties:
+ is:
+ type: string
+ minLength: 1
+ example: null
+ example: null
+ - name: unit_id
+ in: query
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ description: |
+ Unit id.
+ properties:
+ is:
+ type: string
+ minLength: 1
+ example: null
+ example: null
+ - name: effective_from
+ in: query
+ 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
+ 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
+ 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
+ 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: []
components:
schemas:
"400":
@@ -140475,6 +140497,15 @@ components:
maximum: 50000
minimum: -50000
example: null
+ notes:
+ type: array
+ deprecated: false
+ items:
+ type: string
+ deprecated: false
+ maxLength: 3500
+ example: null
+ example: null
deleted:
type: boolean
deprecated: false
@@ -153023,14 +153054,12 @@ components:
id:
type: string
deprecated: false
- maxLength: 40
+ maxLength: 50
example: null
granted_amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ maxLength: 36
example: null
effective_from:
type: integer
@@ -153043,46 +153072,34 @@ components:
deprecated: false
example: null
balance:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ maxLength: 36
example: null
hold_amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ maxLength: 36
example: null
used_amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ maxLength: 36
example: null
expired_amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ maxLength: 36
example: null
rolled_over_amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ maxLength: 36
example: null
voided_amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ maxLength: 36
example: null
origin_grant_block_id:
type: string
@@ -153122,17 +153139,20 @@ components:
account_type:
type: string
deprecated: false
- maxLength: 50
+ enum:
+ - provisioned
+ - overdraft
example: null
unit_id:
type: string
deprecated: false
- maxLength: 100
+ maxLength: 50
example: null
unit_type:
type: string
deprecated: false
- maxLength: 50
+ enum:
+ - credit_unit
example: null
required:
- balance
@@ -153421,7 +153441,7 @@ components:
\* checkout_one_time -
Checkout one time
- \* update_payment_method - \* view_voucher -
+ \* view_voucher -
View Details of a voucher
\* pre_cancel -
@@ -153439,7 +153459,6 @@ components:
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -153523,6 +153542,18 @@ components:
For collect_now and manage_payment_sources, the URL expires 5 days after creation.
example: null
+ layout:
+ type: string
+ deprecated: false
+ description: |-
+ Specifies the UI layout for the hosted page. The value is always in_app for this API version.
+ Applicable only when type is checkout_new, checkout_existing, checkout_one_time, manage_payment_sources, checkout_gift, or claim_gift.
+ * in_app - The hosted page is rendered in the in-app layout.
+ * full_page - Not supported for this API version. Upgrade to the latest API version to use this layout.
+ enum:
+ - in_app
+ - full_page
+ example: null
content:
type: object
additionalProperties: true
@@ -165422,6 +165453,11 @@ components:
Represents a platform account in Chargebee.
Each 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
@@ -165443,8 +165479,14 @@ components:
Description of the partner associated with this platform account. Maximum length is 250 characters.
maxLength: 250
example: null
+ settings_json:
+ type: string
+ deprecated: false
+ maxLength: 65000
+ example: null
required:
- id
+ - site_id
example: null
PortalSession:
type: object
@@ -170320,6 +170362,16 @@ components:
- migration
- external_service
example: null
+ Status:
+ type: string
+ default: available
+ deprecated: false
+ enum:
+ - available
+ - exhausted
+ - scheduled
+ - in_grace_period
+ example: null
Subscription:
type: object
additionalProperties: true
diff --git a/spec/chargebee_api_v2_pc_v2_spec.json b/spec/chargebee_api_v2_pc_v2_spec.json
index e4d51dba..622cb404 100644
--- a/spec/chargebee_api_v2_pc_v2_spec.json
+++ b/spec/chargebee_api_v2_pc_v2_spec.json
@@ -7,10 +7,10 @@
"url" : "https://www.chargebee.com",
"email" : "support@chargebee.com"
},
- "version" : "2026-06-08.8b15a3575b64635c16a22ad29253d68a470d2304",
- "x-cb-api-version" : 2,
+ "version" : "2026-06-12.a49b34edd262e3e190bd6d8616ff9e401c37bd21",
"x-cb-product-catalog-version" : 2,
- "x-generated-on" : 1780886227524
+ "x-cb-api-version" : 2,
+ "x-generated-on" : 1781239700311
},
"servers" : [ {
"url" : "{protocol}://{site}.{environment}:{port}/api/v2",
@@ -45610,14 +45610,14 @@
"deprecated" : false,
"example" : "old_inv_001",
"properties" : {
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
},
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
}
}
@@ -45640,14 +45640,14 @@
"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" : {
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
},
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
}
}
@@ -65956,338 +65956,6 @@
} ]
}
},
- "/hosted_pages/update_payment_method" : {
- "post" : {
- "summary" : "Update Payment Method",
- "description" : "**Note:** If you're using [In-App Checkout](https://www.chargebee.com/docs/2.0/checkout.html) , use [Manage Payment Sources API](/docs/api/hosted_pages/manage-payment-sources) to request your customers to update their payment method details or change their payment method.\n\nUsing this API, you can request your customers to update their payment method details or change their payment method. This is used in scenarios like customers updating their payment methods before the end of trial or customers switching among payment methods.\n\nWhen this API is invoked, it returns a hosted page URL. When the customers are directed to this URL, they will be able to change/update their payment methods.\n\nDepending on the payment methods (Card, PayPal Express Checkout, Amazon Payments) that you offer your customers, they will find options to switch among the various methods of payment.\n**Note:**\n\n* If the card\\[gateway\\] parameter is passed, and the customer chooses Card as a payment method, then the card details are stored in the gateway which is passed. However, if the card\\[gateway\\] parameter is passed and the customer chooses PayPal Express Checkout/Amazon Payments as a payment method, the gateway passed will be ignored.\n* The option of embedding into an iframe is not supported for PayPal Express Checkout and Amazon Payments as customers are redirected to the respective website pages. Hence if you have PayPal Express Checkout/Amazon Payments configured and pass the parameter embed=true, this will result in an unsuccessful API request. Also, if you have all the three payment methods (Card, Paypal Express Checkout and Amazon Payments) configured and pass the parameter embed=true, the returned hosted page URL will show only Card Payment as a payment method.\n",
- "operationId" : "update_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-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" : {
- "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.
\nNote :
\n\n- Although the customer will be redirected to the
redirect_url after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as subscription_created or invoice_generated to verify a successful checkout. \n- Redirect URL configured in Settings > Hosted Pages Settings would be overriden by this redirect URL.
\n- Eg : http://yoursite.com?id=**&state=succeeded
\n- This parameter is not applicable for iframe messaging.
\n
",
- "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 session, 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
- },
- "iframe_messaging" : {
- "type" : "boolean",
- "default" : false,
- "deprecated" : false,
- "description" : "If true then iframe will communicate with the parent window. Applicable only for embedded(iframe) hosted pages. If you're using iframe_messaging you need to implement onSuccess \\& onCancel callbacks.\n\n**Note**\n: This parameter is not applicable for [in-app](https://www.chargebee.com/docs/checkout-v3.html)\ncheckout.\n",
- "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/extend_subscription" : {
"post" : {
"summary" : "Extend Subscription",
@@ -67527,27 +67195,27 @@
"properties" : {
"is" : {
"type" : "string",
- "description" : "\\* \\`checkout_new\\` - Checkout new Subscription \\* \\`checkout_existing\\` - Checkout existing Subscription \\* \\`update_card\\` - \\*\\*(Deprecated)\\*\\* Update Card for a Customer \\* \\`update_payment_method\\` - Update Payment Method for a Customer \\* \\`manage_payment_sources\\` - Manage Payments for a customer \\* \\`collect_now\\` - Collect Unpaid Invoices for a Customer \\* \\`extend_subscription\\` - To extend a Subscription period \\* \\`checkout_one_time\\` - Checkout one time \\* \\`pre_cancel\\` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription. \\* \\`view_voucher\\` - View Details of a voucher \\* \\`accept_quote\\` - Accept Quote\n",
- "enum" : [ "checkout_new", "checkout_existing", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "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\\` - 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", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "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\\` - 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", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "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\\` - 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", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "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
}
@@ -90259,14 +89927,14 @@
"deprecated" : false,
"example" : "day-pass-USD",
"properties" : {
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
},
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
}
}
@@ -104852,17 +104520,17 @@
"description" : "optional, string filter
\nThe unique ID of the\nbusiness entity\nof this item_family.\nLearn more\nabout all the scenarios before using this filter.
\n\nSupported operators :\nis, is_present
\nExample →\nbusiness_entity_id[is_present] = "true"
",
"example" : "business_entity_id",
"properties" : {
- "is" : {
- "type" : "string",
- "minLength" : 1,
- "example" : null
- },
"is_present" : {
"type" : "string",
"format" : "boolean",
"description" : "null\n",
"enum" : [ "true", "false" ],
"example" : null
+ },
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
}
}
},
@@ -106377,490 +106045,17 @@
"description" : "optional, string filter
\nThe unique ID of the\nbusiness entity\nof this price_variant.\nLearn more\nabout all the scenarios before using this filter.
\n\nSupported operators :\nis, is_present
\nExample →\nbusiness_entity_id[is_present] = "true"
",
"example" : "business_entity_id",
"properties" : {
- "is" : {
- "type" : "string",
- "minLength" : 1,
- "example" : null
- },
"is_present" : {
"type" : "string",
"format" : "boolean",
"description" : "null\n",
"enum" : [ "true", "false" ],
"example" : null
- }
- }
- },
- "include_site_level_resources" : {
- "type" : "object",
- "deprecated" : false,
- "description" : "optional, boolean filter
\nDefault value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false
\nSupported operators :\nis
\nExample →\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-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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" : "object",
- "deprecated" : false,
- "description" : "optional, string filter
\nThe unique ID of the\nbusiness entity\nof this item.\nLearn more\nabout all the scenarios before using this filter.
\n\nSupported operators :\nis, is_present
\nExample →\nbusiness_entity_id[is_present] = "true"
",
- "example" : "business_entity_id",
- "properties" : {
"is" : {
"type" : "string",
"minLength" : 1,
"example" : null
- },
- "is_present" : {
- "type" : "string",
- "format" : "boolean",
- "description" : "null\n",
- "enum" : [ "true", "false" ],
- "example" : null
}
}
},
@@ -106878,15 +106073,488 @@
},
"example" : null
},
- "item" : {
+ "price_variant" : {
"type" : "object",
"deprecated" : false,
- "description" : "Parameters for item\n",
+ "description" : "Parameters for price_variant\n",
"properties" : {
"id" : {
"type" : "object",
"deprecated" : false,
- "description" : "Filter items based on item id.\n",
+ "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-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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" : "object",
+ "deprecated" : false,
+ "description" : "optional, string filter
\nThe unique ID of the\nbusiness entity\nof this item.\nLearn more\nabout all the scenarios before using this filter.
\n\nSupported operators :\nis, is_present
\nExample →\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
\nDefault value is true . To exclude site-level resources in specific cases, set this parameter to false.\nPossible values are : true, false
\nSupported operators :\nis
\nExample →\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" : {
@@ -112365,14 +112033,14 @@
"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" : {
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
},
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
}
}
@@ -113927,17 +113595,17 @@
"description" : "optional, string filter
\nThe unique ID of the\nbusiness entity\nof this item_price.\nLearn more\nabout all the scenarios before using this filter.
\n\nSupported operators :\nis, is_present
\nExample →\nbusiness_entity_id[is_present] = "true"
",
"example" : "business_entity_id",
"properties" : {
- "is" : {
- "type" : "string",
- "minLength" : 1,
- "example" : null
- },
"is_present" : {
"type" : "string",
"format" : "boolean",
"description" : "null\n",
"enum" : [ "true", "false" ],
"example" : null
+ },
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
}
}
},
@@ -117467,16 +117135,16 @@
"deprecated" : false,
"example" : "business_entity_id",
"properties" : {
- "is" : {
- "type" : "string",
- "minLength" : 1,
- "example" : null
- },
"is_present" : {
"type" : "string",
"format" : "boolean",
"enum" : [ "true", "false" ],
"example" : null
+ },
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
}
}
}
@@ -122130,7 +121798,7 @@
"/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",
+ "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.
\nUse 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 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",
@@ -122685,16 +122353,16 @@
"deprecated" : false,
"example" : "business_entity_id",
"properties" : {
- "is" : {
- "type" : "string",
- "minLength" : 1,
- "example" : null
- },
"is_present" : {
"type" : "string",
"format" : "boolean",
"enum" : [ "true", "false" ],
"example" : null
+ },
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
}
}
}
@@ -125060,16 +124728,16 @@
"deprecated" : false,
"example" : "business_entity_id",
"properties" : {
- "is" : {
- "type" : "string",
- "minLength" : 1,
- "example" : null
- },
"is_present" : {
"type" : "string",
"format" : "boolean",
"enum" : [ "true", "false" ],
"example" : null
+ },
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
}
}
}
@@ -127969,7 +127637,7 @@
"/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",
+ "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.
\nUse 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 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",
@@ -128585,16 +128253,16 @@
"deprecated" : false,
"example" : "business_entity_id",
"properties" : {
- "is" : {
- "type" : "string",
- "minLength" : 1,
- "example" : null
- },
"is_present" : {
"type" : "string",
"format" : "boolean",
"enum" : [ "true", "false" ],
"example" : null
+ },
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
}
}
}
@@ -137947,14 +137615,14 @@
"deprecated" : false,
"example" : "user-licenses",
"properties" : {
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
},
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
}
}
@@ -137972,17 +137640,17 @@
"deprecated" : false,
"example" : "plan_price",
"properties" : {
- "is" : {
+ "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
},
- "in" : {
+ "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" ],
- "pattern" : "^\\[(plan|addon|charge|plan_price|addon_price)(,(plan|addon|charge|plan_price|addon_price))*\\]$",
"example" : null
}
}
@@ -138000,14 +137668,14 @@
"deprecated" : false,
"example" : "usd-professional-monthly",
"properties" : {
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
},
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
}
}
@@ -148030,17 +147698,17 @@
"deprecated" : false,
"example" : "SCHEDULED",
"properties" : {
- "is" : {
+ "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
},
- "in" : {
+ "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" ],
- "pattern" : "^\\[(scheduled|succeeded|failed|draft)(,(scheduled|succeeded|failed|draft))*\\]$",
"example" : null
}
}
@@ -148058,14 +147726,14 @@
"deprecated" : false,
"example" : "8gsnbYfsMLds",
"properties" : {
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
},
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
}
}
@@ -158225,13 +157893,13 @@
"deprecated" : false,
"example" : "1777556762",
"properties" : {
- "before" : {
+ "after" : {
"type" : "string",
"format" : "unix-time",
"pattern" : "^\\d{10}$",
"example" : null
},
- "after" : {
+ "before" : {
"type" : "string",
"format" : "unix-time",
"pattern" : "^\\d{10}$",
@@ -158252,13 +157920,13 @@
"deprecated" : false,
"example" : "1777556271",
"properties" : {
- "before" : {
+ "after" : {
"type" : "string",
"format" : "unix-time",
"pattern" : "^\\d{10}$",
"example" : null
},
- "after" : {
+ "before" : {
"type" : "string",
"format" : "unix-time",
"pattern" : "^\\d{10}$",
@@ -158266,6 +157934,29 @@
}
}
}
+ }, {
+ "name" : "sort_by",
+ "in" : "query",
+ "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",
@@ -163374,11 +163065,2334 @@
"example" : null
}
}, {
- "name" : "webhook-endpoint-id",
+ "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-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\-]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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" : "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.
\nNote\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", "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" ],
+ "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])?[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
+ }
+ } ],
+ "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,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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" : {
+ "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.
\nNote\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.
\nNote\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", "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" ],
+ "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:
\n- plotting daily, weekly, or monthly usage trends
\n- analyzing feature adoption over time
\n- comparing recent usage against earlier periods
\n- showing historical usage summaries to subscribers
\n
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
\n- If
window_size is omitted, the response returns a single aggregate for the full reporting range. \n- If
window_size is provided, the response returns one aggregated entry for each window in the reporting range. \n
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:
\ntimeframe_start is May 10 10:00:00 UTC \ntimeframe_end is June 10 10:00:00 UTC \nwindow_size is day \n
The response returns windows such as:
\nMay 10 10:00:00 UTC → May 11 10:00:00 UTC \nMay 11 10:00:00 UTC → May 12 10:00:00 UTC \n
and continues in the same pattern until the final window:
\nJune 9 10:00:00 UTC → June 10 10:00:00 UTC \n
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:
\naggregated_from is inclusive \naggregated_till is exclusive \n
In other words, each window is represented as aggregated_from and aggregated_till.
This means:
\n- an event with a timestamp exactly equal to
aggregated_from is included in that window \n- an event with a timestamp exactly equal to
aggregated_till is excluded from that window and counted in the next window, if one exists \n- an event with a timestamp exactly equal to
timeframe_end is excluded \n
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:
\n- one daily window on Jan 1
\n- another daily window on Jan 2
\n
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-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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" : "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.
\n- current usage to date
\n- included entitlement
\n- on-demand or overage usage, if any
\n- the current chargeable amount, when applicable
\n
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:
\n- Subscription current term: The overall billing term of the subscription, usually defined by the plan.
\n- Current usage period: The active period for which usage is currently accruing and has not yet been billed for a feature.
\n- Usage interval: A continuous segment within the current usage period where entitlement and pricing remain unchanged.
\n
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.pngResponse Behaviour
The API returns separate usage charge objects for each interval where entitlement remains stable.
\n- \n
First object - Initial Plan Period
\nCovers the storage feature from 1 Jan 00:00:00 to 16 Jan 08:59:59.
\nDuring this interval, total entitlement is 100 GB.
\n80 GB is consumed, so 20 GB remains and carries forward into the next interval.
\n \n- \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 \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:
\n- Group entries by
feature_id \n- Sort intervals by
usage_from \n- Do not assume one entry per feature
\n- Use
amount only when present \n- Treat the response as a snapshot of current unbilled usage
\n
",
+ "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])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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" : "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.
",
+ "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}(?:(?:[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" : "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
\nPagination 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\nFilter by [type](/docs/api/alerts/alert-object#type).\n\n**Example →**\n*type\\[is\\] = \"usage_exceeded\"*\n",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "description" : "\\* \\`usage_exceeded\\` - usage_exceeded\n",
+ "enum" : [ "usage_exceeded" ],
+ "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 Retrieve alert status.
",
+ "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]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\-]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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" : "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.
\nImpacts
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 only re-evaluated when new usage events are ingested for the associated metered feature.
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 only re-evaluated upon new usage event ingestion.
",
+ "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\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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" : "alert-id",
"in" : "path",
"required" : true,
"deprecated" : false,
- "$ref" : "#/components/parameters/webhook-endpoint-id",
+ "$ref" : "#/components/parameters/alert-id",
"style" : "simple",
"explode" : false,
"schema" : {
@@ -163386,6 +165400,54 @@
"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, regardless of usage.
",
+ "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.
\n* percentage - The threshold value represents a percentage of the plan quota (0–100).
\n* absolute - The threshold value represents an absolute usage quantity.
",
+ "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",
@@ -163394,12 +165456,12 @@
"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.
"
+ "alert" : {
+ "$ref" : "#/components/schemas/Alert",
+ "description" : "Resource object representing alert.
"
}
},
- "required" : [ "webhook_endpoint" ],
+ "required" : [ "alert" ],
"example" : null
}
}
@@ -163510,11 +165572,13 @@
"security" : [ {
"BasicAuth" : [ ]
} ]
- },
+ }
+ },
+ "/alerts/{alert-id}/delete" : {
"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",
+ "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.
\nImpacts
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",
@@ -163635,11 +165699,11 @@
"example" : null
}
}, {
- "name" : "webhook-endpoint-id",
+ "name" : "alert-id",
"in" : "path",
"required" : true,
"deprecated" : false,
- "$ref" : "#/components/parameters/webhook-endpoint-id",
+ "$ref" : "#/components/parameters/alert-id",
"style" : "simple",
"explode" : false,
"schema" : {
@@ -163647,88 +165711,6 @@
"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.
\nNote\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", "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" ],
- "example" : null
- },
- "example" : null
- }
- },
- "example" : null
- },
- "encoding" : { }
- }
- }
- },
"responses" : {
"200" : {
"description" : "OK",
@@ -163737,12 +165719,12 @@
"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.
"
+ "alert" : {
+ "$ref" : "#/components/schemas/Alert",
+ "description" : "Resource object representing alert.
"
}
},
- "required" : [ "webhook_endpoint" ],
+ "required" : [ "alert" ],
"example" : null
}
}
@@ -163855,11 +165837,11 @@
} ]
}
},
- "/webhook_endpoints" : {
+ "/alerts" : {
"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",
+ "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) instead.\n",
+ "operationId" : "list_alerts",
"parameters" : [ {
"name" : "chargebee-request-origin-device",
"in" : "header",
@@ -163937,7 +165919,7 @@
}, {
"name" : "limit",
"in" : "query",
- "description" : "The number of resources to be returned.\n",
+ "description" : "optional, integer\n\nMaximum number of results to return.\n\n**Example →**\n*limit = 10*\n",
"required" : false,
"style" : "form",
"explode" : true,
@@ -163953,7 +165935,7 @@
}, {
"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.
",
+ "description" : "optional, string
\nPagination cursor returned by a previous list call. Use the next_offset value from the previous response.
\nExample →\noffset = "MjAyNC0xMi0yMFQxMjozMjo1MSswMDowMHw5OTk5OTk5OTk="
",
"required" : false,
"style" : "form",
"explode" : true,
@@ -163963,6 +165945,88 @@
"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\nFilter by [type](/docs/api/alerts/alert-object#type).\n\n**Example →**\n*type\\[is\\] = \"usage_exceeded\"*\n",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "description" : "\\* \\`usage_exceeded\\` - usage_exceeded\n",
+ "enum" : [ "usage_exceeded" ],
+ "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" : {
@@ -163977,19 +166041,19 @@
"items" : {
"type" : "object",
"properties" : {
- "webhook_endpoint" : {
- "$ref" : "#/components/schemas/WebhookEndpoint",
- "description" : "Resource object representing webhook_endpoint"
+ "alert" : {
+ "$ref" : "#/components/schemas/Alert",
+ "description" : "Resource object representing alert"
}
},
- "required" : [ "webhook_endpoint" ],
+ "required" : [ "alert" ],
"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.
",
+ "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
}
@@ -164107,9 +166171,9 @@
} ]
},
"post" : {
- "summary" : "Create a webhook endpoint",
- "description" : "Create a new webhook API endpoint on your Chargebee Site.\n",
- "operationId" : "create_a_webhook_endpoint",
+ "summary" : "Create an alert",
+ "description" : "Creates a new alert configuration for a metered feature. The alert 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 new usage events are ingested for the associated metered feature. Alert statuses are created and updated during Alert evaluation. The runtime evaluation state for each subscription is available via the Alert Status endpoints.
\nPrerequisites & Constraints
\n- The
metered_feature_id must reference an existing metered feature configured on your site. \ntype must be usage_exceeded. \n- For
filter_conditions, only plan_price_id is supported as the field, with operator equals or not_equals. \n
",
+ "operationId" : "create_an_alert",
"parameters" : [ {
"name" : "chargebee-request-origin-device",
"in" : "header",
@@ -164236,87 +166300,126 @@
"schema" : {
"type" : "object",
"properties" : {
- "name" : {
+ "type" : {
"type" : "string",
"deprecated" : false,
- "description" : "A name to identify the webhook endpoint.\n",
- "maxLength" : 50,
+ "description" : "The type of alert to create. Currently only usage_exceeded is supported.
\n* usage_exceeded - The alert fires when usage of the metered feature exceeds the configured threshold.
",
+ "enum" : [ "usage_exceeded" ],
"example" : null
},
- "api_version" : {
+ "name" : {
"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" ],
+ "description" : "A human-readable name for the alert. Maximum 50 characters.\n",
+ "maxLength" : 50,
"example" : null
},
- "url" : {
+ "description" : {
"type" : "string",
"deprecated" : false,
- "description" : "The target URL where webhook notifications will be sent.
\nNote\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.
",
+ "description" : "An optional description providing additional context about the alert. Maximum 65,000 characters.\n",
+ "maxLength" : 65000,
"example" : null
},
- "basic_auth_password" : {
+ "metered_feature_id" : {
"type" : "string",
"deprecated" : false,
- "description" : "The password used for basic authentication to secure webhook delivery.\n",
- "maxLength" : 250,
+ "description" : "The identifier of the [metered feature](/docs/api/usages) that this alert should monitor.\n",
+ "maxLength" : 50,
"example" : null
},
- "basic_auth_username" : {
+ "subscription_id" : {
"type" : "string",
"deprecated" : false,
- "description" : "Username for basic authentication used to secure webhook delivery.\n",
- "maxLength" : 250,
+ "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
},
- "send_card_resource" : {
- "type" : "boolean",
- "default" : false,
+ "meta" : {
+ "type" : "string",
"deprecated" : false,
- "description" : "Controls whether card-related resources are included in the webhook payload. Card details are always masked.\n",
+ "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
},
- "chargebee_response_schema_type" : {
- "type" : "string",
+ "threshold" : {
+ "type" : "object",
"deprecated" : false,
- "description" : "Indicates the response schema used in the webhook payload, based on the product catalog version configured for the site.
\nNote\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" ],
+ "description" : "The threshold configuration that defines when this alert fires.\n",
+ "properties" : {
+ "mode" : {
+ "type" : "string",
+ "deprecated" : false,
+ "description" : "How the threshold value is interpreted.
\n* percentage - The threshold value represents a percentage of the plan quota (0–100).
\n* absolute - The threshold value represents an absolute usage quantity.
",
+ "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
},
- "enabled_events" : {
- "type" : "array",
+ "filter_conditions" : {
+ "type" : "object",
"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", "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" ],
- "example" : null
+ "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", "url" ],
+ "required" : [ "metered_feature_id", "name", "type" ],
"example" : null
},
- "encoding" : { }
+ "encoding" : {
+ "filter_conditions" : {
+ "style" : "deepObject",
+ "explode" : true
+ },
+ "threshold" : {
+ "style" : "deepObject",
+ "explode" : true
+ }
+ }
}
}
},
@@ -164328,12 +166431,12 @@
"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.
"
+ "alert" : {
+ "$ref" : "#/components/schemas/Alert",
+ "description" : "Resource object representing alert.
"
}
},
- "required" : [ "webhook_endpoint" ],
+ "required" : [ "alert" ],
"example" : null
}
}
@@ -164446,11 +166549,11 @@
} ]
}
},
- "/subscriptions/{subscription-id}/usage_summary" : {
+ "/subscriptions/{subscription-id}/alert_statuses" : {
"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:
\n- plotting daily, weekly, or monthly usage trends
\n- analyzing feature adoption over time
\n- comparing recent usage against earlier periods
\n- showing historical usage summaries to subscribers
\n
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
\n- If
window_size is omitted, the response returns a single aggregate for the full reporting range. \n- If
window_size is provided, the response returns one aggregated entry for each window in the reporting range. \n
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:
\ntimeframe_start is May 10 10:00:00 UTC \ntimeframe_end is June 10 10:00:00 UTC \nwindow_size is day \n
The response returns windows such as:
\nMay 10 10:00:00 UTC → May 11 10:00:00 UTC \nMay 11 10:00:00 UTC → May 12 10:00:00 UTC \n
and continues in the same pattern until the final window:
\nJune 9 10:00:00 UTC → June 10 10:00:00 UTC \n
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:
\naggregated_from is inclusive \naggregated_till is exclusive \n
In other words, each window is represented as aggregated_from and aggregated_till.
This means:
\n- an event with a timestamp exactly equal to
aggregated_from is included in that window \n- an event with a timestamp exactly equal to
aggregated_till is excluded from that window and counted in the next window, if one exists \n- an event with a timestamp exactly equal to
timeframe_end is excluded \n
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:
\n- one daily window on Jan 1
\n- another daily window on Jan 2
\n
That user is counted once in the Jan 1 aggregate and once in the Jan 2 aggregate.
",
- "operationId" : "retrieve_usage_summary_for_a_subscription",
+ "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",
@@ -164540,7 +166643,7 @@
}, {
"name" : "limit",
"in" : "query",
- "description" : "The number of resources to be returned.\n",
+ "description" : "optional, integer\n\nMaximum number of results to return.\n\n**Example →**\n*limit = 10*\n",
"required" : false,
"style" : "form",
"explode" : true,
@@ -164556,7 +166659,7 @@
}, {
"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.
",
+ "description" : "optional, string
\nPagination cursor returned by a previous list call. Use the next_offset value from the previous response.
",
"required" : false,
"style" : "form",
"explode" : true,
@@ -164567,59 +166670,44 @@
"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",
+ "name" : "alarm_status",
"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",
+ "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" : "form",
+ "style" : "deepObject",
"explode" : true,
"schema" : {
- "type" : "integer",
- "format" : "unix-time",
+ "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" : "timeframe_end",
+ "name" : "alert_id",
"in" : "query",
- "description" : "End of the reporting window, in Unix epoch seconds. If not provided,\ndefaults to the current time\n",
+ "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" : "form",
+ "style" : "deepObject",
"explode" : true,
"schema" : {
- "type" : "integer",
- "format" : "unix-time",
+ "type" : "object",
"deprecated" : false,
+ "properties" : {
+ "in" : {
+ "type" : "string",
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "example" : null
+ }
+ },
"example" : null
}
} ],
@@ -164636,19 +166724,19 @@
"items" : {
"type" : "object",
"properties" : {
- "usage_summary" : {
- "$ref" : "#/components/schemas/UsageSummary",
- "description" : "Resource object representing usage_summary"
+ "alert_status" : {
+ "$ref" : "#/components/schemas/AlertStatus",
+ "description" : "Resource object representing alert_status"
}
},
- "required" : [ "usage_summary" ],
+ "required" : [ "alert_status" ],
"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.
",
+ "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
}
@@ -164766,11 +166854,11 @@
} ]
}
},
- "/subscriptions/{subscription-id}/usage_charges" : {
+ "/alerts/{alert-id}/alert_statuses" : {
"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.
\n- current usage to date
\n- included entitlement
\n- on-demand or overage usage, if any
\n- the current chargeable amount, when applicable
\n
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:
\n- Subscription current term: The overall billing term of the subscription, usually defined by the plan.
\n- Current usage period: The active period for which usage is currently accruing and has not yet been billed for a feature.
\n- Usage interval: A continuous segment within the current usage period where entitlement and pricing remain unchanged.
\n
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.pngResponse Behaviour
The API returns separate usage charge objects for each interval where entitlement remains stable.
\n- \n
First object - Initial Plan Period
\nCovers the storage feature from 1 Jan 00:00:00 to 16 Jan 08:59:59.
\nDuring this interval, total entitlement is 100 GB.
\n80 GB is consumed, so 20 GB remains and carries forward into the next interval.
\n \n- \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 \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:
\n- Group entries by
feature_id \n- Sort intervals by
usage_from \n- Do not assume one entry per feature
\n- Use
amount only when present \n- Treat the response as a snapshot of current unbilled usage
\n
",
- "operationId" : "retrieve_usage_charges_for_a_subscription",
+ "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.
\nPrerequisites & Constraints
\n- The
alert_id must reference a global alert. Subscription-scoped alerts return a 400 error since they apply to only one subscription — use Retrieve alert status instead. \n
",
+ "operationId" : "list_alert_statuses_for_an_alert",
"parameters" : [ {
"name" : "chargebee-request-origin-device",
"in" : "header",
@@ -164846,11 +166934,11 @@
"example" : null
}
}, {
- "name" : "subscription-id",
+ "name" : "alert-id",
"in" : "path",
"required" : true,
"deprecated" : false,
- "$ref" : "#/components/parameters/subscription-id",
+ "$ref" : "#/components/parameters/alert-id",
"style" : "simple",
"explode" : false,
"schema" : {
@@ -164860,7 +166948,7 @@
}, {
"name" : "limit",
"in" : "query",
- "description" : "The number of resources to be returned.\n",
+ "description" : "optional, integer\n\nMaximum number of results to return.\n\n**Example →**\n*limit = 25*\n",
"required" : false,
"style" : "form",
"explode" : true,
@@ -164876,7 +166964,7 @@
}, {
"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.
",
+ "description" : "optional, string
\nPagination cursor returned by a previous list call. Use the next_offset value from the previous response.
",
"required" : false,
"style" : "form",
"explode" : true,
@@ -164887,9 +166975,9 @@
"example" : null
}
}, {
- "name" : "feature_id",
+ "name" : "alarm_status",
"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",
+ "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",
@@ -164897,14 +166985,15 @@
"schema" : {
"type" : "object",
"deprecated" : false,
- "example" : "feat_123",
"properties" : {
"is" : {
"type" : "string",
- "minLength" : 1,
+ "description" : "\\* \\`within_limit\\` - WITHIN_LIMIT \\* \\`in_alarm\\` - IN_ALARM\n",
+ "enum" : [ "within_limit", "in_alarm" ],
"example" : null
}
- }
+ },
+ "example" : null
}
} ],
"responses" : {
@@ -164920,19 +167009,19 @@
"items" : {
"type" : "object",
"properties" : {
- "usage_charge" : {
- "$ref" : "#/components/schemas/UsageCharge",
- "description" : "Resource object representing usage_charge"
+ "alert_status" : {
+ "$ref" : "#/components/schemas/AlertStatus",
+ "description" : "Resource object representing alert_status"
}
},
- "required" : [ "usage_charge" ],
+ "required" : [ "alert_status" ],
"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.
",
+ "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
}
@@ -165050,11 +167139,11 @@
} ]
}
},
- "/subscriptions/{subscription-id}/applicable_alerts" : {
+ "/ledger_account_balances" : {
"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.
",
- "operationId" : "list_applicable_alerts_for_a_subscription",
+ "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",
@@ -165129,22 +167218,10 @@
"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",
+ "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,
@@ -165160,7 +167237,7 @@
}, {
"name" : "offset",
"in" : "query",
- "description" : "optional, string
\nPagination cursor returned by a previous list call. Use the next_offset value from the previous response.
",
+ "description" : "Opaque cursor indicating the current position in the result set for pagination.
\nBehavior
\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
\nExample →\noffset = "["1771176208000","96000000006"]"
",
"required" : false,
"style" : "form",
"explode" : true,
@@ -165171,10 +167248,10 @@
"example" : null
}
}, {
- "name" : "status",
+ "name" : "subscription_id",
"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,
+ "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,
@@ -165184,17 +167261,16 @@
"properties" : {
"is" : {
"type" : "string",
- "description" : "\\* \\`enabled\\` - enabled \\* \\`disabled\\` - disabled\n",
- "enum" : [ "enabled", "disabled" ],
+ "minLength" : 1,
"example" : null
}
},
"example" : null
}
}, {
- "name" : "type",
+ "name" : "unit_id",
"in" : "query",
- "description" : "optional, enumerated string filter\n\nFilter by [type](/docs/api/alerts/alert-object#type).\n\n**Example →**\n*type\\[is\\] = \"usage_exceeded\"*\n",
+ "description" : "optional, string filter
\nFilters results by unit identifier. For example, a credit unit id such as ai_credits.
\nSupported operators : is
\nExample →\nunit_id[is] = "ai_credits"
",
"required" : false,
"deprecated" : false,
"style" : "deepObject",
@@ -165205,8 +167281,7 @@
"properties" : {
"is" : {
"type" : "string",
- "description" : "\\* \\`usage_exceeded\\` - usage_exceeded\n",
- "enum" : [ "usage_exceeded" ],
+ "minLength" : 1,
"example" : null
}
},
@@ -165226,19 +167301,19 @@
"items" : {
"type" : "object",
"properties" : {
- "alert" : {
- "$ref" : "#/components/schemas/Alert",
- "description" : "Resource object representing alert"
+ "ledger_account_balance" : {
+ "$ref" : "#/components/schemas/LedgerAccountBalance",
+ "description" : "Resource object representing ledger_account_balance"
}
},
- "required" : [ "alert" ],
+ "required" : [ "ledger_account_balance" ],
"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.
",
+ "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
}
@@ -165356,11 +167431,11 @@
} ]
}
},
- "/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 Retrieve alert status.
",
- "operationId" : "retrieve_an_alert",
+ "/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
\n- Reverses an earlier
authorize operation. \n- Moves credits from held (reserved) → usable balance.
\n- No consumption occurs as part of this operation.
\n- Always releases the entire remaining held amount; partial releases are not supported.
\n- Once released, the hold is considered closed.
\n
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 both the created ledger_operation object and the updated ledger_account_balance.
",
+ "operationId" : "release_authorization",
"parameters" : [ {
"name" : "chargebee-request-origin-device",
"in" : "header",
@@ -165421,33 +167496,108 @@
"pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\-]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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",
+ "name" : "chargebee-event-actions",
"in" : "header",
- "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n",
+ "description" : "skip all actions to be done on the events\n",
"required" : false,
"deprecated" : false,
- "$ref" : "#/components/parameters/chargebee-business-entity-id",
+ "$ref" : "#/components/parameters/chargebee-event-actions",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
- "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n",
- "maxLength" : 50,
+ "description" : "skip all actions to be done on the events\n",
+ "enum" : [ "all-disabled" ],
"example" : null
}
}, {
- "name" : "alert-id",
- "in" : "path",
- "required" : true,
+ "name" : "chargebee-event-email",
+ "in" : "header",
+ "description" : "skip only emails\n",
+ "required" : false,
"deprecated" : false,
- "$ref" : "#/components/parameters/alert-id",
+ "$ref" : "#/components/parameters/chargebee-event-email",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
+ "description" : "skip only emails\n",
+ "enum" : [ "all-disabled" ],
+ "example" : null
+ }
+ }, {
+ "name" : "chargebee-event-webhook",
+ "in" : "header",
+ "description" : "skip only webhooks\n",
+ "required" : false,
+ "deprecated" : false,
+ "$ref" : "#/components/parameters/chargebee-event-webhook",
+ "style" : "simple",
+ "explode" : false,
+ "schema" : {
+ "type" : "string",
+ "description" : "skip only webhooks\n",
+ "enum" : [ "all-disabled" ],
+ "example" : null
+ }
+ }, {
+ "name" : "chargebee-business-entity-id",
+ "in" : "header",
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n",
+ "required" : false,
+ "deprecated" : false,
+ "$ref" : "#/components/parameters/chargebee-business-entity-id",
+ "style" : "simple",
+ "explode" : false,
+ "schema" : {
+ "type" : "string",
+ "description" : "If the site has multiple business entities, 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.
\nBehavior
\n- Must reference a valid and active hold created via an
authorize request. \n- Must match the
ledger_operation_id used in the original authorize call. \n
",
+ "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.
\nUsage
\n- Used for period attribution, grace-period eligibility, and reporting accuracy.
\n
\nNote
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",
@@ -165456,12 +167606,16 @@
"schema" : {
"type" : "object",
"properties" : {
- "alert" : {
- "$ref" : "#/components/schemas/Alert",
- "description" : "Resource object representing alert.
"
+ "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.
"
}
},
- "required" : [ "alert" ],
+ "required" : [ "ledger_account_balance", "ledger_operation" ],
"example" : null
}
}
@@ -165572,11 +167726,13 @@
"security" : [ {
"BasicAuth" : [ ]
} ]
- },
+ }
+ },
+ "/ledger_operations/capture" : {
"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.
\nImpacts
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 only re-evaluated when new usage events are ingested for the associated metered feature.
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 only re-evaluated upon new usage event ingestion.
",
- "operationId" : "update_an_alert",
+ "summary" : "Capture",
+ "description" : "The capture operation immediately consumes credits for a completed action.
Behavior
\n- Credits are directly moved from usable → consumed.
\n- No intermediate hold or reservation is created.
\n
Usage
Ideal for simple, immediate consumption scenarios where there is no need for multi-step confirmation or concurrency control.
The response returns both the created ledger_operation object and the updated ledger_account_balance.
",
+ "operationId" : "capture",
"parameters" : [ {
"name" : "chargebee-request-origin-device",
"in" : "header",
@@ -165696,18 +167852,6 @@
"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" : {
@@ -165715,45 +167859,53 @@
"schema" : {
"type" : "object",
"properties" : {
- "status" : {
+ "id" : {
"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, regardless of usage.
",
- "enum" : [ "enabled", "disabled" ],
+ "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
},
- "threshold" : {
+ "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).
\nBehavior
Credits are directly moved from usable → consumed as part of this operation.
\nConstraints
\n- Must be a positive value.
\n- Evaluated against the current usable balance at the time of processing.
\n
\nExample
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.
\nUsage
Used for period attribution, grace-period eligibility, and reporting accuracy.
\nNote
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" : "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.
\n* percentage - The threshold value represents a percentage of the plan quota (0–100).
\n* absolute - The threshold value represents an absolute usage quantity.
",
- "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
- }
- },
+ "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" : {
- "threshold" : {
- "style" : "deepObject",
- "explode" : true
- }
- }
+ "encoding" : { }
}
}
},
@@ -165765,12 +167917,16 @@
"schema" : {
"type" : "object",
"properties" : {
- "alert" : {
- "$ref" : "#/components/schemas/Alert",
- "description" : "Resource object representing alert.
"
+ "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.
"
}
},
- "required" : [ "alert" ],
+ "required" : [ "ledger_account_balance", "ledger_operation" ],
"example" : null
}
}
@@ -165883,11 +168039,11 @@
} ]
}
},
- "/alerts/{alert-id}/delete" : {
+ "/ledger_operations/authorize" : {
"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.
\nImpacts
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",
+ "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
\n- Moves credits from usable balance → held (reserved) state.
\n- No consumption occurs at this stage; only reservation.
\n- Final state is determined later:\n
\ncapture_authorization: converts held credits into consumed. \nrelease_authorization: returns held credits to usable balance. \n
\n \n
Reserved Credits Behavior
\n- Held credits are not consumable by other operations.
\n- Held credits are not counted as used until captured.
\n- Unreleased holds are automatically returned to usable balance upon expiry.
\n
Use Cases
\n- Concurrency control
\n- Prevents multiple simultaneous operations from overspending the same credits.
\n- Ensures credits are reserved for a specific flow while other requests see reduced availability.
\n
Two-step workflows\nSupports "check now, finalize later" flows.
The response returns both the created ledger_operation object and the updated ledger_account_balance.
",
+ "operationId" : "authorize",
"parameters" : [ {
"name" : "chargebee-request-origin-device",
"in" : "header",
@@ -166007,19 +168163,70 @@
"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" : {
+ "id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "description" : "Optional client-supplied identifier for this authorize operation.
\nBehavior
\n- When provided, must uniquely identify this operation across the entire ledger.
\n- Should not conflict with any other operation, regardless of type.
\n
\nUsage
\n- Identifies the specific reservation of credits created by this request.
\n- Used as the reference for subsequent operations:\n
\ncapture_authorization: to finalize (consume) the held credits. \nrelease_authorization: to release the held credits back to usable balance. \n
\n \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 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).
\nBehavior
\n- On
authorize, this amount is moved from usable_balance to hold_amount. It is not consumed yet. \n- The held amount can later be:\n
\n- Captured via
capture_authorization. \n- Released via
release_authorization. \n- Auto-released when the hold expires.
\n
\n \n
\nExample
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.
\nUsage
Used for period attribution, grace-period eligibility, and reporting accuracy.
\nNote
Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.
\nConstraints
\n- The
ledger_operation_timestamp must be within the last 10 minutes from the time of the request. \n- Grant blocks outside their active window (including those in the grace period) are not eligible for authorization and are excluded from balance checks for this ledger operation.
\n
",
+ "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",
@@ -166028,12 +168235,16 @@
"schema" : {
"type" : "object",
"properties" : {
- "alert" : {
- "$ref" : "#/components/schemas/Alert",
- "description" : "Resource object representing alert.
"
+ "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.
"
}
},
- "required" : [ "alert" ],
+ "required" : [ "ledger_account_balance", "ledger_operation" ],
"example" : null
}
}
@@ -166146,11 +168357,11 @@
} ]
}
},
- "/alerts" : {
+ "/ledger_operations" : {
"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) instead.\n",
- "operationId" : "list_alerts",
+ "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",
@@ -166228,7 +168439,7 @@
}, {
"name" : "limit",
"in" : "query",
- "description" : "optional, integer\n\nMaximum number of results to return.\n\n**Example →**\n*limit = 10*\n",
+ "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,
@@ -166244,7 +168455,7 @@
}, {
"name" : "offset",
"in" : "query",
- "description" : "optional, string
\nPagination cursor returned by a previous list call. Use the next_offset value from the previous response.
\nExample →\noffset = "MjAyNC0xMi0yMFQxMjozMjo1MSswMDowMHw5OTk5OTk5OTk="
",
+ "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,
@@ -166255,10 +168466,10 @@
"example" : null
}
}, {
- "name" : "id",
+ "name" : "subscription_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,
+ "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,
@@ -166266,18 +168477,18 @@
"type" : "object",
"deprecated" : false,
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
}
},
"example" : null
}
}, {
- "name" : "type",
+ "name" : "unit_id",
"in" : "query",
- "description" : "optional, enumerated string filter\n\nFilter by [type](/docs/api/alerts/alert-object#type).\n\n**Example →**\n*type\\[is\\] = \"usage_exceeded\"*\n",
+ "description" : "optional, string filter
\nFilters results by unit identifier. For example, a credit unit id such as ai_credits.
\nSupported operators : is
\nExample →\nunit_id[is] = "ai_credits"
",
"required" : false,
"deprecated" : false,
"style" : "deepObject",
@@ -166288,17 +168499,16 @@
"properties" : {
"is" : {
"type" : "string",
- "description" : "\\* \\`usage_exceeded\\` - usage_exceeded\n",
- "enum" : [ "usage_exceeded" ],
+ "minLength" : 1,
"example" : null
}
},
"example" : null
}
}, {
- "name" : "subscription_id",
+ "name" : "created_at",
"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",
+ "description" : "optional, timestamp(UTC) in seconds filter
\nFilter by when the operation was recorded (created_at).
\nSupported operators : after, before, on, between (per List\noperations).
\nExample →\ncreated_at[between] = "[1771175750, 1771175800]"
",
"required" : false,
"deprecated" : false,
"style" : "deepObject",
@@ -166307,18 +168517,36 @@
"type" : "object",
"deprecated" : false,
"properties" : {
- "is" : {
+ "after" : {
"type" : "string",
- "minLength" : 1,
+ "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" : "status",
+ "name" : "type",
"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",
+ "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",
@@ -166327,10 +168555,41 @@
"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" : "\\* \\`enabled\\` - enabled \\* \\`disabled\\` - disabled\n",
- "enum" : [ "enabled", "disabled" ],
+ "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
\nSpecifies the field used to sort the result set.
\n\nSort Order
\nasc (ascending order) \ndesc (descending order) \n
\nExample →\nsort_by[desc] = "created_at"
\nThis 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
}
},
@@ -166350,19 +168609,19 @@
"items" : {
"type" : "object",
"properties" : {
- "alert" : {
- "$ref" : "#/components/schemas/Alert",
- "description" : "Resource object representing alert"
+ "ledger_operation" : {
+ "$ref" : "#/components/schemas/LedgerOperation",
+ "description" : "Resource object representing ledger_operation"
}
},
- "required" : [ "alert" ],
+ "required" : [ "ledger_operation" ],
"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.
",
+ "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
}
@@ -166478,11 +168737,317 @@
"security" : [ {
"BasicAuth" : [ ]
} ]
- },
- "post" : {
- "summary" : "Create an alert",
- "description" : "Creates a new alert configuration for a metered feature. The alert 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 new usage events are ingested for the associated metered feature. Alert statuses are created and updated during Alert evaluation. The runtime evaluation state for each subscription is available via the Alert Status endpoints.
\nPrerequisites & Constraints
\n- The
metered_feature_id must reference an existing metered feature configured on your site. \ntype must be usage_exceeded. \n- For
filter_conditions, only plan_price_id is supported as the field, with operator equals or not_equals. \n
",
- "operationId" : "create_an_alert",
+ }
+ },
+ "/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
\n- Completes an earlier authorize operation.
\n- Moves credits from held (reserved) → consumed (debited).
\n- Any unused portion of the hold is automatically released back to the usable balance.
\n- Once fully captured (and remainder released, if any), the hold is considered closed.
\n
Requirement
Requires the authorization_id (i.e., the ledger_operation_id of the original authorize operation).
Note
\n- In case of a partial capture (where the amount held in the authorize call is greater than the amount in the capture call), the remaining held credits are released via a separate internal release operation.
\n- This internal operation is not included in the immediate response, but is visible via the list operations API.
\n- The internal release will have a different
ledger_operation_id (system-generated), but will share the same authorization_id as the capture operation for correlation. \n
The response returns both the created ledger_operation object and the updated ledger_account_balance.
",
+ "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,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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" : {
+ "authorization_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "description" : "Identifier of the original authorize operation whose hold is being captured.
\nBehavior
\n- Must reference a valid and active hold created via an
authorize request. \n- Must match the
ledger_operation_id used in the original authorize call. \n
",
+ "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).
\nBehavior
\n- Must be less than or equal to the current held amount for the specified authorization_id.
\n- The specified amount is moved from held → consumed.
\n
\nConstraints
Cannot exceed the total credits currently on hold for the authorization.
\nExample
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)
\nLedger Effect Summary
\n- Consumed: 70
\n- Released: 30
\n- Remaining Hold: 0 (hold closed)
\n
",
+ "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.
\nUsage
Used for period attribution, grace-period eligibility, and reporting accuracy.
\nNote
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.
"
+ }
+ },
+ "required" : [ "ledger_account_balance", "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",
@@ -166543,195 +169108,33 @@
"pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\-]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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",
+ "name" : "chargebee-business-entity-id",
"in" : "header",
- "description" : "skip only webhooks\n",
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n",
"required" : false,
"deprecated" : false,
- "$ref" : "#/components/parameters/chargebee-event-webhook",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
- "description" : "skip only webhooks\n",
- "enum" : [ "all-disabled" ],
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n",
+ "maxLength" : 50,
"example" : null
}
}, {
- "name" : "chargebee-business-entity-id",
- "in" : "header",
- "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n",
- "required" : false,
+ "name" : "ledger-operation-id",
+ "in" : "path",
+ "required" : true,
"deprecated" : false,
- "$ref" : "#/components/parameters/chargebee-business-entity-id",
+ "$ref" : "#/components/parameters/ledger-operation-id",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
- "description" : "If the site has multiple business entities, 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. Currently only usage_exceeded is supported.
\n* usage_exceeded - The alert fires when usage of the metered feature exceeds the configured threshold.
",
- "enum" : [ "usage_exceeded" ],
- "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" : "The identifier of the [metered feature](/docs/api/usages) that this alert should monitor.\n",
- "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.
\n* percentage - The threshold value represents a percentage of the plan quota (0–100).
\n* absolute - The threshold value represents an absolute usage quantity.
",
- "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" : "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" : [ "metered_feature_id", "name", "type" ],
- "example" : null
- },
- "encoding" : {
- "filter_conditions" : {
- "style" : "deepObject",
- "explode" : true
- },
- "threshold" : {
- "style" : "deepObject",
- "explode" : true
- }
- }
- }
- }
- },
"responses" : {
"200" : {
"description" : "OK",
@@ -166740,12 +169143,12 @@
"schema" : {
"type" : "object",
"properties" : {
- "alert" : {
- "$ref" : "#/components/schemas/Alert",
- "description" : "Resource object representing alert.
"
+ "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 snapshot (start_balance, end_balance),\ntimestamps, and any associated metadata.
"
}
},
- "required" : [ "alert" ],
+ "required" : [ "ledger_operation" ],
"example" : null
}
}
@@ -166858,11 +169261,11 @@
} ]
}
},
- "/subscriptions/{subscription-id}/alert_statuses" : {
+ "/grant_blocks" : {
"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",
+ "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",
@@ -166937,22 +169340,10 @@
"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",
+ "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,
@@ -166968,7 +169359,7 @@
}, {
"name" : "offset",
"in" : "query",
- "description" : "optional, string
\nPagination cursor returned by a previous list call. Use the next_offset value from the previous response.
",
+ "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,
@@ -166979,9 +169370,29 @@
"example" : null
}
}, {
- "name" : "alarm_status",
+ "name" : "subscription_id",
"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",
+ "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
\nFilters results by unit identifier. For example, a credit unit id such as ai_credits.
\nSupported operators : is
\nExample →\nunit_id[is] = "ai_credits"
",
"required" : false,
"deprecated" : false,
"style" : "deepObject",
@@ -166992,17 +169403,16 @@
"properties" : {
"is" : {
"type" : "string",
- "description" : "\\* \\`within_limit\\` - WITHIN_LIMIT \\* \\`in_alarm\\` - IN_ALARM\n",
- "enum" : [ "within_limit", "in_alarm" ],
+ "minLength" : 1,
"example" : null
}
},
"example" : null
}
}, {
- "name" : "alert_id",
+ "name" : "effective_from",
"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",
+ "description" : "optional, timestamp(UTC) in seconds filter
\nFilter by when blocks become effective (effective_from).
\nSupported operators : after, before, on, between (per\nList operations).
\nExample →\neffective_from[after] = "1765283483"
",
"required" : false,
"deprecated" : false,
"style" : "deepObject",
@@ -167011,9 +169421,127 @@
"type" : "object",
"deprecated" : false,
"properties" : {
- "in" : {
+ "after" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "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
\nFilter by grant expiry (expires_at).
\nSupported operators : after, before, on, between (per List\noperations).
\nExample →\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
\nFilter by when the grant block was persisted (created_at).
\nSupported operators : after, before, on, between.
\nExample →\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
\nSpecifies the field used to sort the result set.
\nSupported attributes
\ncreated_at \neffective_from \nexpires_at \n
\nSort Order
\nasc (ascending order) \ndesc (descending order) \n
\nExample →\nsort_by[desc] = "effective_from"
\nThis 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
}
},
@@ -167033,19 +169561,19 @@
"items" : {
"type" : "object",
"properties" : {
- "alert_status" : {
- "$ref" : "#/components/schemas/AlertStatus",
- "description" : "Resource object representing alert_status"
+ "grant_block" : {
+ "$ref" : "#/components/schemas/GrantBlock",
+ "description" : "Resource object representing grant_block"
}
},
- "required" : [ "alert_status" ],
+ "required" : [ "grant_block" ],
"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.
",
+ "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
}
@@ -167163,11 +169691,11 @@
} ]
}
},
- "/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.
\nPrerequisites & Constraints
\n- The
alert_id must reference a global alert. Subscription-scoped alerts return a 400 error since they apply to only one subscription — use Retrieve alert status instead. \n
",
- "operationId" : "list_alert_statuses_for_an_alert",
+ "/promotional_grants" : {
+ "post" : {
+ "summary" : "Create promotional grant",
+ "description" : "Issues promotional credits to a subscription's credit balance.
API Behavior
\n- Credits the specified
amount to the subscription's provisioned balance for the given unit_id. \n- Creates one or more grant blocks to track the credit lifecycle, including balance, holds, expiry, and rollover.
\n- Creates ledger operations to record the credit movement.
\n
Use Cases
Reward subscribers with bonus credits as part of a promotional campaign.
Compensate a subscription for service disruptions or overcharges.
The response returns the created ledger_operations and grant_blocks arrays.
",
+ "operationId" : "create_promotional_grant",
"parameters" : [ {
"name" : "chargebee-request-origin-device",
"in" : "header",
@@ -167228,83 +169756,115 @@
"pattern" : "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\-]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?: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",
+ "name" : "chargebee-event-actions",
"in" : "header",
- "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n",
+ "description" : "skip all actions to be done on the events\n",
"required" : false,
"deprecated" : false,
- "$ref" : "#/components/parameters/chargebee-business-entity-id",
+ "$ref" : "#/components/parameters/chargebee-event-actions",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
- "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n",
- "maxLength" : 50,
+ "description" : "skip all actions to be done on the events\n",
+ "enum" : [ "all-disabled" ],
"example" : null
}
}, {
- "name" : "alert-id",
- "in" : "path",
- "required" : true,
+ "name" : "chargebee-event-email",
+ "in" : "header",
+ "description" : "skip only emails\n",
+ "required" : false,
"deprecated" : false,
- "$ref" : "#/components/parameters/alert-id",
+ "$ref" : "#/components/parameters/chargebee-event-email",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
+ "description" : "skip only emails\n",
+ "enum" : [ "all-disabled" ],
"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
\nPagination cursor returned by a previous list call. Use the next_offset value from the previous response.
",
+ "name" : "chargebee-event-webhook",
+ "in" : "header",
+ "description" : "skip only webhooks\n",
"required" : false,
- "style" : "form",
- "explode" : true,
+ "deprecated" : false,
+ "$ref" : "#/components/parameters/chargebee-event-webhook",
+ "style" : "simple",
+ "explode" : false,
"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,
+ "description" : "skip only webhooks\n",
+ "enum" : [ "all-disabled" ],
"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",
+ "name" : "chargebee-business-entity-id",
+ "in" : "header",
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.\n",
"required" : false,
"deprecated" : false,
- "style" : "deepObject",
- "explode" : true,
+ "$ref" : "#/components/parameters/chargebee-business-entity-id",
+ "style" : "simple",
+ "explode" : false,
"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
- }
- },
+ "type" : "string",
+ "description" : "If the site has multiple business entities, 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 promotional credits are applied.\n",
+ "maxLength" : 50,
+ "example" : null
+ },
+ "unit_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "description" : "Identifier of the credit unit to which these promotional credits belong. 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 issue as part of this promotional grant.\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).
\nBehavior
\n- Must be a positive value greater than zero.
\n- Credited to the subscription's provisioned balance for the specified unit.
\n
",
+ "maxLength" : 36,
+ "example" : null
+ },
+ "expires_at" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "description" : "Unix timestamp (in seconds) at which the promotional credits expire and become unavailable for consumption.
\nBehavior
\n- Once expired, the remaining balance in the associated grant block moves to
expired_amount. \n
\nConstraints
\nexpires_at must be a future timestamp. \n
",
+ "example" : null
+ },
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : true,
+ "deprecated" : false,
+ "description" : "Optional opaque JSON object carrying additional business context for this promotional grant. \\*\\*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",
@@ -167313,29 +169873,26 @@
"schema" : {
"type" : "object",
"properties" : {
- "list" : {
+ "ledger_operations" : {
"type" : "array",
+ "description" : "Records in the ledger_operations array created as a result of this promotional grant. Each entry reflects the credit movement into the subscription's balance.
",
"items" : {
- "type" : "object",
- "properties" : {
- "alert_status" : {
- "$ref" : "#/components/schemas/AlertStatus",
- "description" : "Resource object representing alert_status"
- }
- },
- "required" : [ "alert_status" ],
- "example" : null
+ "$ref" : "#/components/schemas/LedgerOperation",
+ "description" : "Resource object representing ledger_operation"
},
"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,
+ "grant_blocks" : {
+ "type" : "array",
+ "description" : "Records in the grant_blocks array created for this promotional grant. Each block tracks the issued credits, remaining balance, holds, expiry, and rollover state for the subscription.
",
+ "items" : {
+ "$ref" : "#/components/schemas/GrantBlock",
+ "description" : "Resource object representing grant_block"
+ },
"example" : null
}
},
- "required" : [ "list" ],
+ "required" : [ "grant_blocks", "ledger_operations" ],
"example" : null
}
}
@@ -172237,6 +174794,17 @@
"minimum" : -50000,
"example" : null
},
+ "notes" : {
+ "type" : "array",
+ "deprecated" : false,
+ "items" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 3500,
+ "example" : null
+ },
+ "example" : null
+ },
"deleted" : {
"type" : "boolean",
"deprecated" : false,
@@ -182845,84 +185413,82 @@
},
"GrantBlock" : {
"type" : "object",
+ "description" : "A grant block represents a bucket of issued credits associated with a specific subscription, unit_id, and unit_type, allocated either through an [item price](/docs/api/item_prices) or as a promotional grant.\n\nEach grant block follows its own lifecycle, governed by a defined policy that manages how the credits within the block are consumed, held, expired or rolled over. \n**Example**\n\nAn annual subscription plan grants **100 AI credits every month** , resulting in a new grant block of 100 credits being allocated to the subscription at the start of **each grant cycle**.\n\nDuring its lifecycle, the block tracks usage through fields such as [**used_amount**](#used_amount), [**hold_amount**](#hold_amount), and the [**balance**](#balance).\n\nSince the grant frequency is monthly, each block has a **validity of one month** from its [**effective_from**](#effective_from) time, after which it expires. If a rollover policy is configured, any unused credits at [**expires_at**](#expires_at) may be carried forward into a new grant block; otherwise, they expire.\n\nThis 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 credits.\n\nGrant Blocks Lifecycle\n----------------------\n\nscreenshot\\|/images/grant_blocks_lifecycle.png\n\nLifecycle Of Credits In A Block\n-------------------------------\n\nscreenshot\\|/images/life_cycle_of_credits.png\n",
"properties" : {
"id" : {
"type" : "string",
"deprecated" : false,
- "maxLength" : 40,
+ "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
},
"granted_amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\nBehavior\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).
\nExample
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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\nLifecycle Behavior
\n- The block becomes consumable at effective_from and remains directly usable until expires_at.
\n- After expires_at, the block enters the configured grace period.
\n- During this grace period, late-arriving operations with an operation_timestamp within the original validity window may still consume credits from this block.
\n
\nFinalization
Once the grace period ends, any remaining unconsumed credits are finalized and recorded as expired_amount.
\nExample
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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\nSource vs Destination Behavior
\n- On the source block, this amount reflects the remaining balance that has been moved out and is no longer spendable.
\n- On the destination (rollover) block, the same amount is recorded under granted_amount as the value of the new block.
\n
\nReporting 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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\nBehavior
\n- Voided credits reduce the remaining balance of the block.
\n- They are not included in used_amount.
\n
\nReporting Semantics
Tracked separately to ensure usage reports and revenue reconciliation exclude voided credits while maintaining a complete audit trail.
\nExample
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
},
@@ -182930,18 +185496,21 @@
"type" : "string",
"default" : "available",
"deprecated" : false,
+ "description" : "Enumerated string representing the current lifecycle state of the grant block.
\nExample
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
},
"metadata" : {
"type" : "string",
"deprecated" : false,
+ "description" : "Optional opaque JSON object carrying additional business context \n**Behavior**\n\n* Stored as-is and returned verbatim by the ledger.\n* Not interpreted, validated, or indexed by the ledger.\n",
"maxLength" : 65000,
"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 a promotional or courtesy credit-grants program (for example, marketing offers or goodwill\ncredits).\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" ],
"example" : null
},
@@ -182949,24 +185518,28 @@
"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
},
"account_type" : {
"type" : "string",
"deprecated" : false,
- "maxLength" : 50,
+ "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,
- "maxLength" : 100,
+ "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,
- "maxLength" : 50,
+ "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
}
},
@@ -183544,8 +186117,8 @@
"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\\* update_payment_method - \\* 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", "update_payment_method", "manage_payment_sources", "collect_now", "extend_subscription", "checkout_one_time", "pre_cancel", "view_voucher", "accept_quote" ],
+ "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" : {
@@ -183584,6 +186157,13 @@
"description" : "The date and time when the hosted page URL expires. After this timestamp, the page can no longer be accessed.
\nThe expiration period depends on the type of hosted page:
\n\n- For
checkout_new, checkout_existing, and checkout_one_time, the URL expires 3 hours after the page is created. \n- For
collect_now and manage_payment_sources, the URL expires 5 days after creation. \n
",
"example" : null
},
+ "layout" : {
+ "type" : "string",
+ "deprecated" : false,
+ "description" : "Specifies the UI layout for the hosted page.
\nApplicable 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,
@@ -187681,7 +190261,7 @@
"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:
\n- \n
The cloud storage sold at USD 10 per month.
\n \n- \n
The same service sold at AUD 100 per year.
\n \n- \n
The service sold at a monthly rate determined by the following stairstep pricing model:
\n \n- \n
1-10 users for EUR 10
\n \n- \n
11-25 users for EUR 20
\n \n- \n
26-50 users for EUR 45
\n \n- \n
51 and above for EUR 100
\n \n
The billing period\nof an item price (only applies to plan-item prices and addon-item prices), is the period\nof the item price in period_unit\ns. An item can have only one item price for a given currency and billing period.
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:
\n- Plan-item prices
\n- Addon-item prices
\n- Charge-item prices
\n
",
+ "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:
\n- \n
The cloud storage sold at USD 10 per month.
\n \n- \n
The same service sold at AUD 100 per year.
\n \n- \n
The service sold at a monthly rate determined by the following stairstep pricing model:
\n\n- 1-10 users for EUR 10
\n- 11-25 users for EUR 20
\n- 26-50 users for EUR 45
\n- 51 and above for EUR 100
\n
\n \n
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:
\n- Plan-item prices
\n- Addon-item prices
\n- Charge-item prices
\n
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.
\n- When price variants are not enabled, an item can have only one item price for a given currency and billing period.
\n- When price variants are enabled, an item can have multiple item prices for the same currency and billing period, as long as each has a distinct
price_variant_id. An item price created without a price_variant_id is treated as the default ("no variant"), and only one such default item price can exist for a given currency and billing period. \n
",
"properties" : {
"id" : {
"type" : "string",
@@ -188514,22 +191094,26 @@
},
"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 as a promotional grant, 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:
\n- provisioned_balance: Reflects the credit grants given through the configured item price or promotional grants. These are prepaid credit grants for which the customer has already paid.\nAny ledger operation will prioritize consuming this balance first.
\n- overdraft_balance: Reflects the extra limit provided to a subscription in case it exhausts all credit grants before they are renewed or refreshed.\nAny ledger operation will consume this balance only when the provisioned balance has been exhausted.
\n
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.pngReturned 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,
- "maxLength" : 100,
+ "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
},
@@ -188537,34 +191121,33 @@
"type" : "integer",
"format" : "unix-time",
"deprecated" : false,
+ "description" : "Unix timestamp (seconds) when the balance was last updated. For example, after [capture](/docs/api/ledger_operations/capture) or [authorize](/docs/api/ledger_operations/authorize).\n",
"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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\ntotal_balance = usable_balance + hold_amount
\nExample: 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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\nExample: If total_balance is 70 and hold_amount is 5, usable_balance is 65.
",
+ "maxLength" : 36,
"example" : null
},
"hold_amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\nExample: If 10 AI credits are reserved for a pending operation, hold_amount is 10 and usable_balance is reduced accordingly.
",
+ "maxLength" : 36,
"example" : null
}
},
@@ -188574,51 +191157,48 @@
"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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\nExample: If limit is 25 and used_amount is 10, the remaining overdraft capacity is 15.
",
+ "maxLength" : 36,
"example" : null
},
"usable_balance" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\nUsable Balance (Only if Capped): limit - used_amount - hold_amount.
",
+ "maxLength" : 36,
"example" : null
},
"used_amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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
}
},
@@ -188631,46 +191211,75 @@
},
"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,
- "maxLength" : 40,
+ "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
},
"type" : {
"type" : "string",
"deprecated" : false,
- "maxLength" : 50,
+ "description" : "Specifies the type of ledger operation, indicating the kind of business event this record represents.
\nTypes
External Ledger Operations: Triggered via API calls
\nauthorize \ncapture \ncapture_authorization \nrelease_authorization \n
Internal Ledger Operations: Triggered via system processes
\nallocation \nexpiry \nrollover \nvoid \nadjustment \n
\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 - Credits issued into an account, such as allocations created from configured credit grants or promotional grants.
\n* void - Credits 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" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "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).
\nBehavior by Ledger Operation Type
\ncapture: Credits debited from the account immediately. \nauthorize: Credits reserved, moving from usable balance to held amount. \ncapture_authorization: Credits finalized as consumption (converted from held to debited); any remaining held credits are automatically released. \nrelease_authorization: Credits released from hold back to the usable balance. \nexpiry: Credits that have lapsed after the validity and grace period. \nrollover: Credits carried forward into a new grant block. \nvoid: Credits removed through administrative updates. \n
",
+ "maxLength" : 36,
"example" : null
},
"start_balance" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "description" : "The usable credit 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).
\nUsage
Use alongside end_balance to trace exactly how each ledger operation moved the balance over time.
",
+ "maxLength" : 36,
"example" : null
},
"end_balance" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "description" : "The usable credit 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).
\nUsage
Use alongside start_balance to trace exactly how each ledger operation moved the balance over time.
",
+ "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).
\nUsage
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).
\nUsage
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).
\nUsage
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).
\nUsage
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.
\nUsage
\n- Present on
capture_authorization and release_authorization ledger operations to identify the hold being finalized or released. \n- Also present on internally generated release ledger operations (for example, partial-capture remainders) to correlate them back to the original authorization.
\n
\nConstraints
\n- Must match the
ledger_operation_id used in the original authorize call. \n- The same value should be reused across retries.
\n
",
"maxLength" : 50,
"example" : null
},
@@ -188678,17 +191287,20 @@
"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.
\nNote
Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.
\nConstraints
\n- The
ledger_operation_timestamp must be within the last 10 minutes from the time of the request. \n- Grant blocks outside their active window (including those in the grace period) are not eligible for authorization and are excluded from balance checks for this ledger operation.
\n
",
"example" : null
},
"auto_release_timestamp" : {
"type" : "integer",
"format" : "unix-time",
"deprecated" : false,
+ "description" : "Unix timestamp (in seconds) indicating when an unfinalized hold 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 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" : "string",
"deprecated" : false,
+ "description" : "Optional opaque JSON object carrying additional business context \n**Behavior**\n\n* Stored as-is and returned verbatim by the system.\n* Not interpreted, validated, or indexed by the system.\n",
"maxLength" : 65000,
"example" : null
},
@@ -188696,34 +191308,39 @@
"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
},
"subscription_id" : {
"type" : "string",
"deprecated" : false,
- "maxLength" : 100,
+ "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,
- "maxLength" : 50,
+ "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
}
},
- "required" : [ "amount", "end_balance", "id", "start_balance", "type" ],
+ "required" : [ "amount", "end_balance", "id", "overdraft_end_balance", "overdraft_start_balance", "provisioned_end_balance", "provisioned_start_balance", "start_balance", "type" ],
"example" : null
},
"Level" : {
@@ -197369,6 +199986,12 @@
"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,
@@ -197389,9 +200012,15 @@
"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" ],
+ "required" : [ "id", "site_id" ],
"example" : null
},
"PortalSession" : {
@@ -198409,36 +201038,40 @@
},
"PromotionalGrant" : {
"type" : "object",
+ "description" : "A promotional grant adds credits to a subscription's credit balance. Each grant creates grant blocks to track the credit lifecycle and ledger operations to record the credit movement.
Example
A subscription receives 50 bonus AI credits as part of a promotional campaign. The grant credits the subscription's provisioned balance for the ai_credits unit, creates a grant block to track the credit lifecycle including expiry, and records the credit movement as ledger operations.
Use Cases
Reward subscribers with bonus credits
Reward subscribers with bonus credits as part of a promotional campaign.
Compensate for service disruptions or overcharges
Compensate a subscription for service disruptions or overcharges.
",
"properties" : {
"subscription_id" : {
"type" : "string",
"deprecated" : false,
+ "description" : "A unique, immutable identifier for the [subscription](/docs/api/subscriptions/subscription-object#id) to which the promotional credits were applied.\n",
"maxLength" : 50,
"example" : null
},
"unit_id" : {
"type" : "string",
"deprecated" : false,
- "maxLength" : 100,
+ "description" : "Identifier of the credit unit to which the promotional credits belong. For example, a credit unit id such as ai_credits.
",
+ "maxLength" : 50,
"example" : null
},
"amount" : {
- "type" : "number",
- "format" : "decimal",
+ "type" : "string",
"deprecated" : false,
- "maximum" : 10000000000000000000000000,
- "minimum" : 0,
+ "description" : "The number of credits issued as part of this promotional grant.\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
},
"expires_at" : {
"type" : "integer",
"format" : "unix-time",
"deprecated" : false,
+ "description" : "Unix timestamp (in seconds) at which the promotional credits expire and become unavailable for consumption.
\nBehavior\nOnce expired, the remaining balance in the associated grant block moves to expired_amount.
",
"example" : null
},
- "meta_data" : {
+ "metadata" : {
"type" : "string",
"deprecated" : false,
+ "description" : "Optional opaque JSON object carrying additional business context for this promotional grant. \n**Behavior**\n\n* Stored as-is and returned verbatim by the system.\n* Not interpreted, validated, or indexed by the system.\n",
"maxLength" : 65000,
"example" : null
}
@@ -204440,6 +207073,13 @@
"enum" : [ "admin_console", "api", "bulk_operation", "scheduled_job", "hosted_page", "portal", "system", "none", "js_api", "migration", "external_service" ],
"example" : null
},
+ "Status" : {
+ "type" : "string",
+ "default" : "available",
+ "deprecated" : false,
+ "enum" : [ "available", "exhausted", "scheduled", "in_grace_period" ],
+ "example" : null
+ },
"Subscription" : {
"type" : "object",
"additionalProperties" : true,
diff --git a/spec/chargebee_api_v2_pc_v2_spec.yaml b/spec/chargebee_api_v2_pc_v2_spec.yaml
index 4994350f..73e3908c 100644
--- a/spec/chargebee_api_v2_pc_v2_spec.yaml
+++ b/spec/chargebee_api_v2_pc_v2_spec.yaml
@@ -5,10 +5,10 @@ info:
name: Chargebee Support
url: https://www.chargebee.com
email: support@chargebee.com
- version: 2026-06-08.8b15a3575b64635c16a22ad29253d68a470d2304
- x-cb-api-version: 2
+ version: 2026-06-12.a49b34edd262e3e190bd6d8616ff9e401c37bd21
x-cb-product-catalog-version: 2
- x-generated-on: 1780886227524
+ x-cb-api-version: 2
+ x-generated-on: 1781239700311
servers:
- url: "{protocol}://{site}.{environment}:{port}/api/v2"
variables:
@@ -49929,14 +49929,14 @@ paths:
deprecated: false
example: old_inv_001
properties:
- is:
- type: string
- minLength: 1
- example: null
in:
type: string
pattern: "^\\[(.*)(,.*)*\\]$"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
- name: payment_reference_number
in: query
description: |
@@ -49956,14 +49956,14 @@ paths:
This parameter is used to identify the PRN in the system and retrieve its corresponding payment information. \*\*Note\*\*: To retrieve the PRN, the API requires either the invoice ID or the payment reference number to be provided by the user. If both values are missing, an error will be returned by the API.
example: "001234"
properties:
- is:
- type: string
- minLength: 1
- example: null
in:
type: string
pattern: "^\\[(.*)(,.*)*\\]$"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
example: null
responses:
"200":
@@ -71364,591 +71364,277 @@ paths:
deprecated: false
security:
- BasicAuth: []
- /hosted_pages/update_payment_method:
+ /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:
+ - In-app modal: Use Chargebee.js
openCheckout() to open the hosted page in a modal popup in your website or application.
+ - Standalone page: Redirect the customer to the hosted page
url.
+
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
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-event-actions
+ in: header
+ description: |
+ skip all actions to be done on the events
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-actions"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip all actions to be done on the events
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-email
+ in: header
+ description: |
+ skip only emails
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-email"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only emails
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-webhook
+ in: header
+ description: |
+ skip only webhooks
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only webhooks
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ 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.
+ 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.
+ Default behavior
+ - If the subscription's plan has
billing_cycles set, that value is used.
+ - If the plan's billing cycles attribute is not set,
1 is used.
+
+ minimum: 1
+ example: null
+ subscription:
+ type: object
+ deprecated: false
+ description: |
+ Parameters for subscription
+ properties:
+ id:
+ type: string
+ deprecated: false
+ description: |
+ A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
+ 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: Update Payment Method
+ summary: Notify an event
description: |
- **Note:** If you're using [In-App Checkout](https://www.chargebee.com/docs/2.0/checkout.html) , use [Manage Payment Sources API](/docs/api/hosted_pages/manage-payment-sources) to request your customers to update their payment method details or change their payment method.
-
- Using this API, you can request your customers to update their payment method details or change their payment method. This is used in scenarios like customers updating their payment methods before the end of trial or customers switching among payment methods.
-
- When this API is invoked, it returns a hosted page URL. When the customers are directed to this URL, they will be able to change/update their payment methods.
-
- Depending on the payment methods (Card, PayPal Express Checkout, Amazon Payments) that you offer your customers, they will find options to switch among the various methods of payment.
- **Note:**
-
- * If the card\[gateway\] parameter is passed, and the customer chooses Card as a payment method, then the card details are stored in the gateway which is passed. However, if the card\[gateway\] parameter is passed and the customer chooses PayPal Express Checkout/Amazon Payments as a payment method, the gateway passed will be ignored.
- * The option of embedding into an iframe is not supported for PayPal Express Checkout and Amazon Payments as customers are redirected to the respective website pages. Hence if you have PayPal Express Checkout/Amazon Payments configured and pass the parameter embed=true, this will result in an unsuccessful API request. Also, if you have all the three payment methods (Card, Paypal Express Checkout and Amazon Payments) configured and pass the parameter embed=true, the returned hosted page URL will show only Card Payment as a payment method.
- operationId: update_payment_method
- parameters:
- - name: chargebee-request-origin-device
- in: header
- description: |
- The device from which the customer has made the request
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-device"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- The device from which the customer has made the request
- example: Android
- - name: chargebee-request-origin-user
- in: header
- description: |
- The email address of your customer/user. Use this when the email address has only ASCII characters.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user"
- style: simple
- explode: 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
- - name: chargebee-request-origin-user-encoded
- in: header
- description: |
- The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
- style: simple
- explode: false
- schema:
- type: string
- format: email
- description: |
- The Base64-encoded email address of your customer/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
- - name: chargebee-request-origin-ip
- in: header
- description: |
- The IP address of the customer where the request originated
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-ip"
- 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})))?::)))))$"
- - name: chargebee-event-actions
- in: header
- description: |
- skip all actions to be done on the events
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-actions"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip all actions to be done on the events
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-email
- in: header
- description: |
- skip only emails
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-email"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only emails
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-webhook
- in: header
- description: |
- skip only webhooks
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-webhook"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only webhooks
- enum:
- - all-disabled
- example: null
- - name: chargebee-business-entity-id
- in: header
- description: |
- If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-business-entity-id"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- If the 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
- 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.
- Note :
-
- - Although the customer will be redirected to the
redirect_url after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as subscription_created or invoice_generated to verify a successful checkout.
- - Redirect URL configured in Settings > Hosted Pages Settings would be overriden by this redirect URL.
- - Eg : http://yoursite.com?id=**&state=succeeded
- - This parameter is not applicable for iframe messaging.
-
- 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.
-
- **Note**
- : - Cancel URL configured in Settings \> Hosted Pages Settings would be overriden by this cancel URL.
- *Eg : http://yoursite.com?id=\&state=cancelled*
-
- * This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.
- 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.
- For example, you can store the ID of the marketing campaign that initiated the user session. After a successful session, 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
- iframe_messaging:
- type: boolean
- default: false
- deprecated: false
- description: |
- If true then iframe will communicate with the parent window. Applicable only for embedded(iframe) hosted pages. If you're using iframe_messaging you need to implement onSuccess \& onCancel callbacks.
-
- **Note**
- : This parameter is not applicable for [in-app](https://www.chargebee.com/docs/checkout-v3.html)
- checkout.
- example: null
- customer:
- type: object
- deprecated: false
- description: |
- Parameters for customer
- properties:
- id:
- type: string
- deprecated: false
- description: |
- Identifier of the customer.
- maxLength: 50
- example: null
- required:
- - id
- example: null
- card:
- type: object
- deprecated: false
- description: |
- Parameters for card
- properties:
- gateway_account_id:
- type: string
- deprecated: false
- description: |
- The gateway account in which this payment source is stored.
- 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/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:
- - In-app modal: Use Chargebee.js
openCheckout() to open the hosted page in a modal popup in your website or application.
- - Standalone page: Redirect the customer to the hosted page
url.
-
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
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-device"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- The device from which the customer has made the request
- example: Android
- - name: chargebee-request-origin-user
- in: header
- description: |
- The email address of your customer/user. Use this when the email address has only ASCII characters.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user"
- style: simple
- explode: 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
- - name: chargebee-request-origin-user-encoded
- in: header
- description: |
- The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
- style: simple
- explode: false
- schema:
- type: string
- format: email
- description: |
- The Base64-encoded email address of your customer/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
- - name: chargebee-request-origin-ip
- in: header
- description: |
- The IP address of the customer where the request originated
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-ip"
- 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})))?::)))))$"
- - name: chargebee-event-actions
- in: header
- description: |
- skip all actions to be done on the events
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-actions"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip all actions to be done on the events
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-email
- in: header
- description: |
- skip only emails
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-email"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only emails
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-webhook
- in: header
- description: |
- skip only webhooks
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-webhook"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only webhooks
- enum:
- - all-disabled
- example: null
- - name: chargebee-business-entity-id
- in: header
- description: |
- If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-business-entity-id"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- If the 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
- 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.
- 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.
- Default behavior
- - If the subscription's plan has
billing_cycles set, that value is used.
- - If the plan's billing cycles attribute is not set,
1 is used.
-
- minimum: 1
- example: null
- subscription:
- type: object
- deprecated: false
- description: |
- Parameters for subscription
- properties:
- id:
- type: string
- deprecated: false
- description: |
- A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
- 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.
- operationId: notify_an_event
+ Use this API to notify Chargebee about important events that occur on your web pages, such as subscription cancellations. An event contains data about affected resources and additional details such as when the change occurred.
+ operationId: notify_an_event
parameters:
- name: chargebee-request-origin-device
in: header
@@ -72897,11 +72583,10 @@ paths:
is:
type: string
description: |
- \* \`checkout_new\` - Checkout new Subscription \* \`checkout_existing\` - Checkout existing Subscription \* \`update_card\` - \*\*(Deprecated)\*\* Update Card for a Customer \* \`update_payment_method\` - Update Payment Method for a Customer \* \`manage_payment_sources\` - Manage Payments for a customer \* \`collect_now\` - Collect Unpaid Invoices for a Customer \* \`extend_subscription\` - To extend a Subscription period \* \`checkout_one_time\` - Checkout one time \* \`pre_cancel\` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription. \* \`view_voucher\` - View Details of a voucher \* \`accept_quote\` - Accept Quote
+ \* \`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
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -72913,11 +72598,10 @@ paths:
is_not:
type: string
description: |
- \* \`checkout_new\` - Checkout new Subscription \* \`checkout_existing\` - Checkout existing Subscription \* \`update_card\` - \*\*(Deprecated)\*\* Update Card for a Customer \* \`update_payment_method\` - Update Payment Method for a Customer \* \`manage_payment_sources\` - Manage Payments for a customer \* \`collect_now\` - Collect Unpaid Invoices for a Customer \* \`extend_subscription\` - To extend a Subscription period \* \`checkout_one_time\` - Checkout one time \* \`pre_cancel\` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription. \* \`view_voucher\` - View Details of a voucher \* \`accept_quote\` - Accept Quote
+ \* \`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
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -72929,11 +72613,10 @@ paths:
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\` - 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
+ \* \`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
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -72947,11 +72630,10 @@ paths:
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\` - 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
+ \* \`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
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -98104,14 +97786,14 @@ paths:
deprecated: false
example: day-pass-USD
properties:
- is:
- type: string
- minLength: 1
- example: null
in:
type: string
pattern: "^\\[(.*)(,.*)*\\]$"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
responses:
"200":
description: OK
@@ -113633,10 +113315,6 @@ paths:
business_entity_id[is_present] = "true"
example: business_entity_id
properties:
- is:
- type: string
- minLength: 1
- example: null
is_present:
type: string
format: boolean
@@ -113646,6 +113324,10 @@ paths:
- "true"
- "false"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
include_site_level_resources:
type: object
deprecated: false
@@ -115120,10 +114802,6 @@ paths:
business_entity_id[is_present] = "true"
example: business_entity_id
properties:
- is:
- type: string
- minLength: 1
- example: null
is_present:
type: string
format: boolean
@@ -115133,439 +114811,10 @@ paths:
- "true"
- "false"
example: null
- include_site_level_resources:
- type: object
- deprecated: false
- description: |-
- optional, boolean filter
- Default value is true . To exclude site-level resources in specific cases, set this parameter to false.
- Possible values are : true, false
- Supported operators :
- is
- Example →
- include_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
- properties:
- id:
- type: object
- deprecated: false
- description: |
- Filter variant based on their \[id\](/docs/api/exports) .
- 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
- s.
- 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
- .
- example: active
- properties:
- is:
- type: string
- description: |
- \* \`active\` - Active \* \`archived\` - Archived
- enum:
- - active
- - archived
- example: null
- is_not:
- type: string
- description: |
- \* \`active\` - Active \* \`archived\` - Archived
- enum:
- - active
- - archived
- example: null
- in:
- type: string
- description: |
- \* \`active\` - Active \* \`archived\` - Archived
- enum:
- - active
- - archived
- pattern: "^\\[(active|archived)(,(active|archived))*\\]$"
- example: null
- not_in:
- type: string
- description: |
- \* \`active\` - Active \* \`archived\` - Archived
- enum:
- - active
- - archived
- pattern: "^\\[(active|archived)(,(active|archived))*\\]$"
- example: null
- updated_at:
- type: object
- deprecated: false
- description: |-
- Filter product based on their updated time
- .
- 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
- .
- 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.
- operationId: export_items
- parameters:
- - name: chargebee-request-origin-device
- in: header
- description: |
- The device from which the customer has made the request
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-device"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- The device from which the customer has made the request
- example: Android
- - name: chargebee-request-origin-user
- in: header
- description: |
- The email address of your customer/user. Use this when the email address has only ASCII characters.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user"
- style: simple
- explode: 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
- - name: chargebee-request-origin-user-encoded
- in: header
- description: |
- The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
- style: simple
- explode: false
- schema:
- type: string
- format: email
- description: |
- The Base64-encoded email address of your customer/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
- - name: chargebee-request-origin-ip
- in: header
- description: |
- The IP address of the customer where the request originated
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-request-origin-ip"
- 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})))?::)))))$"
- - name: chargebee-event-actions
- in: header
- description: |
- skip all actions to be done on the events
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-actions"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip all actions to be done on the events
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-email
- in: header
- description: |
- skip only emails
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-email"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only emails
- enum:
- - all-disabled
- example: null
- - name: chargebee-event-webhook
- in: header
- description: |
- skip only webhooks
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-event-webhook"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- skip only webhooks
- enum:
- - all-disabled
- example: null
- - name: chargebee-business-entity-id
- in: header
- description: |
- If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
- required: false
- deprecated: false
- $ref: "#/components/parameters/chargebee-business-entity-id"
- style: simple
- explode: false
- schema:
- type: string
- description: |
- If the 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
- example: null
- requestBody:
- content:
- application/x-www-form-urlencoded:
- schema:
- type: object
- properties:
- business_entity_id:
- type: object
- deprecated: false
- description: |-
- optional, string filter
- The unique ID of the
- business entity
- of this item.
- Learn more
- about all the scenarios before using this filter.
-
- Supported operators :
- is, is_present
- Example →
- business_entity_id[is_present] = "true"
- example: business_entity_id
- properties:
is:
type: string
minLength: 1
example: null
- is_present:
- type: string
- format: boolean
- description: |
- null
- enum:
- - "true"
- - "false"
- example: null
include_site_level_resources:
type: object
deprecated: false
@@ -115586,17 +114835,450 @@ paths:
- "false"
example: null
example: null
- item:
+ price_variant:
type: object
deprecated: false
description: |
- Parameters for item
+ Parameters for price_variant
properties:
id:
type: object
deprecated: false
description: |
- Filter items based on item id.
+ Filter variant based on their \[id\](/docs/api/exports) .
+ 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
+ s.
+ 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
+ .
+ example: active
+ properties:
+ is:
+ type: string
+ description: |
+ \* \`active\` - Active \* \`archived\` - Archived
+ enum:
+ - active
+ - archived
+ example: null
+ is_not:
+ type: string
+ description: |
+ \* \`active\` - Active \* \`archived\` - Archived
+ enum:
+ - active
+ - archived
+ example: null
+ in:
+ type: string
+ description: |
+ \* \`active\` - Active \* \`archived\` - Archived
+ enum:
+ - active
+ - archived
+ pattern: "^\\[(active|archived)(,(active|archived))*\\]$"
+ example: null
+ not_in:
+ type: string
+ description: |
+ \* \`active\` - Active \* \`archived\` - Archived
+ enum:
+ - active
+ - archived
+ pattern: "^\\[(active|archived)(,(active|archived))*\\]$"
+ example: null
+ updated_at:
+ type: object
+ deprecated: false
+ description: |-
+ Filter product based on their updated time
+ .
+ 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
+ .
+ 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.
+ operationId: export_items
+ parameters:
+ - name: chargebee-request-origin-device
+ in: header
+ description: |
+ The device from which the customer has made the request
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-event-actions
+ in: header
+ description: |
+ skip all actions to be done on the events
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-actions"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip all actions to be done on the events
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-email
+ in: header
+ description: |
+ skip only emails
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-email"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only emails
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-webhook
+ in: header
+ description: |
+ skip only webhooks
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only webhooks
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ example: null
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ business_entity_id:
+ type: object
+ deprecated: false
+ description: |-
+ optional, string filter
+ The unique ID of the
+ business entity
+ of this item.
+ Learn more
+ about all the scenarios before using this filter.
+
+ Supported operators :
+ is, is_present
+ Example →
+ business_entity_id[is_present] = "true"
+ example: business_entity_id
+ properties:
+ is_present:
+ type: string
+ format: boolean
+ description: |
+ null
+ enum:
+ - "true"
+ - "false"
+ example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
+ include_site_level_resources:
+ type: object
+ deprecated: false
+ description: |-
+ optional, boolean filter
+ Default value is true . To exclude site-level resources in specific cases, set this parameter to false.
+ Possible values are : true, false
+ Supported operators :
+ is
+ Example →
+ include_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
+ properties:
+ id:
+ type: object
+ deprecated: false
+ description: |
+ Filter items based on item id.
example: basic
properties:
is:
@@ -121660,14 +121342,14 @@ paths:
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"\*
example: day-pass-USD
properties:
- is:
- type: string
- minLength: 1
- example: null
in:
type: string
pattern: "^\\[(.*)(,.*)*\\]$"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
coupon:
type: object
deprecated: false
@@ -123256,10 +122938,6 @@ paths:
business_entity_id[is_present] = "true"
example: business_entity_id
properties:
- is:
- type: string
- minLength: 1
- example: null
is_present:
type: string
format: boolean
@@ -123269,6 +122947,10 @@ paths:
- "true"
- "false"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
include_site_level_resources:
type: object
deprecated: false
@@ -127150,10 +126832,6 @@ paths:
deprecated: false
example: business_entity_id
properties:
- is:
- type: string
- minLength: 1
- example: null
is_present:
type: string
format: boolean
@@ -127161,6 +126839,10 @@ paths:
- "true"
- "false"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
- name: include_site_level_resources
in: query
description: |-
@@ -131331,9 +131013,16 @@ paths:
/items:
get:
summary: List items
- description: |
- Returns a list of items satisfying **all**
- the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
+ description: |-
+ Returns a list of items satisfying all
+ the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order.
+ 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 API name of a custom field configured on the corresponding item type:
plan_item[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE
+ addon_item[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE
+ charge_item[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE
+
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 \
+ -G -u {site_api_key}: \
+ -d plan_item[cf_package_id][is]="pkg-basic"
+
operationId: list_items
parameters:
- name: chargebee-request-origin-device
@@ -132088,10 +131777,6 @@ paths:
deprecated: false
example: business_entity_id
properties:
- is:
- type: string
- minLength: 1
- example: null
is_present:
type: string
format: boolean
@@ -132099,6 +131784,10 @@ paths:
- "true"
- "false"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
- name: include_site_level_resources
in: query
description: |-
@@ -134433,10 +134122,6 @@ paths:
deprecated: false
example: business_entity_id
properties:
- is:
- type: string
- minLength: 1
- example: null
is_present:
type: string
format: boolean
@@ -134444,6 +134129,10 @@ paths:
- "true"
- "false"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
- name: include_site_level_resources
in: query
description: |-
@@ -137274,8 +136963,15 @@ paths:
/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.
+ 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.
+ 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 API name of a custom field configured on the corresponding item price type:
plan_price[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE
+ addon_price[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE
+ charge_price[cf_CUSTOM_FIELD_NAME][OPERATOR]=VALUE
+
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 \
+ -G -u {site_api_key}: \
+ -d plan_price[cf_region][is]="APAC"
+
operationId: list_item_prices
parameters:
- name: chargebee-request-origin-device
@@ -137985,10 +137681,6 @@ paths:
deprecated: false
example: business_entity_id
properties:
- is:
- type: string
- minLength: 1
- example: null
is_present:
type: string
format: boolean
@@ -137996,6 +137688,10 @@ paths:
- "true"
- "false"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
- name: include_site_level_resources
in: query
description: |-
@@ -147403,14 +147099,14 @@ paths:
deprecated: false
example: user-licenses
properties:
- is:
- type: string
- minLength: 1
- example: null
in:
type: string
pattern: "^\\[(.*)(,.*)*\\]$"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
- name: entity_type
in: query
description: |-
@@ -147431,7 +147127,7 @@ paths:
deprecated: false
example: plan_price
properties:
- is:
+ in:
type: string
description: |
\* \`plan\` - Plan \* \`addon\` - Addon \* \`charge\` - Charge \* \`plan_price\` - Plan Price \* \`addon_price\` - Addon Price
@@ -147441,8 +147137,10 @@ paths:
- charge
- plan_price
- addon_price
+ pattern: "^\\[(plan|addon|charge|plan_price|addon_price)(,(plan|addon|charge|plan_price|addon_price))*\\\
+ ]$"
example: null
- in:
+ is:
type: string
description: |
\* \`plan\` - Plan \* \`addon\` - Addon \* \`charge\` - Charge \* \`plan_price\` - Plan Price \* \`addon_price\` - Addon Price
@@ -147452,8 +147150,6 @@ paths:
- charge
- plan_price
- addon_price
- pattern: "^\\[(plan|addon|charge|plan_price|addon_price)(,(plan|addon|charge|plan_price|addon_price))*\\\
- ]$"
example: null
- name: entity_id
in: query
@@ -147475,14 +147171,14 @@ paths:
deprecated: false
example: usd-professional-monthly
properties:
- is:
- type: string
- minLength: 1
- example: null
in:
type: string
pattern: "^\\[(.*)(,.*)*\\]$"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
responses:
"200":
description: OK
@@ -157886,7 +157582,7 @@ paths:
deprecated: false
example: SCHEDULED
properties:
- is:
+ 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
@@ -157895,8 +157591,10 @@ paths:
- succeeded
- failed
- draft
+ pattern: "^\\[(scheduled|succeeded|failed|draft)(,(scheduled|succeeded|failed|draft))*\\\
+ ]$"
example: null
- in:
+ 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
@@ -157905,8 +157603,6 @@ paths:
- succeeded
- failed
- draft
- pattern: "^\\[(scheduled|succeeded|failed|draft)(,(scheduled|succeeded|failed|draft))*\\\
- ]$"
example: null
- name: subscription_id
in: query
@@ -157929,14 +157625,14 @@ paths:
deprecated: false
example: 8gsnbYfsMLds
properties:
- is:
- type: string
- minLength: 1
- example: null
in:
type: string
pattern: "^\\[(.*)(,.*)*\\]$"
example: null
+ is:
+ type: string
+ minLength: 1
+ example: null
- name: effective_from
in: query
description: |-
@@ -167152,12 +166848,12 @@ paths:
deprecated: false
example: "1777556762"
properties:
- before:
+ after:
type: string
format: unix-time
pattern: "^\\d{10}$"
example: null
- after:
+ before:
type: string
format: unix-time
pattern: "^\\d{10}$"
@@ -167182,16 +166878,38 @@ paths:
deprecated: false
example: "1777556271"
properties:
- before:
+ after:
type: string
format: unix-time
pattern: "^\\d{10}$"
example: null
- after:
+ before:
type: string
format: unix-time
pattern: "^\\d{10}$"
example: null
+ - name: sort_by
+ in: query
+ 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: ""
@@ -173938,21 +173656,2218 @@ paths:
deprecated: false
security:
- BasicAuth: []
- /subscriptions/{subscription-id}/applicable_alerts:
+ /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
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ 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
+
+ Maximum number of results to return.
+
+ **Example →**
+ *limit = 25*
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: integer
+ format: int32
+ default: 10
+ description: |
+ The number of resources to be returned.
+ maximum: 100
+ minimum: 1
+ example: null
+ - name: offset
+ in: query
+ description: |-
+ optional, string
+ 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.
+ maxLength: 1000
+ example: null
+ - name: status
+ in: query
+ description: |
+ optional, enumerated string filter
+
+ Filter by [status](/docs/api/alerts/alert-object#status).
+
+ **Example →**
+ *status\[is\] = "enabled"*
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ properties:
+ is:
+ type: string
+ description: |
+ \* \`enabled\` - enabled \* \`disabled\` - disabled
+ enum:
+ - enabled
+ - disabled
+ example: null
+ example: null
+ - name: type
+ in: query
+ description: |
+ optional, enumerated string filter
+
+ Filter by [type](/docs/api/alerts/alert-object#type).
+
+ **Example →**
+ *type\[is\] = "usage_exceeded"*
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ properties:
+ is:
+ type: string
+ description: |
+ \* \`usage_exceeded\` - usage_exceeded
+ enum:
+ - usage_exceeded
+ 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 Retrieve alert status.
"
+ operationId: retrieve_an_alert
+ parameters:
+ - name: chargebee-request-origin-device
+ in: header
+ description: |
+ The device from which the customer has made the request
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ 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.
+ 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 only re-evaluated when new usage events are ingested for the associated metered feature.
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 only re-evaluated upon new usage event ingestion.
+ operationId: update_an_alert
+ parameters:
+ - name: chargebee-request-origin-device
+ in: header
+ description: |
+ The device from which the customer has made the request
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-event-actions
+ in: header
+ description: |
+ skip all actions to be done on the events
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-actions"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip all actions to be done on the events
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-email
+ in: header
+ description: |
+ skip only emails
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-email"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only emails
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-webhook
+ in: header
+ description: |
+ skip only webhooks
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only webhooks
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ 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.
+ * enabled - The alert is active and will trigger when the threshold is breached.
+ * disabled - The alert is inactive and will not trigger, regardless of usage.
+ 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.
+ properties:
+ mode:
+ type: string
+ deprecated: false
+ description: |-
+ How the threshold value is interpreted.
+ * percentage - The threshold value represents a percentage of the plan quota (0–100).
+ * absolute - The threshold value represents an absolute usage quantity.
+ 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.
+ 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
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-event-actions
+ in: header
+ description: |
+ skip all actions to be done on the events
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-actions"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip all actions to be done on the events
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-email
+ in: header
+ description: |
+ skip only emails
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-email"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only emails
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-webhook
+ in: header
+ description: |
+ skip only webhooks
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only webhooks
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ 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)\
+ \ instead.\n"
+ operationId: list_alerts
+ parameters:
+ - name: chargebee-request-origin-device
+ in: header
+ description: |
+ The device from which the customer has made the request
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ example: null
+ - name: limit
+ in: query
+ description: |
+ optional, integer
+
+ Maximum number of results to return.
+
+ **Example →**
+ *limit = 10*
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: integer
+ format: int32
+ default: 10
+ description: |
+ The number of resources to be returned.
+ maximum: 100
+ minimum: 1
+ example: null
+ - name: offset
+ in: query
+ description: |-
+ optional, string
+ Pagination cursor returned by a previous list call. Use the next_offset value from the previous response.
+ Example →
+ offset = "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.
+ maxLength: 1000
+ example: null
+ - name: id
+ in: query
+ description: |
+ optional, string filter
+
+ Filter alerts by [id](/docs/api/alerts/alert-object#id).
+
+ **Example →**
+ *id\[in\] = "alert___dev__3Nl7purV3LwbKYH"*
+ 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
+
+ Filter by [type](/docs/api/alerts/alert-object#type).
+
+ **Example →**
+ *type\[is\] = "usage_exceeded"*
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ properties:
+ is:
+ type: string
+ description: |
+ \* \`usage_exceeded\` - usage_exceeded
+ enum:
+ - usage_exceeded
+ example: null
+ example: null
+ - name: subscription_id
+ in: query
+ description: |
+ optional, string filter
+
+ Filter by [subscription_id](/docs/api/alerts/alert-object#subscription_id) to find alerts scoped to a specific subscription.
+
+ **Example →**
+ *subscription_id\[is\] = "sub_KyV2S7Qm8tL7p"*
+ 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
+
+ Filter by [status](/docs/api/alerts/alert-object#status).
+
+ **Example →**
+ *status\[is\] = "enabled"*
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ properties:
+ is:
+ type: string
+ description: |
+ \* \`enabled\` - enabled \* \`disabled\` - disabled
+ 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 for a metered feature. The alert 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 new usage events are ingested for the associated metered feature. Alert statuses are created and updated during Alert evaluation. The runtime evaluation state for each subscription is available via the Alert Status endpoints.
+ Prerequisites & Constraints
+ - The
metered_feature_id must reference an existing metered feature configured on your site.
+ type must be usage_exceeded.
+ - For
filter_conditions, only plan_price_id is supported as the field, with operator equals or not_equals.
+
+ operationId: create_an_alert
+ parameters:
+ - name: chargebee-request-origin-device
+ in: header
+ description: |
+ The device from which the customer has made the request
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-event-actions
+ in: header
+ description: |
+ skip all actions to be done on the events
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-actions"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip all actions to be done on the events
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-email
+ in: header
+ description: |
+ skip only emails
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-email"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only emails
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-webhook
+ in: header
+ description: |
+ skip only webhooks
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only webhooks
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ 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. Currently only usage_exceeded is supported.
+ * usage_exceeded - The alert fires when usage of the metered feature exceeds the configured threshold.
+ enum:
+ - usage_exceeded
+ example: null
+ name:
+ type: string
+ deprecated: false
+ description: |
+ A human-readable name for the alert. Maximum 50 characters.
+ maxLength: 50
+ example: null
+ description:
+ type: string
+ deprecated: false
+ description: |
+ An optional description providing additional context about the alert. Maximum 65,000 characters.
+ maxLength: 65000
+ example: null
+ metered_feature_id:
+ type: string
+ deprecated: false
+ description: |
+ The identifier of the [metered feature](/docs/api/usages) that this alert should monitor.
+ 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.
+ maxLength: 65000
+ example: null
+ threshold:
+ type: object
+ deprecated: false
+ description: |
+ The threshold configuration that defines when this alert fires.
+ properties:
+ mode:
+ type: string
+ deprecated: false
+ description: |-
+ How the threshold value is interpreted.
+ * percentage - The threshold value represents a percentage of the plan quota (0–100).
+ * absolute - The threshold value represents an absolute usage quantity.
+ 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: 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.
+ * 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.
+ * not_equals - The subscription attribute must not equal the specified value.
+ * 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.
+ items:
+ type: string
+ deprecated: false
+ maxLength: 50
+ example: null
+ example: null
+ example: null
+ required:
+ - metered_feature_id
+ - 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
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ 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
+
+ Maximum number of results to return.
+
+ **Example →**
+ *limit = 10*
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: integer
+ format: int32
+ default: 10
+ description: |
+ The number of resources to be returned.
+ maximum: 100
+ minimum: 1
+ example: null
+ - name: offset
+ in: query
+ description: |-
+ optional, string
+ 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.
+ maxLength: 1000
+ example: null
+ - name: alarm_status
+ in: query
+ description: |
+ optional, enumerated string filter
+
+ Filter by [alarm_status](/docs/api/alert_statuses/alert-status-object#alarm_status) to find alerts in a specific runtime state.
+
+ **Example →**
+ *alarm_status\[is\] = "in_alarm"*
+ 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
+ enum:
+ - within_limit
+ - in_alarm
+ example: null
+ example: null
+ - name: alert_id
+ in: query
+ description: |
+ optional, string filter
+
+ Filter by [alert_id](/docs/api/alert_statuses/alert-status-object#alert_id) to find the status for a specific alert.
+
+ **Example →**
+ *alert_id\[is\] = "alert___dev__3Nl7purV3LwbKYH"*
+ 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.
+ Prerequisites & Constraints
+ - The
alert_id must reference a global alert. Subscription-scoped alerts return a 400 error since they apply to only one subscription — use Retrieve alert status instead.
+
+ 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
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ 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
+
+ Maximum number of results to return.
+
+ **Example →**
+ *limit = 25*
+ required: false
+ style: form
+ explode: true
+ schema:
+ type: integer
+ format: int32
+ default: 10
+ description: |
+ The number of resources to be returned.
+ maximum: 100
+ minimum: 1
+ example: null
+ - name: offset
+ in: query
+ description: |-
+ optional, string
+ 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.
+ maxLength: 1000
+ example: null
+ - name: alarm_status
+ in: query
+ description: |
+ optional, enumerated string filter
+
+ Filter by [alarm_status](/docs/api/alert_statuses/alert-status-object#alarm_status) to find subscriptions in a specific runtime state.
+
+ **Example →**
+ *alarm_status\[is\] = "in_alarm"*
+ 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
+ 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 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
+ 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
@@ -174036,25 +175951,13 @@ paths:
If the 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
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
-
- Maximum number of results to return.
-
- **Example →**
- *limit = 25*
+ 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
@@ -174070,8 +175973,13 @@ paths:
- name: offset
in: query
description: |-
- optional, string
- Pagination cursor returned by a previous list call. Use the next_offset value from the previous response.
+ Opaque cursor indicating the current position in the result set for pagination.
+ Behavior
+ - To fetch the next page, pass the
next_offset value returned in the previous response.
+ - The value is opaque and must not be parsed, modified, or constructed manually.
+
+ Example →
+ offset = "["1771176208000","96000000006"]"
required: false
style: form
explode: true
@@ -174081,16 +175989,18 @@ paths:
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.
maxLength: 1000
example: null
- - name: status
+ - name: subscription_id
in: query
description: |
- optional, enumerated string filter
+ required, string filter
- Filter by [status](/docs/api/alerts/alert-object#status).
+ Filters results by subscription identifier. This is the subscription whose credit grant balances you are listing.
+
+ **Supported operators :** is
**Example →**
- *status\[is\] = "enabled"*
- required: false
+ *subscription_id\[is\] = "1mGETgZVF2umUZq"*
+ required: true
deprecated: false
style: deepObject
explode: true
@@ -174100,22 +176010,17 @@ paths:
properties:
is:
type: string
- description: |
- \* \`enabled\` - enabled \* \`disabled\` - disabled
- enum:
- - enabled
- - disabled
+ minLength: 1
example: null
example: null
- - name: type
+ - name: unit_id
in: query
- description: |
- optional, enumerated string filter
-
- Filter by [type](/docs/api/alerts/alert-object#type).
-
- **Example →**
- *type\[is\] = "usage_exceeded"*
+ description: |-
+ optional, string filter
+ Filters results by unit identifier. For example, a credit unit id such as ai_credits.
+ Supported operators : is
+ Example →
+ unit_id[is] = "ai_credits"
required: false
deprecated: false
style: deepObject
@@ -174126,10 +176031,7 @@ paths:
properties:
is:
type: string
- description: |
- \* \`usage_exceeded\` - usage_exceeded
- enum:
- - usage_exceeded
+ minLength: 1
example: null
example: null
responses:
@@ -174145,20 +176047,18 @@ paths:
items:
type: object
properties:
- alert:
- $ref: "#/components/schemas/Alert"
- description: Resource object representing alert
+ ledger_account_balance:
+ $ref: "#/components/schemas/LedgerAccountBalance"
+ description: Resource object representing ledger_account_balance
required:
- - alert
+ - ledger_account_balance
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.
+ 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:
@@ -174227,17 +176127,21 @@ paths:
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 Retrieve alert status.
"
- operationId: retrieve_an_alert
+ /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
+ - Reverses an earlier
authorize operation.
+ - Moves credits from held (reserved) → usable balance.
+ - No consumption occurs as part of this operation.
+ - Always releases the entire remaining held amount; partial releases are not supported.
+ - Once released, the hold is considered closed.
+
Requirements
Requires the authorization_id of the original authorize request.
Business Use Cases
Cancellation flows
+ When an authorized action is no longer needed.
Failure recovery
+ Downstream processing fails after authorization.
Timeout handling
+ Manual 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 both the created ledger_operation object and the updated ledger_account_balance.
+ operationId: release_authorization
parameters:
- name: chargebee-request-origin-device
in: header
@@ -174306,31 +176210,118 @@ paths:
.){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
+ - name: chargebee-event-actions
in: header
description: |
- If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ skip all actions to be done on the events
required: false
deprecated: false
- $ref: "#/components/parameters/chargebee-business-entity-id"
+ $ref: "#/components/parameters/chargebee-event-actions"
style: simple
explode: false
schema:
type: string
description: |
- If the 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
+ skip all actions to be done on the events
+ enum:
+ - all-disabled
example: null
- - name: alert-id
- in: path
- required: true
+ - name: chargebee-event-email
+ in: header
+ description: |
+ skip only emails
+ required: false
deprecated: false
- $ref: "#/components/parameters/alert-id"
+ $ref: "#/components/parameters/chargebee-event-email"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only emails
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-event-webhook
+ in: header
+ description: |
+ skip only webhooks
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ skip only webhooks
+ enum:
+ - all-disabled
+ example: null
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
style: simple
explode: false
schema:
type: string
+ description: |
+ If the 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
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.
+ Behavior
+ - Must reference a valid and active hold created via an
authorize request.
+ - Must match the
ledger_operation_id used in the original authorize call.
+
+ 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.
+ Usage
+ - Used for period attribution, grace-period eligibility, and reporting accuracy.
+
+ 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.
+ example: null
+ required:
+ - authorization_id
+ - ledger_operation_timestamp
+ example: null
+ encoding: {}
responses:
"200":
description: OK
@@ -174339,11 +176330,23 @@ paths:
schema:
type: object
properties:
- alert:
- $ref: "#/components/schemas/Alert"
- description: Resource object representing alert.
+ 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.
required:
- - alert
+ - ledger_account_balance
+ - ledger_operation
example: null
"400":
description: on error
@@ -174408,12 +176411,15 @@ paths:
deprecated: false
security:
- BasicAuth: []
+ /ledger_operations/capture:
post:
- summary: Update an alert
+ summary: Capture
description: |-
- Updates an existing alert configuration. Use this to change the threshold values or toggle the status between enabled and disabled.
- 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 only re-evaluated when new usage events are ingested for the associated metered feature.
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 only re-evaluated upon new usage event ingestion.
- operationId: update_an_alert
+ The capture operation immediately consumes credits for a completed action.
Behavior
+ - Credits are directly moved from usable → consumed.
+ - No intermediate hold or reservation is created.
+
Usage
Ideal for simple, immediate consumption scenarios where there is no need for multi-step confirmation or concurrency control.
The response returns both the created ledger_operation object and the updated ledger_account_balance.
+ operationId: capture
parameters:
- name: chargebee-request-origin-device
in: header
@@ -174545,70 +176551,75 @@ paths:
If the 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
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:
+ 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.
+ 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
- default: enabled
deprecated: false
description: |-
- Set to enabled to activate the alert or disabled to deactivate it.
- * enabled - The alert is active and will trigger when the threshold is breached.
- * disabled - The alert is inactive and will not trigger, regardless of usage.
- enum:
- - enabled
- - disabled
+ The number of credits to immediately consume from the usable balance.
+ Pass this value as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Behavior
Credits are directly moved from usable → consumed as part of this operation.
+ Constraints
+ - Must be a positive value.
+ - Evaluated against the current usable balance at the time of processing.
+
+ Example
If amount = "50", then 50 credits are immediately deducted from the usable balance and recorded as consumed.
+ maxLength: 36
example: null
- threshold:
+ 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.
+ Usage
Used for period attribution, grace-period eligibility, and reporting accuracy.
+ 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: |
- The threshold configuration that defines when this alert fires. Only the fields provided are updated.
- properties:
- mode:
- type: string
- deprecated: false
- description: |-
- How the threshold value is interpreted.
- * percentage - The threshold value represents a percentage of the plan quota (0–100).
- * absolute - The threshold value represents an absolute usage quantity.
- 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
+ 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.
example: null
+ required:
+ - amount
+ - ledger_operation_timestamp
+ - subscription_id
+ - unit_id
example: null
- encoding:
- threshold:
- style: deepObject
- explode: true
+ encoding: {}
responses:
"200":
description: OK
@@ -174617,11 +176628,23 @@ paths:
schema:
type: object
properties:
- alert:
- $ref: "#/components/schemas/Alert"
- description: Resource object representing alert.
+ 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.
required:
- - alert
+ - ledger_account_balance
+ - ledger_operation
example: null
"400":
description: on error
@@ -174686,13 +176709,30 @@ paths:
deprecated: false
security:
- BasicAuth: []
- /alerts/{alert-id}/delete:
+ /ledger_operations/authorize:
post:
- summary: Delete an alert
+ summary: Authorize
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.
- 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
+ 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
+ - Moves credits from usable balance → held (reserved) state.
+ - No consumption occurs at this stage; only reservation.
+ - Final state is determined later:
+
+ capture_authorization: converts held credits into consumed.
+ release_authorization: returns held credits to usable balance.
+
+
+
Reserved Credits Behavior
+ - Held credits are not consumable by other operations.
+ - Held credits are not counted as used until captured.
+ - Unreleased holds are automatically returned to usable balance upon expiry.
+
Use Cases
+ - Concurrency control
+ - Prevents multiple simultaneous operations from overspending the same credits.
+ - Ensures credits are reserved for a specific flow while other requests see reduced availability.
+
Two-step workflows
+ Supports "check now, finalize later" flows.
The response returns both the created ledger_operation object and the updated ledger_account_balance.
+ operationId: authorize
parameters:
- name: chargebee-request-origin-device
in: header
@@ -174824,16 +176864,111 @@ paths:
If the 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
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:
+ id:
+ type: string
+ deprecated: false
+ description: |-
+ Optional client-supplied identifier for this authorize operation.
+ Behavior
+ - When provided, must uniquely identify this operation across the entire ledger.
+ - Should not conflict with any other operation, regardless of type.
+
+ Usage
+ - Identifies the specific reservation of credits created by this request.
+ - Used as the reference for subsequent operations:
+
+ capture_authorization: to finalize (consume) the held credits.
+ release_authorization: to release the held credits back to usable balance.
+
+
+
+ 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.
+ 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.
+ Pass this value as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Behavior
+ - On
authorize, this amount is moved from usable_balance to hold_amount. It is not consumed yet.
+ - The held amount can later be:
+
+ - Captured via
capture_authorization.
+ - Released via
release_authorization.
+ - Auto-released when the hold expires.
+
+
+
+ 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.
+ Usage
Used for period attribution, grace-period eligibility, and reporting accuracy.
+ Note
Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.
+ Constraints
+ - The
ledger_operation_timestamp must be within the last 10 minutes from the time of the request.
+ - Grant blocks outside their active window (including those in the grace period) are not eligible for authorization and are excluded from balance checks for this ledger operation.
+
+ 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.
+ example: null
+ required:
+ - amount
+ - ledger_operation_timestamp
+ - subscription_id
+ - unit_id
+ example: null
+ encoding: {}
responses:
"200":
description: OK
@@ -174842,11 +176977,23 @@ paths:
schema:
type: object
properties:
- alert:
- $ref: "#/components/schemas/Alert"
- description: Resource object representing alert.
+ 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.
required:
- - alert
+ - ledger_account_balance
+ - ledger_operation
example: null
"400":
description: on error
@@ -174911,16 +177058,12 @@ paths:
deprecated: false
security:
- BasicAuth: []
- /alerts:
+ /ledger_operations:
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)\
- \ instead.\n"
- operationId: list_alerts
+ summary: List ledger operations
+ description: |
+ Returns a list of operations meeting all the conditions specified in the filter parameters below.
+ operationId: list_ledger_operations
parameters:
- name: chargebee-request-origin-device
in: header
@@ -175007,12 +177150,7 @@ paths:
- name: limit
in: query
description: |
- optional, integer
-
- Maximum number of results to return.
-
- **Example →**
- *limit = 10*
+ 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"\*
required: false
style: form
explode: true
@@ -175027,11 +177165,11 @@ paths:
example: null
- name: offset
in: query
- description: |-
- optional, string
- Pagination cursor returned by a previous list call. Use the next_offset value from the previous response.
- Example →
- offset = "MjAyNC0xMi0yMFQxMjozMjo1MSswMDowMHw5OTk5OTk5OTk="
+ 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
@@ -175041,16 +177179,18 @@ paths:
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.
maxLength: 1000
example: null
- - name: id
+ - name: subscription_id
in: query
description: |
- optional, string filter
+ required, string filter
- Filter alerts by [id](/docs/api/alerts/alert-object#id).
+ Filters results by subscription identifier. This is the subscription whose operations you are listing.
+
+ **Supported operators :** is
**Example →**
- *id\[in\] = "alert___dev__3Nl7purV3LwbKYH"*
- required: false
+ *subscription_id\[is\] = "1mGETgZVF2umUZq"*
+ required: true
deprecated: false
style: deepObject
explode: true
@@ -175058,20 +177198,19 @@ paths:
type: object
deprecated: false
properties:
- in:
+ is:
type: string
- pattern: "^\\[(.*)(,.*)*\\]$"
+ minLength: 1
example: null
example: null
- - name: type
+ - name: unit_id
in: query
- description: |
- optional, enumerated string filter
-
- Filter by [type](/docs/api/alerts/alert-object#type).
-
- **Example →**
- *type\[is\] = "usage_exceeded"*
+ description: |-
+ optional, string filter
+ Filters results by unit identifier. For example, a credit unit id such as ai_credits.
+ Supported operators : is
+ Example →
+ unit_id[is] = "ai_credits"
required: false
deprecated: false
style: deepObject
@@ -175082,21 +177221,18 @@ paths:
properties:
is:
type: string
- description: |
- \* \`usage_exceeded\` - usage_exceeded
- enum:
- - usage_exceeded
+ minLength: 1
example: null
example: null
- - name: subscription_id
+ - name: created_at
in: query
- description: |
- optional, string filter
-
- Filter by [subscription_id](/docs/api/alerts/alert-object#subscription_id) to find alerts scoped to a specific subscription.
-
- **Example →**
- *subscription_id\[is\] = "sub_KyV2S7Qm8tL7p"*
+ description: |-
+ optional, timestamp(UTC) in seconds filter
+ Filter by when the operation was recorded (created_at).
+ Supported operators : after, before, on, between (per List
+ operations).
+ Example →
+ created_at[between] = "[1771175750, 1771175800]"
required: false
deprecated: false
style: deepObject
@@ -175105,20 +177241,37 @@ paths:
type: object
deprecated: false
properties:
- is:
+ after:
type: string
- minLength: 1
+ 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: status
+ - name: type
in: query
description: |
- optional, enumerated string filter
+ optional, string filter
- Filter by [status](/docs/api/alerts/alert-object#status).
+ Filters results by operation type.
+
+ **Supported operators :** is, in
**Example →**
- *status\[is\] = "enabled"*
+ *type\[is\] = "capture"*
required: false
deprecated: false
style: deepObject
@@ -175127,13 +177280,70 @@ paths:
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
+ 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: |
- \* \`enabled\` - enabled \* \`disabled\` - disabled
+ \* \`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
enum:
- - enabled
- - disabled
+ - allocation
+ - capture
+ - authorize
+ - release_authorization
+ - capture_authorization
+ - expiry
+ - void
+ - rollover
+ - adjustment
+ example: null
+ example: null
+ - name: sort_by
+ in: query
+ description: |-
+ optional, string filter
+ Specifies the field used to sort the result set.
+
+ Sort Order
+ asc (ascending order)
+ desc (descending order)
+
+ Example →
+ sort_by[desc] = "created_at"
+ 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:
@@ -175149,20 +177359,18 @@ paths:
items:
type: object
properties:
- alert:
- $ref: "#/components/schemas/Alert"
- description: Resource object representing alert
+ ledger_operation:
+ $ref: "#/components/schemas/LedgerOperation"
+ description: Resource object representing ledger_operation
required:
- - alert
+ - ledger_operation
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.
+ 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:
@@ -175231,16 +177439,21 @@ paths:
deprecated: false
security:
- BasicAuth: []
+ /ledger_operations/capture_authorization:
post:
- summary: Create an alert
+ summary: Capture authorization
description: |-
- Creates a new alert configuration for a metered feature. The alert 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 new usage events are ingested for the associated metered feature. Alert statuses are created and updated during Alert evaluation. The runtime evaluation state for each subscription is available via the Alert Status endpoints.
- Prerequisites & Constraints
- - The
metered_feature_id must reference an existing metered feature configured on your site.
- type must be usage_exceeded.
- - For
filter_conditions, only plan_price_id is supported as the field, with operator equals or not_equals.
-
- operationId: create_an_alert
+ The capture_authorization operation finalizes a previously created hold by converting reserved credits into consumed credits.
API Behavior
+ - Completes an earlier authorize operation.
+ - Moves credits from held (reserved) → consumed (debited).
+ - Any unused portion of the hold is automatically released back to the usable balance.
+ - Once fully captured (and remainder released, if any), the hold is considered closed.
+
Requirement
Requires the authorization_id (i.e., the ledger_operation_id of the original authorize operation).
Note
+ - In case of a partial capture (where the amount held in the authorize call is greater than the amount in the capture call), the remaining held credits are released via a separate internal release operation.
+ - This internal operation is not included in the immediate response, but is visible via the list operations API.
+ - The internal release will have a different
ledger_operation_id (system-generated), but will share the same authorization_id as the capture operation for correlation.
+
The response returns both the created ledger_operation object and the updated ledger_account_balance.
+ operationId: capture_authorization
parameters:
- name: chargebee-request-origin-device
in: header
@@ -175378,147 +177591,67 @@ paths:
schema:
type: object
properties:
- type:
+ authorization_id:
type: string
deprecated: false
description: |-
- The type of alert to create. Currently only usage_exceeded is supported.
- * usage_exceeded - The alert fires when usage of the metered feature exceeds the configured threshold.
- enum:
- - usage_exceeded
- example: null
- name:
- type: string
- deprecated: false
- description: |
- A human-readable name for the alert. Maximum 50 characters.
+ Identifier of the original authorize operation whose hold is being captured.
+ Behavior
+ - Must reference a valid and active hold created via an
authorize request.
+ - Must match the
ledger_operation_id used in the original authorize call.
+
maxLength: 50
example: null
- description:
- type: string
- deprecated: false
- description: |
- An optional description providing additional context about the alert. Maximum 65,000 characters.
- maxLength: 65000
- example: null
- metered_feature_id:
+ id:
type: string
deprecated: false
- description: |
- The identifier of the [metered feature](/docs/api/usages) that this alert should monitor.
+ 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
- subscription_id:
+ amount:
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
+ description: |-
+ The number of credits to finalize as consumption from a previously authorized (held) amount.
+ Pass this value as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Behavior
+ - Must be less than or equal to the current held amount for the specified authorization_id.
+ - The specified amount is moved from held → consumed.
+
+ Constraints
Cannot exceed the total credits currently on hold for the authorization.
+ 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)
+ Ledger Effect Summary
+ - Consumed: 70
+ - Released: 30
+ - Remaining Hold: 0 (hold closed)
+
+ maxLength: 36
example: null
- meta:
- type: string
+ ledger_operation_timestamp:
+ type: integer
+ format: unix-time
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.
- maxLength: 65000
+ description: |-
+ Unix timestamp (in seconds) representing when the capture_authorization occurred in the upstream system.
+ Usage
Used for period attribution, grace-period eligibility, and reporting accuracy.
+ Note
Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.
example: null
- threshold:
+ metadata:
type: object
+ additionalProperties: true
deprecated: false
description: |
- The threshold configuration that defines when this alert fires.
- properties:
- mode:
- type: string
- deprecated: false
- description: |-
- How the threshold value is interpreted.
- * percentage - The threshold value represents a percentage of the plan quota (0–100).
- * absolute - The threshold value represents an absolute usage quantity.
- 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: 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.
- * 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.
- * not_equals - The subscription attribute must not equal the specified value.
- * 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.
- items:
- type: string
- deprecated: false
- maxLength: 50
- example: null
- example: null
+ 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.
example: null
required:
- - metered_feature_id
- - name
- - type
+ - amount
+ - authorization_id
+ - ledger_operation_timestamp
example: null
- encoding:
- filter_conditions:
- style: deepObject
- explode: true
- threshold:
- style: deepObject
- explode: true
+ encoding: {}
responses:
"200":
description: OK
@@ -175527,11 +177660,23 @@ paths:
schema:
type: object
properties:
- alert:
- $ref: "#/components/schemas/Alert"
- description: Resource object representing alert.
+ 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.
required:
- - alert
+ - ledger_account_balance
+ - ledger_operation
example: null
"400":
description: on error
@@ -175596,20 +177741,12 @@ paths:
deprecated: false
security:
- BasicAuth: []
- /subscriptions/{subscription-id}/alert_statuses:
+ /ledger_operations/{ledger-operation-id}:
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
+ summary: Retrieve ledger operation
+ description: |
+ Returns the details of a specific ledger operation by its unique identifier.
+ operationId: retrieve_ledger_operation
parameters:
- name: chargebee-request-origin-device
in: header
@@ -175693,25 +177830,189 @@ paths:
If the 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
example: null
- - name: subscription-id
+ - name: ledger-operation-id
in: path
required: true
deprecated: false
- $ref: "#/components/parameters/subscription-id"
+ $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
+ details of the operation including its type, amount, balance snapshot (start_balance, end_balance),
+ timestamps, 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.
+ operationId: list_grant_blocks
+ parameters:
+ - name: chargebee-request-origin-device
+ in: header
+ description: |
+ The device from which the customer has made the request
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ The device from which the customer has made the request
+ example: Android
+ - name: chargebee-request-origin-user
+ in: header
+ description: |
+ The email address of your customer/user. Use this when the email address has only ASCII characters.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ style: simple
+ explode: 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
+ - name: chargebee-request-origin-user-encoded
+ in: header
+ description: |
+ The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ format: email
+ description: |
+ The Base64-encoded email address of your customer/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
+ - name: chargebee-request-origin-ip
+ in: header
+ description: |
+ The IP address of the customer where the request originated
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ 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})))?::)))))$"
+ - name: chargebee-business-entity-id
+ in: header
+ description: |
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ required: false
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
+ schema:
+ type: string
+ description: |
+ If the 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
+ example: null
- name: limit
in: query
description: |
- optional, integer
-
- Maximum number of results to return.
-
- **Example →**
- *limit = 10*
+ 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"\*
required: false
style: form
explode: true
@@ -175726,9 +178027,11 @@ paths:
example: null
- name: offset
in: query
- description: |-
- optional, string
- Pagination cursor returned by a previous list call. Use the next_offset value from the previous response.
+ 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
@@ -175738,15 +178041,38 @@ paths:
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.
maxLength: 1000
example: null
- - name: alarm_status
+ - name: subscription_id
in: query
description: |
- optional, enumerated string filter
+ required, string filter
- Filter by [alarm_status](/docs/api/alert_statuses/alert-status-object#alarm_status) to find alerts in a specific runtime state.
+ Filters results by subscription identifier. This is the subscription whose grant blocks you are listing.
+
+ **Supported operators :** is
**Example →**
- *alarm_status\[is\] = "in_alarm"*
+ *subscription_id\[is\] = "1mGETgZVF2umUZq"*
+ 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
+ Filters results by unit identifier. For example, a credit unit id such as ai_credits.
+ Supported operators : is
+ Example →
+ unit_id[is] = "ai_credits"
required: false
deprecated: false
style: deepObject
@@ -175757,22 +178083,18 @@ paths:
properties:
is:
type: string
- description: |
- \* \`within_limit\` - WITHIN_LIMIT \* \`in_alarm\` - IN_ALARM
- enum:
- - within_limit
- - in_alarm
+ minLength: 1
example: null
example: null
- - name: alert_id
+ - name: effective_from
in: query
- description: |
- optional, string filter
-
- Filter by [alert_id](/docs/api/alert_statuses/alert-status-object#alert_id) to find the status for a specific alert.
-
- **Example →**
- *alert_id\[is\] = "alert___dev__3Nl7purV3LwbKYH"*
+ description: |-
+ optional, timestamp(UTC) in seconds filter
+ Filter by when blocks become effective (effective_from).
+ Supported operators : after, before, on, between (per
+ List operations).
+ Example →
+ effective_from[after] = "1765283483"
required: false
deprecated: false
style: deepObject
@@ -175781,9 +178103,136 @@ paths:
type: object
deprecated: false
properties:
- in:
+ after:
type: string
- pattern: "^\\[(.*)(,.*)*\\]$"
+ 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
+ Filter by grant expiry (expires_at).
+ Supported operators : after, before, on, between (per List
+ operations).
+ Example →
+ expires_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
+ Filter by when the grant block was persisted (created_at).
+ Supported operators : after, before, on, between.
+ Example →
+ created_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
+ Specifies the field used to sort the result set.
+ Supported attributes
+ created_at
+ effective_from
+ expires_at
+
+ Sort Order
+ asc (ascending order)
+ desc (descending order)
+
+ Example →
+ sort_by[desc] = "effective_from"
+ 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:
@@ -175799,20 +178248,18 @@ paths:
items:
type: object
properties:
- alert_status:
- $ref: "#/components/schemas/AlertStatus"
- description: Resource object representing alert_status
+ grant_block:
+ $ref: "#/components/schemas/GrantBlock"
+ description: Resource object representing grant_block
required:
- - alert_status
+ - grant_block
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.
+ 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:
@@ -175881,15 +178328,16 @@ paths:
deprecated: false
security:
- BasicAuth: []
- /alerts/{alert-id}/alert_statuses:
- get:
- summary: List alert statuses for an alert
+ /promotional_grants:
+ post:
+ summary: Create promotional grant
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.
- Prerequisites & Constraints
- - The
alert_id must reference a global alert. Subscription-scoped alerts return a 400 error since they apply to only one subscription — use Retrieve alert status instead.
-
- operationId: list_alert_statuses_for_an_alert
+ Issues promotional credits to a subscription's credit balance.
API Behavior
+ - Credits the specified
amount to the subscription's provisioned balance for the given unit_id.
+ - Creates one or more grant blocks to track the credit lifecycle, including balance, holds, expiry, and rollover.
+ - Creates ledger operations to record the credit movement.
+
Use Cases
Reward subscribers with bonus credits as part of a promotional campaign.
Compensate a subscription for service disruptions or overcharges.
The response returns the created ledger_operations and grant_blocks arrays.
+ operationId: create_promotional_grant
parameters:
- name: chargebee-request-origin-device
in: header
@@ -175958,92 +178406,131 @@ paths:
.){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
+ - name: chargebee-event-actions
in: header
description: |
- If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
+ skip all actions to be done on the events
required: false
deprecated: false
- $ref: "#/components/parameters/chargebee-business-entity-id"
+ $ref: "#/components/parameters/chargebee-event-actions"
style: simple
explode: false
schema:
type: string
description: |
- If the 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
+ skip all actions to be done on the events
+ enum:
+ - all-disabled
example: null
- - name: alert-id
- in: path
- required: true
+ - name: chargebee-event-email
+ in: header
+ description: |
+ skip only emails
+ required: false
deprecated: false
- $ref: "#/components/parameters/alert-id"
+ $ref: "#/components/parameters/chargebee-event-email"
style: simple
explode: false
schema:
type: string
- example: null
- - name: limit
- in: query
- description: |
- optional, integer
-
- Maximum number of results to return.
-
- **Example →**
- *limit = 25*
- required: false
- style: form
- explode: true
- schema:
- type: integer
- format: int32
- default: 10
description: |
- The number of resources to be returned.
- maximum: 100
- minimum: 1
+ skip only emails
+ enum:
+ - all-disabled
example: null
- - name: offset
- in: query
- description: |-
- optional, string
- Pagination cursor returned by a previous list call. Use the next_offset value from the previous response.
+ - name: chargebee-event-webhook
+ in: header
+ description: |
+ skip only webhooks
required: false
- style: form
- explode: true
+ deprecated: false
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ style: simple
+ explode: false
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.
- maxLength: 1000
+ skip only webhooks
+ enum:
+ - all-disabled
example: null
- - name: alarm_status
- in: query
+ - name: chargebee-business-entity-id
+ in: header
description: |
- optional, enumerated string filter
-
- Filter by [alarm_status](/docs/api/alert_statuses/alert-status-object#alarm_status) to find subscriptions in a specific runtime state.
-
- **Example →**
- *alarm_status\[is\] = "in_alarm"*
+ If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
required: false
deprecated: false
- style: deepObject
- explode: true
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ style: simple
+ explode: false
schema:
- type: object
- deprecated: false
- properties:
- is:
- type: string
- description: |
- \* \`within_limit\` - WITHIN_LIMIT \* \`in_alarm\` - IN_ALARM
- enum:
- - within_limit
- - in_alarm
- example: null
+ type: string
+ description: |
+ If the 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
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 promotional credits are applied.
+ maxLength: 50
+ example: null
+ unit_id:
+ type: string
+ deprecated: false
+ description: "Identifier of the credit unit to\
+ \ which these promotional credits belong. 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 issue as part of this promotional grant.
+ Pass this value as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Behavior
+ - Must be a positive value greater than zero.
+ - Credited to the subscription's provisioned balance for the specified unit.
+
+ maxLength: 36
+ example: null
+ expires_at:
+ type: integer
+ format: unix-time
+ deprecated: false
+ description: |-
+ Unix timestamp (in seconds) at which the promotional credits expire and become unavailable for consumption.
+ Behavior
+ - Once expired, the remaining balance in the associated grant block moves to
expired_amount.
+
+ Constraints
+ expires_at must be a future timestamp.
+
+ example: null
+ metadata:
+ type: object
+ additionalProperties: true
+ deprecated: false
+ description: |
+ Optional opaque JSON object carrying additional business context for this promotional grant. \*\*Behavior\*\* \* Stored as-is and returned verbatim by the system. \* Not interpreted, validated, or indexed by the system.
+ example: null
+ required:
+ - amount
+ - expires_at
+ - subscription_id
+ - unit_id
+ example: null
+ encoding: {}
responses:
"200":
description: OK
@@ -176052,29 +178539,34 @@ paths:
schema:
type: object
properties:
- list:
+ ledger_operations:
type: array
+ description: Records in the ledger_operations
+ array created as a result of this promotional grant. Each entry
+ reflects the credit movement into the subscription's balance.
items:
- type: object
- properties:
- alert_status:
- $ref: "#/components/schemas/AlertStatus"
- description: Resource object representing alert_status
- required:
- - alert_status
- example: null
+ $ref: "#/components/schemas/LedgerOperation"
+ description: Resource object representing ledger_operation
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
+ grant_blocks:
+ type: array
+ description: "Records in the grant_blocks array created for this promotional\
+ \ grant. Each block tracks the issued credits, remaining balance,\
+ \ holds, expiry, and rollover state for the subscription.
"
+ items:
+ $ref: "#/components/schemas/GrantBlock"
+ description: Resource object representing grant_block
example: null
required:
- - list
+ - grant_blocks
+ - ledger_operations
example: null
"400":
description: on error
@@ -182290,6 +184782,15 @@ components:
maximum: 50000
minimum: -50000
example: null
+ notes:
+ type: array
+ deprecated: false
+ items:
+ type: string
+ deprecated: false
+ maxLength: 3500
+ example: null
+ example: null
deleted:
type: boolean
deprecated: false
@@ -197619,80 +200120,162 @@ components:
example: null
GrantBlock:
type: object
+ description: "A grant block represents a bucket of issued credits associated\
+ \ with a specific subscription, unit_id, and unit_type, allocated either through\
+ \ an [item price](/docs/api/item_prices) or as a promotional grant.\n\nEach\
+ \ grant block follows its own lifecycle, governed by a defined policy that\
+ \ manages how the credits within the block are consumed, held, expired or\
+ \ rolled over. \n**Example**\n\nAn annual subscription plan grants **100\
+ \ AI credits every month** , resulting in a new grant block of 100 credits\
+ \ being allocated to the subscription at the start of **each grant cycle**.\n\
+ \nDuring its lifecycle, the block tracks usage through fields such as [**used_amount**](#used_amount),\
+ \ [**hold_amount**](#hold_amount), and the [**balance**](#balance).\n\nSince\
+ \ the grant frequency is monthly, each block has a **validity of one month**\
+ \ from its [**effective_from**](#effective_from) time, after which it expires.\
+ \ If a rollover policy is configured, any unused credits at [**expires_at**](#expires_at)\
+ \ may be carried forward into a new grant block; otherwise, they expire.\n\
+ \nThis 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 credits.\n\nGrant Blocks Lifecycle\n----------------------\n\
+ \nscreenshot\\|/images/grant_blocks_lifecycle.png\n\nLifecycle Of Credits\
+ \ In A Block\n-------------------------------\n\nscreenshot\\|/images/life_cycle_of_credits.png\n"
properties:
id:
type: string
deprecated: false
- maxLength: 40
+ 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
granted_amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ 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.
+ Returned 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Represents the remaining usable credits within this grant block, i.e., the portion of this specific block that is still available for consumption.
+ Returned 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Represents the portion of credit grants temporarily reserved by active authorization operations on this block, which are not yet captured or released.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Behavior
+ These 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).
+ 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Represents the total credits consumed from this block through consumption operations, specifically debits resulting from capture and capture_authorization.
+ Returned 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Represents the portion of credit grants in this block that expired without being consumed, rolled over, or voided.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Lifecycle Behavior
+ - The block becomes consumable at effective_from and remains directly usable until expires_at.
+ - After expires_at, the block enters the configured grace period.
+ - During this grace period, late-arriving operations with an operation_timestamp within the original validity window may still consume credits from this block.
+
+ Finalization
Once the grace period ends, any remaining unconsumed credits are finalized and recorded as expired_amount.
+ 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Represents the portion of credits carried forward from this block into a new rollover block during end-of-period processing.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Source vs Destination Behavior
+ - On the source block, this amount reflects the remaining balance that has been moved out and is no longer spendable.
+ - On the destination (rollover) block, the same amount is recorded under granted_amount as the value of the new block.
+
+ 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Represents the portion of credits removed from this block through administrative void operations.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Behavior
+ - Voided credits reduce the remaining balance of the block.
+ - They are not included in used_amount.
+
+ Reporting Semantics
Tracked separately to ensure usage reports and revenue reconciliation exclude voided credits while maintaining a complete audit trail.
+ 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.
+ Example
A block moves from scheduled → available → in_grace_period → exhausted over its lifecycle.
+ * available - The block is effective and credit grants are consumable subject to remaining balance and holds.
+ * exhausted - No usable credit grants remain; the block was fully consumed, expired, voided, or rolled over.
+ * in_grace_period - Past expires_at but within the configured grace period; limited consumption is still allowed for eligible
+ operations (those whose operation_timestamp falls within the original validity window).
+ * scheduled - The block exists but effective_from is still in the future, so credit grants are not yet spendable.
enum:
- available
- exhausted
@@ -197702,11 +200285,33 @@ components:
metadata:
type: string
deprecated: false
+ description: "Optional opaque JSON object carrying additional business context\
+ \ \n**Behavior**\n\n* Stored as-is and returned verbatim by the ledger.\n\
+ * Not interpreted, validated, or indexed by the ledger.\n"
maxLength: 65000
example: null
grant_source:
type: string
deprecated: false
+ description: |
+ Enumerated string indicating the event or action that resulted in these credit grants being issued.
+ \* promotional_grants -
+
+ Issued from a promotional or courtesy credit-grants program (for example, marketing offers or goodwill
+ credits).
+ \* rollover -
+
+ Issued by carrying forward unused credit grants from another block at end-of-period processing.
+ \* subscription_changed -
+
+ Issued in response to a subscription change that triggers a new allocation (for example, a plan or addon
+ update that adjusts the credit grants).
+ \* subscription_created -
+
+ Issued when the subscription was created (initial allocation as per the plan configuration).
+ \* top_up -
+
+ Issued from a top-up purchase or similar add-on credit-grant purchase made on top of the configured plan.
enum:
- subscription_created
- subscription_changed
@@ -197718,21 +200323,47 @@ components:
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
account_type:
type: string
deprecated: false
- maxLength: 50
+ description: |
+ The account this block belongs to: **provisioned** (credit grants issued per the plan, consumed first) or
+ **overdraft** (consumption beyond the configured credit grants, after the provisioned account is exhausted).
+ \* provisioned -
+
+ Stores the credit grants given as per the plan configuration. Consumption of credit grants is first done
+ through this account.
+ \* overdraft -
+
+ Allows consumption beyond the configured credit grants. Used once the credit grants in the provisioned account
+ are exhausted.
+ enum:
+ - provisioned
+ - overdraft
example: null
unit_id:
type: string
deprecated: false
- maxLength: 100
+ 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
- maxLength: 50
+ description: |-
+ Type of unit used for this balance. For example, credit_unit for credit grants.
+ * credit_unit - The unit represents a credit unit, the type used by credit grants.
+ enum:
+ - credit_unit
example: null
required:
- balance
@@ -198404,7 +201035,7 @@ components:
\* checkout_one_time -
Checkout one time
- \* update_payment_method - \* view_voucher -
+ \* view_voucher -
View Details of a voucher
\* pre_cancel -
@@ -198419,7 +201050,6 @@ components:
enum:
- checkout_new
- checkout_existing
- - update_payment_method
- manage_payment_sources
- collect_now
- extend_subscription
@@ -198490,6 +201120,18 @@ components:
For collect_now and manage_payment_sources, the URL expires 5 days after creation.
example: null
+ layout:
+ type: string
+ deprecated: false
+ description: |-
+ Specifies the UI layout for the hosted page.
+ Applicable only when type is checkout_new, checkout_existing, checkout_one_time, or manage_payment_sources.
+ * in_app - The hosted page is rendered in the in-app layout.
+ * full_page - The hosted page is rendered in the full-page layout.
+ enum:
+ - in_app
+ - full_page
+ example: null
content:
type: object
additionalProperties: true
@@ -203866,26 +206508,20 @@ components:
The service sold at a monthly rate determined by the following stairstep pricing model:
+
+ - 1-10 users for EUR 10
+ - 11-25 users for EUR 20
+ - 26-50 users for EUR 45
+ - 51 and above for EUR 100
+
-
- 1-10 users for EUR 10
-
-
- 11-25 users for EUR 20
-
-
- 26-50 users for EUR 45
-
-
- 51 and above for EUR 100
-
- The billing period
- of an item price (only applies to plan-item prices and addon-item prices), is the period
- of the item price in period_unit
- s. An item can have only one item price for a given currency and billing period.
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:
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:
- Plan-item prices
- Addon-item prices
- Charge-item prices
+
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.
+ - When price variants are not enabled, an item can have only one item price for a given currency and billing period.
+ - When price variants are enabled, an item can have multiple item prices for the same currency and billing period, as long as each has a distinct
price_variant_id. An item price created without a price_variant_id is treated as the default ("no variant"), and only one such default item price can exist for a given currency and billing period.
properties:
id:
@@ -204991,20 +207627,42 @@ components:
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 as a promotional grant, 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
+ (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:
+ - provisioned_balance: Reflects the credit grants given through the configured item price or promotional grants. These are prepaid credit grants for which the customer has already paid.
+ Any ledger operation will prioritize consuming this balance first.
+ - overdraft_balance: Reflects the extra limit provided to a subscription in case it exhausts all credit grants before they are renewed or refreshed.
+ Any ledger operation will consume this balance only when the provisioned balance has been exhausted.
+
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.pngReturned 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.
maxLength: 50
example: null
unit_id:
type: string
deprecated: false
- maxLength: 100
+ 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.
+ \* credit_unit -
+
+ The unit represents a credit unit, the type used by credit grants.
enum:
- credit_unit
example: null
@@ -205012,31 +207670,42 @@ components:
type: integer
format: unix-time
deprecated: false
+ description: |
+ Unix timestamp (seconds) when the balance was last updated. For example, after [capture](/docs/api/ledger_operations/capture) or [authorize](/docs/api/ledger_operations/authorize).
example: null
provisioned_balance:
type: object
deprecated: false
+ description: |
+ Stores credit grants given through the configured item price. Used first before overdraft.
properties:
total_balance:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Total granted credits remaining, including held amounts.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ total_balance = usable_balance + hold_amount
+ 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Credits available for immediate use (excludes held amount).
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Example: If total_balance is 70 and hold_amount is 5, usable_balance is 65.
+ maxLength: 36
example: null
hold_amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Credits reserved for in-progress operations (e.g., authorize); not currently usable.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ 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
@@ -205046,46 +207715,75 @@ components:
overdraft_balance:
type: object
deprecated: false
+ description: |
+ Extra credit available after provisioned balance is exhausted.
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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Maximum overdraft allowed. Present only when overdraft_balance.is_unlimited is false.
+ Returned 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Total granted credits remaining, including held amounts.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Example: If limit is 25 and used_amount is 10, the remaining overdraft capacity is 15.
+ maxLength: 36
example: null
usable_balance:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Remaining overdraft available for use.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Usable Balance (Only if Capped): limit - used_amount - hold_amount.
+ maxLength: 36
example: null
used_amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Credits already consumed from overdraft.
+ Returned 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Overdraft credits reserved for in-progress operations.
+ Returned 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
@@ -205099,87 +207797,237 @@ components:
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
- maxLength: 40
+ 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
type:
type: string
deprecated: false
- maxLength: 50
+ description: |-
+ Specifies the type of ledger operation, indicating the kind of business event this record represents.
+ Types
External Ledger Operations: Triggered via API calls
+ authorize
+ capture
+ capture_authorization
+ release_authorization
+
Internal Ledger Operations: Triggered via system processes
+ allocation
+ expiry
+ rollover
+ void
+ adjustment
+
+ * authorize - Reserves credit grants (moves from usable_balance to hold_amount) for later capture or release.
+ * release_authorization - Returns a hold to the usable balance, or finalizes an auto-release of the hold.
+ * allocation - Credits issued into an account, such as allocations created from configured credit grants or promotional grants.
+ * void - Credits removed from a grant block through administrative updates.
+ * rollover - Carry-forward of balance into a new grant block or related rollover run.
+ * capture - Immediate one-step debit of credit grants from the usable balance.
+ * expiry - Credit grants expired from a grant block (and related account movements).
+ * capture_authorization - Finalizes a hold, converting all or part of the held amount into a final debit; any remainder can be
+ auto-released.
+ * 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: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ Represents the quantity of credit grants affected by this ledger operation.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Behavior by Ledger Operation Type
+ capture: Credits debited from the account immediately.
+ authorize: Credits reserved, moving from usable balance to held amount.
+ capture_authorization: Credits finalized as consumption (converted from held to debited); any remaining held credits are automatically released.
+ release_authorization: Credits released from hold back to the usable balance.
+ expiry: Credits that have lapsed after the validity and grace period.
+ rollover: Credits carried forward into a new grant block.
+ void: Credits removed through administrative updates.
+
+ maxLength: 36
example: null
start_balance:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ The usable credit balance immediately before this ledger operation was applied.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Usage
Use alongside end_balance to trace exactly how each ledger operation moved the balance over time.
+ maxLength: 36
example: null
end_balance:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ The usable credit balance immediately after this ledger operation was applied.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ Usage
Use alongside start_balance to trace exactly how each ledger operation moved the balance over time.
+ maxLength: 36
+ example: null
+ provisioned_start_balance:
+ type: string
+ deprecated: false
+ description: |-
+ The provisioned account balance immediately before this ledger operation was applied.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ 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.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ 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.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ 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.
+ Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
+ 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.
+ Usage
+ - Present on
capture_authorization and release_authorization ledger operations to identify the hold being finalized or released.
+ - Also present on internally generated release ledger operations (for example, partial-capture remainders) to correlate them back to the original authorization.
+
+ Constraints
+ - Must match the
ledger_operation_id used in the original authorize call.
+ - The same value should be reused across retries.
+
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.
+ Note
Late or out-of-order submissions appear in arrival order, while attribution and eligibility logic rely on ledger_operation_timestamp.
+ Constraints
+ - The
ledger_operation_timestamp must be within the last 10 minutes from the time of the request.
+ - Grant blocks outside their active window (including those in the grace period) are not eligible for authorization and are excluded from balance checks for this ledger operation.
+
example: null
auto_release_timestamp:
type: integer
format: unix-time
deprecated: false
+ description: "Unix timestamp (in seconds) indicating when an unfinalized\
+ \ hold 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 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: string
deprecated: false
+ description: "Optional opaque JSON object carrying additional business context\
+ \ \n**Behavior**\n\n* Stored as-is and returned verbatim by the system.\n\
+ * Not interpreted, validated, or indexed by the system.\n"
maxLength: 65000
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
subscription_id:
type: string
deprecated: false
- maxLength: 100
+ description: |
+ A unique, immutable identifier for the [subscription](/docs/api/subscriptions/subscription-object#id) against which this ledger operation was recorded.
+ 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
- maxLength: 50
+ description: |
+ Type of unit used for this ledger operation.
+ \* credit_unit -
+
+ The unit represents a credit unit, the type used by credit grants.
+ enum:
+ - credit_unit
example: null
required:
- amount
- end_balance
- id
+ - overdraft_end_balance
+ - overdraft_start_balance
+ - provisioned_end_balance
+ - provisioned_start_balance
- start_balance
- type
example: null
@@ -216467,6 +219315,11 @@ components:
Represents a platform account in Chargebee.
Each 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
@@ -216488,8 +219341,14 @@ components:
Description of the partner associated with this platform account. Maximum length is 250 characters.
maxLength: 250
example: null
+ settings_json:
+ type: string
+ deprecated: false
+ maxLength: 65000
+ example: null
required:
- id
+ - site_id
example: null
PortalSession:
type: object
@@ -217687,32 +220546,70 @@ components:
example: null
PromotionalGrant:
type: object
+ description: "A promotional\
+ \ grant adds credits to a subscription's credit balance. Each grant creates\
+ \ grant blocks to track the credit lifecycle and ledger operations to record the credit movement.
Example
A subscription receives 50\
+ \ bonus AI credits as part of a promotional campaign. The grant credits\
+ \ the subscription's provisioned balance for the ai_credits unit, creates a\
+ \ grant block to track the credit lifecycle including expiry,\
+ \ and records the credit movement as ledger operations.
Use Cases
Reward subscribers with bonus credits
Reward subscribers with\
+ \ bonus credits as part of a promotional campaign.
Compensate for service disruptions\
+ \ or overcharges
Compensate a subscription for service disruptions or overcharges.
"
properties:
subscription_id:
type: string
deprecated: false
+ description: |
+ A unique, immutable identifier for the [subscription](/docs/api/subscriptions/subscription-object#id) to which the promotional credits were applied.
maxLength: 50
example: null
unit_id:
type: string
deprecated: false
- maxLength: 100
+ description: "Identifier of the credit unit to which the\
+ \ promotional credits belong. For example, a credit unit id such as ai_credits.
"
+ maxLength: 50
example: null
amount:
- type: number
- format: decimal
+ type: string
deprecated: false
- maximum: 10000000000000000000000000
- minimum: 0
+ description: |-
+ The number of credits issued as part of this promotional grant.
+ Returned 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
expires_at:
type: integer
format: unix-time
deprecated: false
+ description: |-
+ Unix timestamp (in seconds) at which the promotional credits expire and become unavailable for consumption.
+ Behavior
+ Once expired, the remaining balance in the associated grant block moves to expired_amount.
example: null
- meta_data:
+ metadata:
type: string
deprecated: false
+ description: "Optional opaque JSON object carrying additional business context\
+ \ for this promotional grant. \n**Behavior**\n\n* Stored as-is and returned\
+ \ verbatim by the system.\n* Not interpreted, validated, or indexed by\
+ \ the system.\n"
maxLength: 65000
example: null
required:
@@ -225761,6 +228658,16 @@ components:
- migration
- external_service
example: null
+ Status:
+ type: string
+ default: available
+ deprecated: false
+ enum:
+ - available
+ - exhausted
+ - scheduled
+ - in_grace_period
+ example: null
Subscription:
type: object
additionalProperties: true
diff --git a/spec/chargebee_sdk_spec.json b/spec/chargebee_sdk_spec.json
index 72bddc15..1b7d9722 100644
--- a/spec/chargebee_sdk_spec.json
+++ b/spec/chargebee_sdk_spec.json
@@ -7,7 +7,7 @@
"url" : "https://www.chargebee.com",
"email" : "support@chargebee.com"
},
- "version" : "2026-06-08.8b15a3575b64635c16a22ad29253d68a470d2304",
+ "version" : "2026-06-12.a49b34edd262e3e190bd6d8616ff9e401c37bd21",
"x-cb-api-version" : 2,
"x-cb-product-catalog-version" : 2
},
@@ -52145,14 +52145,14 @@
"x-cb-sdk-filter-name" : "StringFilter",
"x-cb-sort-order" : 2,
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
},
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
}
}
@@ -52184,14 +52184,14 @@
"x-cb-is-api-column" : true,
"x-cb-sdk-filter-name" : "StringFilter",
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
},
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
}
}
@@ -73202,7 +73202,7 @@
}
}
},
- "deprecated" : false,
+ "deprecated" : true,
"security" : [ {
"BasicAuth" : [ ]
} ],
@@ -74565,9 +74565,9 @@
"properties" : {
"is" : {
"type" : "string",
- "description" : "* `checkout_new` - Checkout new Subscription\n* `checkout_existing` - Checkout existing Subscription\n* `update_card` - **(Deprecated)** Update Card for a Customer\n* `update_payment_method` - Update Payment Method for a Customer\n* `manage_payment_sources` - Manage Payments for a customer\n* `collect_now` - Collect Unpaid Invoices for a Customer\n* `extend_subscription` - To extend a Subscription period\n* `checkout_one_time` - Checkout one time\n* `pre_cancel` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription.\n* `view_voucher` - View Details of a voucher\n* `accept_quote` - Accept Quote",
+ "description" : "* `checkout_new` - Checkout new Subscription\n* `checkout_existing` - Checkout existing Subscription\n* `update_card` - **(Deprecated)** Update Card for a Customer\n* `update_payment_method` - **(Deprecated)** Update Payment Method for a Customer\n* `manage_payment_sources` - Manage Payments for a customer\n* `collect_now` - Collect Unpaid Invoices for a Customer\n* `extend_subscription` - To extend a Subscription period\n* `checkout_one_time` - Checkout one time\n* `pre_cancel` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription.\n* `view_voucher` - View Details of a voucher\n* `accept_quote` - Accept Quote",
"enum" : [ "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" ],
- "x-cb-deprecated-enum-values" : "update_card",
+ "x-cb-deprecated-enum-values" : "update_card,update_payment_method",
"x-cb-is-external-enum" : false,
"x-cb-is-api-column" : true,
"x-cb-is-gen-separate" : false,
@@ -74576,9 +74576,9 @@
},
"is_not" : {
"type" : "string",
- "description" : "* `checkout_new` - Checkout new Subscription\n* `checkout_existing` - Checkout existing Subscription\n* `update_card` - **(Deprecated)** Update Card for a Customer\n* `update_payment_method` - Update Payment Method for a Customer\n* `manage_payment_sources` - Manage Payments for a customer\n* `collect_now` - Collect Unpaid Invoices for a Customer\n* `extend_subscription` - To extend a Subscription period\n* `checkout_one_time` - Checkout one time\n* `pre_cancel` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription.\n* `view_voucher` - View Details of a voucher\n* `accept_quote` - Accept Quote",
+ "description" : "* `checkout_new` - Checkout new Subscription\n* `checkout_existing` - Checkout existing Subscription\n* `update_card` - **(Deprecated)** Update Card for a Customer\n* `update_payment_method` - **(Deprecated)** Update Payment Method for a Customer\n* `manage_payment_sources` - Manage Payments for a customer\n* `collect_now` - Collect Unpaid Invoices for a Customer\n* `extend_subscription` - To extend a Subscription period\n* `checkout_one_time` - Checkout one time\n* `pre_cancel` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription.\n* `view_voucher` - View Details of a voucher\n* `accept_quote` - Accept Quote",
"enum" : [ "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" ],
- "x-cb-deprecated-enum-values" : "update_card",
+ "x-cb-deprecated-enum-values" : "update_card,update_payment_method",
"x-cb-is-external-enum" : false,
"x-cb-is-api-column" : true,
"x-cb-is-gen-separate" : false,
@@ -74587,9 +74587,9 @@
},
"in" : {
"type" : "string",
- "description" : "* `checkout_new` - Checkout new Subscription\n* `checkout_existing` - Checkout existing Subscription\n* `update_card` - **(Deprecated)** Update Card for a Customer\n* `update_payment_method` - Update Payment Method for a Customer\n* `manage_payment_sources` - Manage Payments for a customer\n* `collect_now` - Collect Unpaid Invoices for a Customer\n* `extend_subscription` - To extend a Subscription period\n* `checkout_one_time` - Checkout one time\n* `pre_cancel` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription.\n* `view_voucher` - View Details of a voucher\n* `accept_quote` - Accept Quote",
+ "description" : "* `checkout_new` - Checkout new Subscription\n* `checkout_existing` - Checkout existing Subscription\n* `update_card` - **(Deprecated)** Update Card for a Customer\n* `update_payment_method` - **(Deprecated)** Update Payment Method for a Customer\n* `manage_payment_sources` - Manage Payments for a customer\n* `collect_now` - Collect Unpaid Invoices for a Customer\n* `extend_subscription` - To extend a Subscription period\n* `checkout_one_time` - Checkout one time\n* `pre_cancel` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription.\n* `view_voucher` - View Details of a voucher\n* `accept_quote` - Accept Quote",
"enum" : [ "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" ],
- "x-cb-deprecated-enum-values" : "update_card",
+ "x-cb-deprecated-enum-values" : "update_card,update_payment_method",
"x-cb-is-external-enum" : false,
"x-cb-is-api-column" : true,
"x-cb-is-gen-separate" : false,
@@ -74599,9 +74599,9 @@
},
"not_in" : {
"type" : "string",
- "description" : "* `checkout_new` - Checkout new Subscription\n* `checkout_existing` - Checkout existing Subscription\n* `update_card` - **(Deprecated)** Update Card for a Customer\n* `update_payment_method` - Update Payment Method for a Customer\n* `manage_payment_sources` - Manage Payments for a customer\n* `collect_now` - Collect Unpaid Invoices for a Customer\n* `extend_subscription` - To extend a Subscription period\n* `checkout_one_time` - Checkout one time\n* `pre_cancel` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription.\n* `view_voucher` - View Details of a voucher\n* `accept_quote` - Accept Quote",
+ "description" : "* `checkout_new` - Checkout new Subscription\n* `checkout_existing` - Checkout existing Subscription\n* `update_card` - **(Deprecated)** Update Card for a Customer\n* `update_payment_method` - **(Deprecated)** Update Payment Method for a Customer\n* `manage_payment_sources` - Manage Payments for a customer\n* `collect_now` - Collect Unpaid Invoices for a Customer\n* `extend_subscription` - To extend a Subscription period\n* `checkout_one_time` - Checkout one time\n* `pre_cancel` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription.\n* `view_voucher` - View Details of a voucher\n* `accept_quote` - Accept Quote",
"enum" : [ "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" ],
- "x-cb-deprecated-enum-values" : "update_card",
+ "x-cb-deprecated-enum-values" : "update_card,update_payment_method",
"x-cb-is-external-enum" : false,
"x-cb-is-api-column" : true,
"x-cb-is-gen-separate" : false,
@@ -109275,14 +109275,14 @@
"x-cb-sdk-filter-name" : "StringFilter",
"x-cb-sort-order" : 17,
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
},
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
}
}
@@ -135260,14 +135260,14 @@
"x-cb-sdk-filter-name" : "StringFilter",
"x-cb-sort-order" : 14,
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
},
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
}
}
@@ -157998,14 +157998,14 @@
"x-cb-sdk-filter-name" : "StringFilter",
"x-cb-sort-order" : 2,
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
},
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
}
}
@@ -158031,7 +158031,7 @@
"x-cb-sdk-filter-name" : "EnumFilter",
"x-cb-sort-order" : 3,
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
"description" : "* `plan` - Plan\n* `addon` - Addon\n* `charge` - Charge\n* `plan_price` - Plan Price\n* `addon_price` - Addon Price",
"enum" : [ "plan", "addon", "charge", "plan_price", "addon_price" ],
@@ -158039,10 +158039,9 @@
"x-cb-is-api-column" : true,
"x-cb-is-gen-separate" : false,
"x-cb-sdk-enum-api-name" : "EntityType",
- "pattern" : "^\\[(plan|addon|charge|plan_price|addon_price)(,(plan|addon|charge|plan_price|addon_price))*\\]$",
"example" : null
},
- "is" : {
+ "in" : {
"type" : "string",
"description" : "* `plan` - Plan\n* `addon` - Addon\n* `charge` - Charge\n* `plan_price` - Plan Price\n* `addon_price` - Addon Price",
"enum" : [ "plan", "addon", "charge", "plan_price", "addon_price" ],
@@ -158050,6 +158049,7 @@
"x-cb-is-api-column" : true,
"x-cb-is-gen-separate" : false,
"x-cb-sdk-enum-api-name" : "EntityType",
+ "pattern" : "^\\[(plan|addon|charge|plan_price|addon_price)(,(plan|addon|charge|plan_price|addon_price))*\\]$",
"example" : null
}
}
@@ -158075,14 +158075,14 @@
"x-cb-sdk-filter-name" : "StringFilter",
"x-cb-sort-order" : 4,
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
},
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
}
}
@@ -168502,7 +168502,7 @@
"x-cb-is-multi-value-attribute" : false,
"x-cb-sort-order" : 3,
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
"description" : "* `scheduled` - Status of the subscription schedule on creation. \n* `succeeded` - The execution status of the schedule if success. \n* `failed` - The execution status of the schedule if failed. \n* `draft` - Status of the subscription schedule considering as draft",
"enum" : [ "scheduled", "succeeded", "failed", "draft" ],
@@ -168510,10 +168510,9 @@
"x-cb-is-api-column" : true,
"x-cb-is-gen-separate" : false,
"x-cb-sdk-enum-api-name" : "Status",
- "pattern" : "^\\[(scheduled|succeeded|failed|draft)(,(scheduled|succeeded|failed|draft))*\\]$",
"example" : null
},
- "is" : {
+ "in" : {
"type" : "string",
"description" : "* `scheduled` - Status of the subscription schedule on creation. \n* `succeeded` - The execution status of the schedule if success. \n* `failed` - The execution status of the schedule if failed. \n* `draft` - Status of the subscription schedule considering as draft",
"enum" : [ "scheduled", "succeeded", "failed", "draft" ],
@@ -168521,6 +168520,7 @@
"x-cb-is-api-column" : true,
"x-cb-is-gen-separate" : false,
"x-cb-sdk-enum-api-name" : "Status",
+ "pattern" : "^\\[(scheduled|succeeded|failed|draft)(,(scheduled|succeeded|failed|draft))*\\]$",
"example" : null
}
}
@@ -168546,14 +168546,14 @@
"x-cb-sdk-filter-name" : "StringFilter",
"x-cb-sort-order" : 4,
"properties" : {
- "in" : {
+ "is" : {
"type" : "string",
- "pattern" : "^\\[(.*)(,.*)*\\]$",
+ "minLength" : 1,
"example" : null
},
- "is" : {
+ "in" : {
"type" : "string",
- "minLength" : 1,
+ "pattern" : "^\\[(.*)(,.*)*\\]$",
"example" : null
}
}
@@ -177063,6 +177063,30 @@
}
}
}
+ }, {
+ "name" : "sort_by",
+ "in" : "query",
+ "required" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "additionalProperties" : true,
+ "x-cb-sort-order" : 10,
+ "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",
@@ -184318,10 +184342,2301 @@
"x-cb-sdk-method-name" : "alertStatusesForAlert"
}
},
- "/customers/{customer-id}/import_subscription" : {
+ "/ledger_account_balances" : {
+ "get" : {
+ "summary" : "List Ledger Account Balances",
+ "operationId" : "list_ledger_account_balances",
+ "parameters" : [ {
+ "description" : "The device from which the customer has made the request",
+ "$ref" : "#/components/parameters/chargebee-request-origin-device"
+ }, {
+ "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user"
+ }, {
+ "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded"
+ }, {
+ "description" : "The IP address of the customer where the request originated",
+ "$ref" : "#/components/parameters/chargebee-request-origin-ip"
+ }, {
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id"
+ }, {
+ "$ref" : "#/components/parameters/limit"
+ }, {
+ "$ref" : "#/components/parameters/offset"
+ }, {
+ "name" : "subscription_id",
+ "in" : "query",
+ "required" : true,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "description" : "Subscription id.",
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "StringFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 2,
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
+ }
+ },
+ "example" : null
+ }
+ }, {
+ "name" : "unit_id",
+ "in" : "query",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "description" : "Unit id.",
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "StringFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 3,
+ "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" : [ ]
+ } ],
+ "x-cb-resource-id" : "ledger_account_balance",
+ "x-cb-sort-order" : 0,
+ "x-cb-module" : "credit-grants",
+ "x-cb-operation-is-list" : true,
+ "x-cb-operation-method-name" : "listLedgerAccountBalances",
+ "x-cb-is-operation-needs-input-object" : true,
+ "x-cb-is-operation-needs-json-input" : true,
+ "x-cb-sdk-method-name" : "listLedgerAccountBalances"
+ }
+ },
+ "/ledger_operations/release_authorization" : {
"post" : {
- "summary" : "Import subscription for customer",
- "operationId" : "import_subscription_for_customer",
+ "summary" : "Release authorization",
+ "operationId" : "release_authorization",
+ "parameters" : [ {
+ "description" : "The device from which the customer has made the request",
+ "$ref" : "#/components/parameters/chargebee-request-origin-device"
+ }, {
+ "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user"
+ }, {
+ "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded"
+ }, {
+ "description" : "The IP address of the customer where the request originated",
+ "$ref" : "#/components/parameters/chargebee-request-origin-ip"
+ }, {
+ "description" : "skip all actions to be done on the events",
+ "$ref" : "#/components/parameters/chargebee-event-actions"
+ }, {
+ "description" : "skip only emails",
+ "$ref" : "#/components/parameters/chargebee-event-email"
+ }, {
+ "description" : " skip only webhooks",
+ "$ref" : "#/components/parameters/chargebee-event-webhook"
+ }, {
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id"
+ } ],
+ "requestBody" : {
+ "content" : {
+ "application/x-www-form-urlencoded" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "authorization_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 0,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 1,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "ledger_operation_timestamp" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 2,
+ "example" : null
+ },
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : true,
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 3,
+ "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" : "Resource object representing ledger_operation"
+ },
+ "ledger_account_balance" : {
+ "$ref" : "#/components/schemas/LedgerAccountBalance",
+ "description" : "Resource object representing ledger_account_balance"
+ }
+ },
+ "required" : [ "ledger_account_balance", "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" : [ ]
+ } ],
+ "x-cb-resource-id" : "ledger_operation",
+ "x-cb-sort-order" : 5,
+ "x-cb-module" : "credit-grants",
+ "x-cb-operation-method-name" : "releaseAuthorization",
+ "x-cb-is-operation-needs-input-object" : true,
+ "x-cb-is-operation-needs-json-input" : true,
+ "x-cb-sdk-method-name" : "releaseAuthorization"
+ }
+ },
+ "/ledger_operations/capture" : {
+ "post" : {
+ "summary" : "Capture",
+ "operationId" : "capture",
+ "parameters" : [ {
+ "description" : "The device from which the customer has made the request",
+ "$ref" : "#/components/parameters/chargebee-request-origin-device"
+ }, {
+ "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user"
+ }, {
+ "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded"
+ }, {
+ "description" : "The IP address of the customer where the request originated",
+ "$ref" : "#/components/parameters/chargebee-request-origin-ip"
+ }, {
+ "description" : "skip all actions to be done on the events",
+ "$ref" : "#/components/parameters/chargebee-event-actions"
+ }, {
+ "description" : "skip only emails",
+ "$ref" : "#/components/parameters/chargebee-event-email"
+ }, {
+ "description" : " skip only webhooks",
+ "$ref" : "#/components/parameters/chargebee-event-webhook"
+ }, {
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id"
+ } ],
+ "requestBody" : {
+ "content" : {
+ "application/x-www-form-urlencoded" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 0,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "subscription_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 1,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "unit_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 2,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 3,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "ledger_operation_timestamp" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 4,
+ "example" : null
+ },
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : true,
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 5,
+ "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" : "Resource object representing ledger_operation"
+ },
+ "ledger_account_balance" : {
+ "$ref" : "#/components/schemas/LedgerAccountBalance",
+ "description" : "Resource object representing ledger_account_balance"
+ }
+ },
+ "required" : [ "ledger_account_balance", "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" : [ ]
+ } ],
+ "x-cb-resource-id" : "ledger_operation",
+ "x-cb-sort-order" : 2,
+ "x-cb-module" : "credit-grants",
+ "x-cb-operation-method-name" : "capture",
+ "x-cb-is-operation-needs-input-object" : true,
+ "x-cb-is-operation-needs-json-input" : true,
+ "x-cb-sdk-method-name" : "capture"
+ }
+ },
+ "/ledger_operations/authorize" : {
+ "post" : {
+ "summary" : "Authorize",
+ "operationId" : "authorize",
+ "parameters" : [ {
+ "description" : "The device from which the customer has made the request",
+ "$ref" : "#/components/parameters/chargebee-request-origin-device"
+ }, {
+ "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user"
+ }, {
+ "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded"
+ }, {
+ "description" : "The IP address of the customer where the request originated",
+ "$ref" : "#/components/parameters/chargebee-request-origin-ip"
+ }, {
+ "description" : "skip all actions to be done on the events",
+ "$ref" : "#/components/parameters/chargebee-event-actions"
+ }, {
+ "description" : "skip only emails",
+ "$ref" : "#/components/parameters/chargebee-event-email"
+ }, {
+ "description" : " skip only webhooks",
+ "$ref" : "#/components/parameters/chargebee-event-webhook"
+ }, {
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id"
+ } ],
+ "requestBody" : {
+ "content" : {
+ "application/x-www-form-urlencoded" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 0,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "subscription_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 1,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "unit_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 2,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 3,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "ledger_operation_timestamp" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 4,
+ "example" : null
+ },
+ "auto_release_timestamp" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 5,
+ "example" : null
+ },
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : true,
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 6,
+ "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" : "Resource object representing ledger_operation"
+ },
+ "ledger_account_balance" : {
+ "$ref" : "#/components/schemas/LedgerAccountBalance",
+ "description" : "Resource object representing ledger_account_balance"
+ }
+ },
+ "required" : [ "ledger_account_balance", "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" : [ ]
+ } ],
+ "x-cb-resource-id" : "ledger_operation",
+ "x-cb-sort-order" : 3,
+ "x-cb-module" : "credit-grants",
+ "x-cb-operation-method-name" : "authorize",
+ "x-cb-is-operation-needs-input-object" : true,
+ "x-cb-is-operation-needs-json-input" : true,
+ "x-cb-sdk-method-name" : "authorize"
+ }
+ },
+ "/ledger_operations" : {
+ "get" : {
+ "summary" : "List Ledger Operations",
+ "operationId" : "list_ledger_operations",
+ "parameters" : [ {
+ "description" : "The device from which the customer has made the request",
+ "$ref" : "#/components/parameters/chargebee-request-origin-device"
+ }, {
+ "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user"
+ }, {
+ "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded"
+ }, {
+ "description" : "The IP address of the customer where the request originated",
+ "$ref" : "#/components/parameters/chargebee-request-origin-ip"
+ }, {
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id"
+ }, {
+ "$ref" : "#/components/parameters/limit"
+ }, {
+ "$ref" : "#/components/parameters/offset"
+ }, {
+ "name" : "subscription_id",
+ "in" : "query",
+ "required" : true,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "description" : "Subscription id.",
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "StringFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 2,
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
+ }
+ },
+ "example" : null
+ }
+ }, {
+ "name" : "unit_id",
+ "in" : "query",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "description" : "Unit id.",
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "StringFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 3,
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
+ }
+ },
+ "example" : null
+ }
+ }, {
+ "name" : "created_at",
+ "in" : "query",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-meta-model-name" : "ledger_operations",
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "TimestampFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 4,
+ "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",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "description" : "The type of Ledger operation",
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-multi-value-attribute" : true,
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-meta-model-name" : "ledger_operations",
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "EnumFilter",
+ "x-cb-sort-order" : 5,
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "description" : "* `allocation` - Allocation Operation\n* `capture` - Capture Operation\n* `authorize` - Authorization Operation\n* `release_authorization` - Release Authorization Operation\n* `capture_authorization` - Capture Authorization Operation\n* `expiry` - Expiry Operation\n* `void` - Void Operation\n* `rollover` - Rollover Operation\n* `adjustment` - Overdraft Adjustment Operation",
+ "enum" : [ "allocation", "capture", "authorize", "release_authorization", "capture_authorization", "expiry", "void", "rollover", "adjustment" ],
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-gen-separate" : false,
+ "x-cb-sdk-enum-api-name" : "Type",
+ "example" : null
+ },
+ "in" : {
+ "type" : "string",
+ "description" : "* `allocation` - Allocation Operation\n* `capture` - Capture Operation\n* `authorize` - Authorization Operation\n* `release_authorization` - Release Authorization Operation\n* `capture_authorization` - Capture Authorization Operation\n* `expiry` - Expiry Operation\n* `void` - Void Operation\n* `rollover` - Rollover Operation\n* `adjustment` - Overdraft Adjustment Operation",
+ "enum" : [ "allocation", "capture", "authorize", "release_authorization", "capture_authorization", "expiry", "void", "rollover", "adjustment" ],
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-gen-separate" : false,
+ "x-cb-sdk-enum-api-name" : "Type",
+ "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
+ }
+ },
+ "example" : null
+ }
+ }, {
+ "name" : "sort_by",
+ "in" : "query",
+ "required" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "additionalProperties" : true,
+ "x-cb-sort-order" : 6,
+ "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" : [ ]
+ } ],
+ "x-cb-resource-id" : "ledger_operation",
+ "x-cb-sort-order" : 1,
+ "x-cb-module" : "credit-grants",
+ "x-cb-operation-is-list" : true,
+ "x-cb-operation-method-name" : "listLedgerOperations",
+ "x-cb-is-operation-needs-input-object" : true,
+ "x-cb-is-operation-needs-json-input" : true,
+ "x-cb-sdk-method-name" : "listLedgerOperations"
+ }
+ },
+ "/ledger_operations/capture_authorization" : {
+ "post" : {
+ "summary" : "Capture authorization",
+ "operationId" : "capture_authorization",
+ "parameters" : [ {
+ "description" : "The device from which the customer has made the request",
+ "$ref" : "#/components/parameters/chargebee-request-origin-device"
+ }, {
+ "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user"
+ }, {
+ "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded"
+ }, {
+ "description" : "The IP address of the customer where the request originated",
+ "$ref" : "#/components/parameters/chargebee-request-origin-ip"
+ }, {
+ "description" : "skip all actions to be done on the events",
+ "$ref" : "#/components/parameters/chargebee-event-actions"
+ }, {
+ "description" : "skip only emails",
+ "$ref" : "#/components/parameters/chargebee-event-email"
+ }, {
+ "description" : " skip only webhooks",
+ "$ref" : "#/components/parameters/chargebee-event-webhook"
+ }, {
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id"
+ } ],
+ "requestBody" : {
+ "content" : {
+ "application/x-www-form-urlencoded" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "authorization_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 0,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 1,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 2,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "ledger_operation_timestamp" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 3,
+ "example" : null
+ },
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : true,
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 4,
+ "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" : "Resource object representing ledger_operation"
+ },
+ "ledger_account_balance" : {
+ "$ref" : "#/components/schemas/LedgerAccountBalance",
+ "description" : "Resource object representing ledger_account_balance"
+ }
+ },
+ "required" : [ "ledger_account_balance", "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" : [ ]
+ } ],
+ "x-cb-resource-id" : "ledger_operation",
+ "x-cb-sort-order" : 4,
+ "x-cb-module" : "credit-grants",
+ "x-cb-operation-method-name" : "captureAuthorization",
+ "x-cb-is-operation-needs-input-object" : true,
+ "x-cb-is-operation-needs-json-input" : true,
+ "x-cb-sdk-method-name" : "captureAuthorization"
+ }
+ },
+ "/ledger_operations/{ledger-operation-id}" : {
+ "get" : {
+ "summary" : "Retrieve Ledger Operation",
+ "operationId" : "retrieve_ledger_operation",
+ "parameters" : [ {
+ "description" : "The device from which the customer has made the request",
+ "$ref" : "#/components/parameters/chargebee-request-origin-device"
+ }, {
+ "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user"
+ }, {
+ "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded"
+ }, {
+ "description" : "The IP address of the customer where the request originated",
+ "$ref" : "#/components/parameters/chargebee-request-origin-ip"
+ }, {
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id"
+ }, {
+ "$ref" : "#/components/parameters/ledger-operation-id"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "content" : {
+ "application/json" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "ledger_operation" : {
+ "$ref" : "#/components/schemas/LedgerOperation",
+ "description" : "Resource object representing ledger_operation"
+ }
+ },
+ "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" : [ ]
+ } ],
+ "x-cb-resource-id" : "ledger_operation",
+ "x-cb-sort-order" : 0,
+ "x-cb-module" : "credit-grants",
+ "x-cb-operation-method-name" : "retrieveLedgerOperation",
+ "x-cb-sdk-method-name" : "retrieveLedgerOperation"
+ }
+ },
+ "/grant_blocks" : {
+ "get" : {
+ "summary" : "List Grant Blocks",
+ "operationId" : "list_grant_blocks",
+ "parameters" : [ {
+ "description" : "The device from which the customer has made the request",
+ "$ref" : "#/components/parameters/chargebee-request-origin-device"
+ }, {
+ "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user"
+ }, {
+ "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded"
+ }, {
+ "description" : "The IP address of the customer where the request originated",
+ "$ref" : "#/components/parameters/chargebee-request-origin-ip"
+ }, {
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id"
+ }, {
+ "$ref" : "#/components/parameters/limit"
+ }, {
+ "$ref" : "#/components/parameters/offset"
+ }, {
+ "name" : "subscription_id",
+ "in" : "query",
+ "required" : true,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "description" : "Subscription id.",
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "StringFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 2,
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
+ }
+ },
+ "example" : null
+ }
+ }, {
+ "name" : "unit_id",
+ "in" : "query",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "description" : "Unit id.",
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "StringFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 3,
+ "properties" : {
+ "is" : {
+ "type" : "string",
+ "minLength" : 1,
+ "example" : null
+ }
+ },
+ "example" : null
+ }
+ }, {
+ "name" : "effective_from",
+ "in" : "query",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-meta-model-name" : "grant_blocks",
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "TimestampFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 4,
+ "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",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-meta-model-name" : "grant_blocks",
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "TimestampFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 5,
+ "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",
+ "required" : false,
+ "deprecated" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-filter-parameter" : true,
+ "x-cb-meta-model-name" : "grant_blocks",
+ "x-cb-is-api-column" : true,
+ "x-cb-sdk-filter-name" : "TimestampFilter",
+ "x-cb-is-multi-value-attribute" : false,
+ "x-cb-sort-order" : 6,
+ "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",
+ "required" : false,
+ "style" : "deepObject",
+ "explode" : true,
+ "schema" : {
+ "type" : "object",
+ "additionalProperties" : true,
+ "x-cb-sort-order" : 7,
+ "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" : [ ]
+ } ],
+ "x-cb-resource-id" : "grant_block",
+ "x-cb-sort-order" : 0,
+ "x-cb-module" : "credit-grants",
+ "x-cb-operation-is-list" : true,
+ "x-cb-operation-method-name" : "listGrantBlocks",
+ "x-cb-is-operation-needs-input-object" : true,
+ "x-cb-is-operation-needs-json-input" : true,
+ "x-cb-sdk-method-name" : "listGrantBlocks"
+ }
+ },
+ "/promotional_grants" : {
+ "post" : {
+ "summary" : "Create Promotional Grant",
+ "operationId" : "create_promotional_grant",
+ "parameters" : [ {
+ "description" : "The device from which the customer has made the request",
+ "$ref" : "#/components/parameters/chargebee-request-origin-device"
+ }, {
+ "description" : "The email address of your customer/user. Use this when the email address has only ASCII characters.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user"
+ }, {
+ "description" : "The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.",
+ "$ref" : "#/components/parameters/chargebee-request-origin-user-encoded"
+ }, {
+ "description" : "The IP address of the customer where the request originated",
+ "$ref" : "#/components/parameters/chargebee-request-origin-ip"
+ }, {
+ "description" : "skip all actions to be done on the events",
+ "$ref" : "#/components/parameters/chargebee-event-actions"
+ }, {
+ "description" : "skip only emails",
+ "$ref" : "#/components/parameters/chargebee-event-email"
+ }, {
+ "description" : " skip only webhooks",
+ "$ref" : "#/components/parameters/chargebee-event-webhook"
+ }, {
+ "description" : "If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.",
+ "$ref" : "#/components/parameters/chargebee-business-entity-id"
+ } ],
+ "requestBody" : {
+ "content" : {
+ "application/x-www-form-urlencoded" : {
+ "schema" : {
+ "type" : "object",
+ "properties" : {
+ "subscription_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 0,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "unit_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 1,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 2,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "expires_at" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "not_allowed",
+ "x-cb-attribute-meta-comment" : "required",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 3,
+ "example" : null
+ },
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : true,
+ "deprecated" : false,
+ "x-cb-parameter-blank-option" : "as_null",
+ "x-cb-attribute-meta-comment" : "optional",
+ "x-cb-is-api-column" : true,
+ "x-cb-sort-order" : 4,
+ "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" : [ ]
+ } ],
+ "x-cb-resource-id" : "promotional_grant",
+ "x-cb-sort-order" : 0,
+ "x-cb-module" : "credit-grants",
+ "x-cb-operation-is-idempotent" : true,
+ "x-cb-operation-method-name" : "promotionalGrants",
+ "x-cb-is-operation-needs-input-object" : true,
+ "x-cb-is-operation-needs-json-input" : true,
+ "x-cb-sdk-method-name" : "promotionalGrants"
+ }
+ },
+ "/customers/{customer-id}/import_subscription" : {
+ "post" : {
+ "summary" : "Import subscription for customer",
+ "operationId" : "import_subscription_for_customer",
"parameters" : [ {
"description" : "The device from which the customer has made the request",
"$ref" : "#/components/parameters/chargebee-request-origin-device"
@@ -212527,23 +214842,35 @@
"minimum" : -50000,
"example" : null
},
+ "notes" : {
+ "type" : "array",
+ "deprecated" : false,
+ "x-cb-sort-order" : 31,
+ "items" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 3500,
+ "example" : null
+ },
+ "example" : null
+ },
"deleted" : {
"type" : "boolean",
"deprecated" : false,
- "x-cb-sort-order" : 43,
+ "x-cb-sort-order" : 44,
"example" : null
},
"tax_category" : {
"type" : "string",
"deprecated" : false,
- "x-cb-sort-order" : 46,
+ "x-cb-sort-order" : 47,
"example" : null
},
"local_currency_exchange_rate" : {
"type" : "number",
"format" : "decimal",
"deprecated" : false,
- "x-cb-sort-order" : 47,
+ "x-cb-sort-order" : 48,
"maximum" : 1000000000,
"minimum" : 0.0000000010,
"example" : null
@@ -212551,28 +214878,28 @@
"create_reason_code" : {
"type" : "string",
"deprecated" : false,
- "x-cb-sort-order" : 48,
+ "x-cb-sort-order" : 49,
"maxLength" : 100,
"example" : null
},
"vat_number_prefix" : {
"type" : "string",
"deprecated" : false,
- "x-cb-sort-order" : 49,
+ "x-cb-sort-order" : 50,
"maxLength" : 10,
"example" : null
},
"business_entity_id" : {
"type" : "string",
"deprecated" : false,
- "x-cb-sort-order" : 50,
+ "x-cb-sort-order" : 51,
"maxLength" : 50,
"example" : null
},
"line_items" : {
"type" : "array",
"deprecated" : false,
- "x-cb-sort-order" : 31,
+ "x-cb-sort-order" : 32,
"items" : {
"type" : "object",
"deprecated" : false,
@@ -212768,7 +215095,7 @@
"line_item_tiers" : {
"type" : "array",
"deprecated" : false,
- "x-cb-sort-order" : 32,
+ "x-cb-sort-order" : 33,
"items" : {
"type" : "object",
"deprecated" : false,
@@ -212864,7 +215191,7 @@
"line_item_discounts" : {
"type" : "array",
"deprecated" : false,
- "x-cb-sort-order" : 33,
+ "x-cb-sort-order" : 34,
"items" : {
"type" : "object",
"deprecated" : false,
@@ -212921,7 +215248,7 @@
"line_item_taxes" : {
"type" : "array",
"deprecated" : false,
- "x-cb-sort-order" : 34,
+ "x-cb-sort-order" : 35,
"items" : {
"type" : "object",
"deprecated" : false,
@@ -213043,7 +215370,7 @@
"line_item_addresses" : {
"type" : "array",
"deprecated" : false,
- "x-cb-sort-order" : 36,
+ "x-cb-sort-order" : 37,
"items" : {
"type" : "object",
"deprecated" : false,
@@ -213157,7 +215484,7 @@
"discounts" : {
"type" : "array",
"deprecated" : false,
- "x-cb-sort-order" : 37,
+ "x-cb-sort-order" : 38,
"items" : {
"type" : "object",
"deprecated" : false,
@@ -213231,7 +215558,7 @@
"taxes" : {
"type" : "array",
"deprecated" : false,
- "x-cb-sort-order" : 38,
+ "x-cb-sort-order" : 39,
"items" : {
"type" : "object",
"deprecated" : false,
@@ -213271,7 +215598,7 @@
"x-cb-is-sub-resource" : true,
"x-cb-sub-resource-name" : "TaxOrigin",
"x-cb-sub-resource-parent-name" : "CreditNote",
- "x-cb-sort-order" : 39,
+ "x-cb-sort-order" : 40,
"properties" : {
"country" : {
"type" : "string",
@@ -213291,7 +215618,7 @@
"linked_refunds" : {
"type" : "array",
"deprecated" : false,
- "x-cb-sort-order" : 40,
+ "x-cb-sort-order" : 41,
"items" : {
"type" : "object",
"deprecated" : false,
@@ -213361,7 +215688,7 @@
"allocations" : {
"type" : "array",
"deprecated" : false,
- "x-cb-sort-order" : 42,
+ "x-cb-sort-order" : 43,
"items" : {
"type" : "object",
"deprecated" : false,
@@ -213432,7 +215759,7 @@
"x-cb-is-sub-resource" : true,
"x-cb-sub-resource-name" : "ShippingAddress",
"x-cb-sub-resource-parent-name" : "CreditNote",
- "x-cb-sort-order" : 51,
+ "x-cb-sort-order" : 52,
"properties" : {
"first_name" : {
"type" : "string",
@@ -213536,7 +215863,7 @@
"x-cb-is-sub-resource" : true,
"x-cb-sub-resource-name" : "BillingAddress",
"x-cb-sub-resource-parent-name" : "CreditNote",
- "x-cb-sort-order" : 52,
+ "x-cb-sort-order" : 53,
"properties" : {
"first_name" : {
"type" : "string",
@@ -213640,7 +215967,7 @@
"x-cb-is-sub-resource" : true,
"x-cb-sub-resource-name" : "Einvoice",
"x-cb-sub-resource-parent-name" : "CreditNote",
- "x-cb-sort-order" : 53,
+ "x-cb-sort-order" : 54,
"properties" : {
"id" : {
"type" : "string",
@@ -213696,7 +216023,7 @@
"x-cb-is-sub-resource" : true,
"x-cb-sub-resource-name" : "SiteDetailsAtCreation",
"x-cb-sub-resource-parent-name" : "CreditNote",
- "x-cb-sort-order" : 54,
+ "x-cb-sort-order" : 55,
"properties" : {
"timezone" : {
"type" : "string",
@@ -223056,6 +225383,169 @@
"required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ],
"example" : null
},
+ "GrantBlock" : {
+ "type" : "object",
+ "x-cb-resource-id" : "grant_block",
+ "x-cb-resource-path-name" : "grant_blocks",
+ "x-cb-is-dependent-resource" : false,
+ "x-cb-sort-order" : 170,
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 0,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "granted_amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 1,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "effective_from" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-sort-order" : 2,
+ "example" : null
+ },
+ "expires_at" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-sort-order" : 3,
+ "example" : null
+ },
+ "balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 4,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "hold_amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 5,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "used_amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 6,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "expired_amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 7,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "rolled_over_amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 8,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "voided_amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 9,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "origin_grant_block_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 10,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "status" : {
+ "type" : "string",
+ "default" : "available",
+ "deprecated" : false,
+ "enum" : [ "available", "exhausted", "scheduled", "in_grace_period" ],
+ "x-cb-is-global-enum" : true,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-gen-separate" : true,
+ "x-cb-is-ignore-generation" : false,
+ "x-cb-sdk-enum-api-name" : "Status",
+ "x-cb-global-enum-reference" : "./schemas/enums/Status.yaml",
+ "x-cb-sort-order" : 11,
+ "example" : null
+ },
+ "metadata" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 12,
+ "maxLength" : 65000,
+ "example" : null
+ },
+ "grant_source" : {
+ "type" : "string",
+ "deprecated" : false,
+ "enum" : [ "subscription_created", "subscription_changed", "top_up", "promotional_grants", "rollover" ],
+ "x-cb-is-global-enum" : false,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-gen-separate" : false,
+ "x-cb-is-ignore-generation" : false,
+ "x-cb-sdk-enum-api-name" : "GrantSource",
+ "x-cb-sort-order" : 13,
+ "example" : null
+ },
+ "created_at" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-sort-order" : 14,
+ "example" : null
+ },
+ "account_type" : {
+ "type" : "string",
+ "deprecated" : false,
+ "enum" : [ "provisioned", "overdraft" ],
+ "x-cb-is-global-enum" : false,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-gen-separate" : false,
+ "x-cb-is-ignore-generation" : false,
+ "x-cb-sdk-enum-api-name" : "AccountType",
+ "x-cb-sort-order" : 15,
+ "example" : null
+ },
+ "unit_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 16,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "unit_type" : {
+ "type" : "string",
+ "deprecated" : false,
+ "enum" : [ "credit_unit" ],
+ "x-cb-is-global-enum" : false,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-gen-separate" : false,
+ "x-cb-is-ignore-generation" : false,
+ "x-cb-sdk-enum-api-name" : "UnitType",
+ "x-cb-sort-order" : 17,
+ "example" : null
+ }
+ },
+ "required" : [ "balance", "effective_from", "expired_amount", "expires_at", "grant_source", "granted_amount", "hold_amount", "id", "rolled_over_amount", "status", "used_amount", "voided_amount" ],
+ "example" : null
+ },
"Hierarchy" : {
"type" : "object",
"x-cb-resource-id" : "hierarchy",
@@ -223252,7 +225742,7 @@
"type" : "string",
"deprecated" : false,
"enum" : [ "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_gift", "claim_gift" ],
- "x-cb-deprecated-enum-values" : "update_card",
+ "x-cb-deprecated-enum-values" : "update_card,update_payment_method",
"x-cb-is-global-enum" : false,
"x-cb-is-api-column" : true,
"x-cb-is-external-enum" : false,
@@ -223318,38 +225808,52 @@
"x-cb-sort-order" : 8,
"example" : null
},
+ "layout" : {
+ "type" : "string",
+ "deprecated" : false,
+ "enum" : [ "in_app", "full_page" ],
+ "x-cb-is-global-enum" : true,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-external-enum" : true,
+ "x-cb-is-gen-separate" : true,
+ "x-cb-is-ignore-generation" : false,
+ "x-cb-sdk-enum-api-name" : "Layout",
+ "x-cb-global-enum-reference" : "./schemas/enums/Layout.yaml",
+ "x-cb-sort-order" : 10,
+ "example" : null
+ },
"content" : {
"type" : "object",
"additionalProperties" : true,
"deprecated" : false,
- "x-cb-sort-order" : 10,
+ "x-cb-sort-order" : 11,
"example" : null
},
"updated_at" : {
"type" : "integer",
"format" : "unix-time",
"deprecated" : false,
- "x-cb-sort-order" : 11,
+ "x-cb-sort-order" : 12,
"example" : null
},
"resource_version" : {
"type" : "integer",
"format" : "int64",
"deprecated" : false,
- "x-cb-sort-order" : 12,
+ "x-cb-sort-order" : 13,
"example" : null
},
"checkout_info" : {
"type" : "object",
"additionalProperties" : true,
"deprecated" : false,
- "x-cb-sort-order" : 13,
+ "x-cb-sort-order" : 14,
"example" : null
},
"business_entity_id" : {
"type" : "string",
"deprecated" : false,
- "x-cb-sort-order" : 14,
+ "x-cb-sort-order" : 15,
"maxLength" : 50,
"example" : null
},
@@ -228563,16 +231067,288 @@
"type" : "string",
"deprecated" : false,
"enum" : [ "in_app", "full_page" ],
- "x-cb-parameter-blank-option" : "as_null",
- "x-cb-attribute-meta-comment" : "optional",
- "x-cb-is-api-column" : true,
"x-cb-is-global-enum" : true,
+ "x-cb-is-api-column" : true,
"x-cb-is-external-enum" : true,
"x-cb-is-gen-separate" : true,
"x-cb-is-ignore-generation" : false,
"x-cb-sdk-enum-api-name" : "Layout",
"example" : null
},
+ "LedgerAccountBalance" : {
+ "type" : "object",
+ "x-cb-resource-id" : "ledger_account_balance",
+ "x-cb-resource-path-name" : "ledger_account_balances",
+ "x-cb-is-dependent-resource" : false,
+ "x-cb-sort-order" : 168,
+ "x-cb-product-catalog-version" : 2,
+ "properties" : {
+ "subscription_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 0,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "unit_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 1,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "unit_type" : {
+ "type" : "string",
+ "deprecated" : false,
+ "enum" : [ "credit_unit" ],
+ "x-cb-is-global-enum" : false,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-gen-separate" : false,
+ "x-cb-is-ignore-generation" : false,
+ "x-cb-sdk-enum-api-name" : "UnitType",
+ "x-cb-sort-order" : 2,
+ "example" : null
+ },
+ "modified_at" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-sort-order" : 3,
+ "example" : null
+ },
+ "provisioned_balance" : {
+ "type" : "object",
+ "deprecated" : false,
+ "x-cb-is-sub-resource" : true,
+ "x-cb-sub-resource-name" : "ProvisionedBalance",
+ "x-cb-sub-resource-parent-name" : "LedgerAccountBalance",
+ "x-cb-sort-order" : 4,
+ "properties" : {
+ "total_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "usable_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "hold_amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 36,
+ "example" : null
+ }
+ },
+ "required" : [ "hold_amount", "total_balance", "usable_balance" ],
+ "example" : null
+ },
+ "overdraft_balance" : {
+ "type" : "object",
+ "deprecated" : false,
+ "x-cb-is-sub-resource" : true,
+ "x-cb-sub-resource-name" : "OverdraftBalance",
+ "x-cb-sub-resource-parent-name" : "LedgerAccountBalance",
+ "x-cb-sort-order" : 5,
+ "properties" : {
+ "is_unlimited" : {
+ "type" : "boolean",
+ "default" : false,
+ "deprecated" : false,
+ "example" : null
+ },
+ "limit" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "total_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "usable_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "used_amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "hold_amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "maxLength" : 36,
+ "example" : null
+ }
+ },
+ "required" : [ "hold_amount", "is_unlimited", "used_amount" ],
+ "example" : null
+ }
+ },
+ "required" : [ "subscription_id", "unit_id", "unit_type" ],
+ "example" : null
+ },
+ "LedgerOperation" : {
+ "type" : "object",
+ "x-cb-resource-id" : "ledger_operation",
+ "x-cb-resource-path-name" : "ledger_operations",
+ "x-cb-is-dependent-resource" : false,
+ "x-cb-sort-order" : 169,
+ "x-cb-product-catalog-version" : 2,
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 0,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "type" : {
+ "type" : "string",
+ "deprecated" : false,
+ "enum" : [ "allocation", "capture", "authorize", "release_authorization", "capture_authorization", "expiry", "void", "rollover", "adjustment" ],
+ "x-cb-is-global-enum" : false,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-gen-separate" : false,
+ "x-cb-is-ignore-generation" : false,
+ "x-cb-sdk-enum-api-name" : "Type",
+ "x-cb-sort-order" : 1,
+ "example" : null
+ },
+ "amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 2,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "start_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 3,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "end_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 4,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "provisioned_start_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 5,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "provisioned_end_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 6,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "overdraft_start_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 7,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "overdraft_end_balance" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 8,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "parent_ledger_operation_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 9,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "ledger_operation_timestamp" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-sort-order" : 10,
+ "example" : null
+ },
+ "auto_release_timestamp" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-sort-order" : 11,
+ "example" : null
+ },
+ "metadata" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 12,
+ "maxLength" : 65000,
+ "example" : null
+ },
+ "created_at" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-sort-order" : 13,
+ "example" : null
+ },
+ "modified_at" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-sort-order" : 14,
+ "example" : null
+ },
+ "subscription_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 15,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "unit_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 16,
+ "maxLength" : 100,
+ "example" : null
+ },
+ "unit_type" : {
+ "type" : "string",
+ "deprecated" : false,
+ "enum" : [ "credit_unit" ],
+ "x-cb-is-global-enum" : false,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-gen-separate" : false,
+ "x-cb-is-ignore-generation" : false,
+ "x-cb-sdk-enum-api-name" : "UnitType",
+ "x-cb-sort-order" : 17,
+ "example" : null
+ }
+ },
+ "required" : [ "amount", "end_balance", "id", "overdraft_end_balance", "overdraft_start_balance", "provisioned_end_balance", "provisioned_start_balance", "start_balance", "type" ],
+ "example" : null
+ },
"Media" : {
"type" : "object",
"x-cb-resource-id" : "media",
@@ -238708,6 +241484,53 @@
"required" : [ "api_version", "content", "event_type", "id", "object", "occurred_at", "source", "webhook_status" ],
"example" : null
},
+ "PromotionalGrant" : {
+ "type" : "object",
+ "x-cb-resource-id" : "promotional_grant",
+ "x-cb-resource-path-name" : "promotional_grants",
+ "x-cb-is-dependent-resource" : false,
+ "x-cb-sort-order" : 171,
+ "x-cb-product-catalog-version" : 2,
+ "properties" : {
+ "subscription_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 0,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "unit_id" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 1,
+ "maxLength" : 50,
+ "example" : null
+ },
+ "amount" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 2,
+ "maxLength" : 36,
+ "example" : null
+ },
+ "expires_at" : {
+ "type" : "integer",
+ "format" : "unix-time",
+ "deprecated" : false,
+ "x-cb-sort-order" : 3,
+ "example" : null
+ },
+ "metadata" : {
+ "type" : "string",
+ "deprecated" : false,
+ "x-cb-sort-order" : 4,
+ "maxLength" : 65000,
+ "example" : null
+ }
+ },
+ "required" : [ "amount", "expires_at", "subscription_id", "unit_id" ],
+ "example" : null
+ },
"ProrationType" : {
"type" : "string",
"deprecated" : false,
@@ -244925,6 +247748,19 @@
"x-cb-sdk-enum-api-name" : "Source",
"example" : null
},
+ "Status" : {
+ "type" : "string",
+ "default" : "available",
+ "deprecated" : false,
+ "enum" : [ "available", "exhausted", "scheduled", "in_grace_period" ],
+ "x-cb-is-global-enum" : true,
+ "x-cb-is-api-column" : true,
+ "x-cb-is-external-enum" : false,
+ "x-cb-is-gen-separate" : true,
+ "x-cb-is-ignore-generation" : false,
+ "x-cb-sdk-enum-api-name" : "Status",
+ "example" : null
+ },
"Subscription" : {
"type" : "object",
"additionalProperties" : true,
diff --git a/spec/chargebee_sdk_spec.yaml b/spec/chargebee_sdk_spec.yaml
index 7cd27108..354fb552 100644
--- a/spec/chargebee_sdk_spec.yaml
+++ b/spec/chargebee_sdk_spec.yaml
@@ -5,7 +5,7 @@ info:
name: Chargebee Support
url: https://www.chargebee.com
email: support@chargebee.com
- version: 2026-06-08.8b15a3575b64635c16a22ad29253d68a470d2304
+ version: 2026-06-12.a49b34edd262e3e190bd6d8616ff9e401c37bd21
x-cb-api-version: 2
x-cb-product-catalog-version: 2
servers:
@@ -46030,14 +46030,14 @@ paths:
x-cb-sdk-filter-name: StringFilter
x-cb-sort-order: 2
properties:
- in:
- type: string
- pattern: "^\\[(.*)(,.*)*\\]$"
- example: null
is:
type: string
minLength: 1
example: null
+ in:
+ type: string
+ pattern: "^\\[(.*)(,.*)*\\]$"
+ example: null
- name: payment_reference_number
in: query
required: false
@@ -46068,14 +46068,14 @@ paths:
x-cb-is-api-column: true
x-cb-sdk-filter-name: StringFilter
properties:
- in:
- type: string
- pattern: "^\\[(.*)(,.*)*\\]$"
- example: null
is:
type: string
minLength: 1
example: null
+ in:
+ type: string
+ pattern: "^\\[(.*)(,.*)*\\]$"
+ example: null
example: null
responses:
"200":
@@ -64591,7 +64591,7 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/503"
- deprecated: false
+ deprecated: true
security:
- BasicAuth: []
x-cb-resource-id: hosted_page
@@ -65715,7 +65715,7 @@ paths:
* `checkout_new` - Checkout new Subscription
* `checkout_existing` - Checkout existing Subscription
* `update_card` - **(Deprecated)** Update Card for a Customer
- * `update_payment_method` - Update Payment Method for a Customer
+ * `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
@@ -65735,7 +65735,7 @@ paths:
- pre_cancel
- view_voucher
- accept_quote
- x-cb-deprecated-enum-values: update_card
+ x-cb-deprecated-enum-values: "update_card,update_payment_method"
x-cb-is-external-enum: false
x-cb-is-api-column: true
x-cb-is-gen-separate: false
@@ -65747,7 +65747,7 @@ paths:
* `checkout_new` - Checkout new Subscription
* `checkout_existing` - Checkout existing Subscription
* `update_card` - **(Deprecated)** Update Card for a Customer
- * `update_payment_method` - Update Payment Method for a Customer
+ * `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
@@ -65767,7 +65767,7 @@ paths:
- pre_cancel
- view_voucher
- accept_quote
- x-cb-deprecated-enum-values: update_card
+ x-cb-deprecated-enum-values: "update_card,update_payment_method"
x-cb-is-external-enum: false
x-cb-is-api-column: true
x-cb-is-gen-separate: false
@@ -65779,7 +65779,7 @@ paths:
* `checkout_new` - Checkout new Subscription
* `checkout_existing` - Checkout existing Subscription
* `update_card` - **(Deprecated)** Update Card for a Customer
- * `update_payment_method` - Update Payment Method for a Customer
+ * `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
@@ -65799,7 +65799,7 @@ paths:
- pre_cancel
- view_voucher
- accept_quote
- x-cb-deprecated-enum-values: update_card
+ x-cb-deprecated-enum-values: "update_card,update_payment_method"
x-cb-is-external-enum: false
x-cb-is-api-column: true
x-cb-is-gen-separate: false
@@ -65813,7 +65813,7 @@ paths:
* `checkout_new` - Checkout new Subscription
* `checkout_existing` - Checkout existing Subscription
* `update_card` - **(Deprecated)** Update Card for a Customer
- * `update_payment_method` - Update Payment Method for a Customer
+ * `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
@@ -65833,7 +65833,7 @@ paths:
- pre_cancel
- view_voucher
- accept_quote
- x-cb-deprecated-enum-values: update_card
+ x-cb-deprecated-enum-values: "update_card,update_payment_method"
x-cb-is-external-enum: false
x-cb-is-api-column: true
x-cb-is-gen-separate: false
@@ -96365,14 +96365,14 @@ paths:
x-cb-sdk-filter-name: StringFilter
x-cb-sort-order: 17
properties:
- in:
- type: string
- pattern: "^\\[(.*)(,.*)*\\]$"
- example: null
is:
type: string
minLength: 1
example: null
+ in:
+ type: string
+ pattern: "^\\[(.*)(,.*)*\\]$"
+ example: null
responses:
"200":
description: OK
@@ -123104,14 +123104,14 @@ paths:
x-cb-sdk-filter-name: StringFilter
x-cb-sort-order: 14
properties:
- in:
- type: string
- pattern: "^\\[(.*)(,.*)*\\]$"
- example: null
is:
type: string
minLength: 1
example: null
+ in:
+ type: string
+ pattern: "^\\[(.*)(,.*)*\\]$"
+ example: null
coupon:
type: object
deprecated: false
@@ -142570,14 +142570,14 @@ paths:
x-cb-sdk-filter-name: StringFilter
x-cb-sort-order: 2
properties:
- in:
- type: string
- pattern: "^\\[(.*)(,.*)*\\]$"
- example: null
is:
type: string
minLength: 1
example: null
+ in:
+ type: string
+ pattern: "^\\[(.*)(,.*)*\\]$"
+ example: null
- name: entity_type
in: query
required: false
@@ -142599,7 +142599,7 @@ paths:
x-cb-sdk-filter-name: EnumFilter
x-cb-sort-order: 3
properties:
- in:
+ is:
type: string
description: |-
* `plan` - Plan
@@ -142617,10 +142617,8 @@ paths:
x-cb-is-api-column: true
x-cb-is-gen-separate: false
x-cb-sdk-enum-api-name: EntityType
- pattern: "^\\[(plan|addon|charge|plan_price|addon_price)(,(plan|addon|charge|plan_price|addon_price))*\\\
- ]$"
example: null
- is:
+ in:
type: string
description: |-
* `plan` - Plan
@@ -142638,6 +142636,8 @@ paths:
x-cb-is-api-column: true
x-cb-is-gen-separate: false
x-cb-sdk-enum-api-name: EntityType
+ pattern: "^\\[(plan|addon|charge|plan_price|addon_price)(,(plan|addon|charge|plan_price|addon_price))*\\\
+ ]$"
example: null
- name: entity_id
in: query
@@ -142660,14 +142660,14 @@ paths:
x-cb-sdk-filter-name: StringFilter
x-cb-sort-order: 4
properties:
- in:
- type: string
- pattern: "^\\[(.*)(,.*)*\\]$"
- example: null
is:
type: string
minLength: 1
example: null
+ in:
+ type: string
+ pattern: "^\\[(.*)(,.*)*\\]$"
+ example: null
- name: include_drafts
in: query
required: false
@@ -151068,7 +151068,7 @@ paths:
x-cb-is-multi-value-attribute: false
x-cb-sort-order: 3
properties:
- in:
+ is:
type: string
description: "* `scheduled` - Status of the subscription schedule on\
\ creation. \n* `succeeded` - The execution status of the schedule\
@@ -151084,10 +151084,8 @@ paths:
x-cb-is-api-column: true
x-cb-is-gen-separate: false
x-cb-sdk-enum-api-name: Status
- pattern: "^\\[(scheduled|succeeded|failed|draft)(,(scheduled|succeeded|failed|draft))*\\\
- ]$"
example: null
- is:
+ in:
type: string
description: "* `scheduled` - Status of the subscription schedule on\
\ creation. \n* `succeeded` - The execution status of the schedule\
@@ -151103,6 +151101,8 @@ paths:
x-cb-is-api-column: true
x-cb-is-gen-separate: false
x-cb-sdk-enum-api-name: Status
+ pattern: "^\\[(scheduled|succeeded|failed|draft)(,(scheduled|succeeded|failed|draft))*\\\
+ ]$"
example: null
- name: subscription_id
in: query
@@ -151124,14 +151124,14 @@ paths:
x-cb-sdk-filter-name: StringFilter
x-cb-sort-order: 4
properties:
- in:
- type: string
- pattern: "^\\[(.*)(,.*)*\\]$"
- example: null
is:
type: string
minLength: 1
example: null
+ in:
+ type: string
+ pattern: "^\\[(.*)(,.*)*\\]$"
+ example: null
- name: effective_from
in: query
required: false
@@ -157776,6 +157776,29 @@ paths:
format: unix-time
pattern: "^\\d{10}$"
example: null
+ - name: sort_by
+ in: query
+ required: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ additionalProperties: true
+ x-cb-sort-order: 10
+ 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
required: false
@@ -163600,17 +163623,1759 @@ paths:
deprecated: false
security:
- BasicAuth: []
- x-cb-resource-id: alert_status
- x-cb-sort-order: 1
- x-cb-module: usage-based-billing
+ x-cb-resource-id: alert_status
+ x-cb-sort-order: 1
+ x-cb-module: usage-based-billing
+ x-cb-operation-is-list: true
+ x-cb-operation-method-name: alert_statusesForSubscription
+ x-cb-is-operation-needs-input-object: true
+ x-cb-sdk-method-name: alertStatusesForSubscription
+ /alerts/{alert-id}/alert_statuses:
+ get:
+ summary: List alert statuses for an alert
+ operationId: list_alert_statuses_for_an_alert
+ parameters:
+ - description: The device from which the customer has made the request
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ - description: The email address of your customer/user. Use this when the email
+ address has only ASCII characters.
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ - description: "The Base64-encoded email address of your customer/user. Use\
+ \ this if the email address has UTF-8 characters. When this header is provided,\
+ \ the header chargebee-request-origin-user is ignored."
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ - description: The IP address of the customer where the request originated
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: "If the site has multiple business entities, you can use this\
+ \ custom HTTP header to specify the business entity for which Chargebee\
+ \ should perform the operation."
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ - $ref: "#/components/parameters/alert-id"
+ - $ref: "#/components/parameters/limit"
+ - $ref: "#/components/parameters/offset"
+ - name: alarm_status
+ in: query
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-multi-value-attribute: true
+ x-cb-is-filter-parameter: true
+ x-cb-meta-model-name: alert_statuses
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: EnumFilter
+ x-cb-sort-order: 2
+ properties:
+ is:
+ type: string
+ description: |-
+ * `within_limit` - WITHIN_LIMIT
+ * `in_alarm` - IN_ALARM
+ enum:
+ - within_limit
+ - in_alarm
+ x-cb-is-external-enum: true
+ x-cb-is-api-column: true
+ x-cb-is-gen-separate: true
+ x-cb-sdk-enum-api-name: AlarmStatus
+ 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: 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: []
+ x-cb-resource-id: alert_status
+ x-cb-sort-order: 2
+ x-cb-module: usage-based-billing
+ x-cb-operation-is-list: true
+ x-cb-operation-method-name: alert_statusesForAlert
+ x-cb-is-operation-needs-input-object: true
+ x-cb-sdk-method-name: alertStatusesForAlert
+ /ledger_account_balances:
+ get:
+ summary: List Ledger Account Balances
+ operationId: list_ledger_account_balances
+ parameters:
+ - description: The device from which the customer has made the request
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ - description: The email address of your customer/user. Use this when the email
+ address has only ASCII characters.
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ - description: "The Base64-encoded email address of your customer/user. Use\
+ \ this if the email address has UTF-8 characters. When this header is provided,\
+ \ the header chargebee-request-origin-user is ignored."
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ - description: The IP address of the customer where the request originated
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: "If the site has multiple business entities, you can use this\
+ \ custom HTTP header to specify the business entity for which Chargebee\
+ \ should perform the operation."
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ - $ref: "#/components/parameters/limit"
+ - $ref: "#/components/parameters/offset"
+ - name: subscription_id
+ in: query
+ required: true
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ description: Subscription id.
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-filter-parameter: true
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: StringFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 2
+ properties:
+ is:
+ type: string
+ minLength: 1
+ example: null
+ example: null
+ - name: unit_id
+ in: query
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ description: Unit id.
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-filter-parameter: true
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: StringFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 3
+ 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: []
+ x-cb-resource-id: ledger_account_balance
+ x-cb-sort-order: 0
+ x-cb-module: credit-grants
+ x-cb-operation-is-list: true
+ x-cb-operation-method-name: listLedgerAccountBalances
+ x-cb-is-operation-needs-input-object: true
+ x-cb-is-operation-needs-json-input: true
+ x-cb-sdk-method-name: listLedgerAccountBalances
+ /ledger_operations/release_authorization:
+ post:
+ summary: Release authorization
+ operationId: release_authorization
+ parameters:
+ - description: The device from which the customer has made the request
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ - description: The email address of your customer/user. Use this when the email
+ address has only ASCII characters.
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ - description: "The Base64-encoded email address of your customer/user. Use\
+ \ this if the email address has UTF-8 characters. When this header is provided,\
+ \ the header chargebee-request-origin-user is ignored."
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ - description: The IP address of the customer where the request originated
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: skip all actions to be done on the events
+ $ref: "#/components/parameters/chargebee-event-actions"
+ - description: skip only emails
+ $ref: "#/components/parameters/chargebee-event-email"
+ - description: ' skip only webhooks'
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ - description: "If the site has multiple business entities, you can use this\
+ \ custom HTTP header to specify the business entity for which Chargebee\
+ \ should perform the operation."
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ authorization_id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 0
+ maxLength: 50
+ example: null
+ id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 1
+ maxLength: 50
+ example: null
+ ledger_operation_timestamp:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 2
+ example: null
+ metadata:
+ type: object
+ additionalProperties: true
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 3
+ 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: Resource object representing ledger_operation
+ ledger_account_balance:
+ $ref: "#/components/schemas/LedgerAccountBalance"
+ description: Resource object representing ledger_account_balance
+ required:
+ - ledger_account_balance
+ - 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: []
+ x-cb-resource-id: ledger_operation
+ x-cb-sort-order: 5
+ x-cb-module: credit-grants
+ x-cb-operation-method-name: releaseAuthorization
+ x-cb-is-operation-needs-input-object: true
+ x-cb-is-operation-needs-json-input: true
+ x-cb-sdk-method-name: releaseAuthorization
+ /ledger_operations/capture:
+ post:
+ summary: Capture
+ operationId: capture
+ parameters:
+ - description: The device from which the customer has made the request
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ - description: The email address of your customer/user. Use this when the email
+ address has only ASCII characters.
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ - description: "The Base64-encoded email address of your customer/user. Use\
+ \ this if the email address has UTF-8 characters. When this header is provided,\
+ \ the header chargebee-request-origin-user is ignored."
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ - description: The IP address of the customer where the request originated
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: skip all actions to be done on the events
+ $ref: "#/components/parameters/chargebee-event-actions"
+ - description: skip only emails
+ $ref: "#/components/parameters/chargebee-event-email"
+ - description: ' skip only webhooks'
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ - description: "If the site has multiple business entities, you can use this\
+ \ custom HTTP header to specify the business entity for which Chargebee\
+ \ should perform the operation."
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 0
+ maxLength: 50
+ example: null
+ subscription_id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 1
+ maxLength: 50
+ example: null
+ unit_id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 2
+ maxLength: 50
+ example: null
+ amount:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 3
+ maxLength: 36
+ example: null
+ ledger_operation_timestamp:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 4
+ example: null
+ metadata:
+ type: object
+ additionalProperties: true
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 5
+ 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: Resource object representing ledger_operation
+ ledger_account_balance:
+ $ref: "#/components/schemas/LedgerAccountBalance"
+ description: Resource object representing ledger_account_balance
+ required:
+ - ledger_account_balance
+ - 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: []
+ x-cb-resource-id: ledger_operation
+ x-cb-sort-order: 2
+ x-cb-module: credit-grants
+ x-cb-operation-method-name: capture
+ x-cb-is-operation-needs-input-object: true
+ x-cb-is-operation-needs-json-input: true
+ x-cb-sdk-method-name: capture
+ /ledger_operations/authorize:
+ post:
+ summary: Authorize
+ operationId: authorize
+ parameters:
+ - description: The device from which the customer has made the request
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ - description: The email address of your customer/user. Use this when the email
+ address has only ASCII characters.
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ - description: "The Base64-encoded email address of your customer/user. Use\
+ \ this if the email address has UTF-8 characters. When this header is provided,\
+ \ the header chargebee-request-origin-user is ignored."
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ - description: The IP address of the customer where the request originated
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: skip all actions to be done on the events
+ $ref: "#/components/parameters/chargebee-event-actions"
+ - description: skip only emails
+ $ref: "#/components/parameters/chargebee-event-email"
+ - description: ' skip only webhooks'
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ - description: "If the site has multiple business entities, you can use this\
+ \ custom HTTP header to specify the business entity for which Chargebee\
+ \ should perform the operation."
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 0
+ maxLength: 50
+ example: null
+ subscription_id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 1
+ maxLength: 50
+ example: null
+ unit_id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 2
+ maxLength: 50
+ example: null
+ amount:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 3
+ maxLength: 36
+ example: null
+ ledger_operation_timestamp:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 4
+ example: null
+ auto_release_timestamp:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 5
+ example: null
+ metadata:
+ type: object
+ additionalProperties: true
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 6
+ 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: Resource object representing ledger_operation
+ ledger_account_balance:
+ $ref: "#/components/schemas/LedgerAccountBalance"
+ description: Resource object representing ledger_account_balance
+ required:
+ - ledger_account_balance
+ - 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: []
+ x-cb-resource-id: ledger_operation
+ x-cb-sort-order: 3
+ x-cb-module: credit-grants
+ x-cb-operation-method-name: authorize
+ x-cb-is-operation-needs-input-object: true
+ x-cb-is-operation-needs-json-input: true
+ x-cb-sdk-method-name: authorize
+ /ledger_operations:
+ get:
+ summary: List Ledger Operations
+ operationId: list_ledger_operations
+ parameters:
+ - description: The device from which the customer has made the request
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ - description: The email address of your customer/user. Use this when the email
+ address has only ASCII characters.
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ - description: "The Base64-encoded email address of your customer/user. Use\
+ \ this if the email address has UTF-8 characters. When this header is provided,\
+ \ the header chargebee-request-origin-user is ignored."
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ - description: The IP address of the customer where the request originated
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: "If the site has multiple business entities, you can use this\
+ \ custom HTTP header to specify the business entity for which Chargebee\
+ \ should perform the operation."
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ - $ref: "#/components/parameters/limit"
+ - $ref: "#/components/parameters/offset"
+ - name: subscription_id
+ in: query
+ required: true
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ description: Subscription id.
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-filter-parameter: true
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: StringFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 2
+ properties:
+ is:
+ type: string
+ minLength: 1
+ example: null
+ example: null
+ - name: unit_id
+ in: query
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ description: Unit id.
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-filter-parameter: true
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: StringFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 3
+ properties:
+ is:
+ type: string
+ minLength: 1
+ example: null
+ example: null
+ - name: created_at
+ in: query
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-filter-parameter: true
+ x-cb-meta-model-name: ledger_operations
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: TimestampFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 4
+ 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
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ description: The type of Ledger operation
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-multi-value-attribute: true
+ x-cb-is-filter-parameter: true
+ x-cb-meta-model-name: ledger_operations
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: EnumFilter
+ x-cb-sort-order: 5
+ properties:
+ 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
+ enum:
+ - allocation
+ - capture
+ - authorize
+ - release_authorization
+ - capture_authorization
+ - expiry
+ - void
+ - rollover
+ - adjustment
+ x-cb-is-external-enum: false
+ x-cb-is-api-column: true
+ x-cb-is-gen-separate: false
+ x-cb-sdk-enum-api-name: Type
+ example: null
+ 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
+ enum:
+ - allocation
+ - capture
+ - authorize
+ - release_authorization
+ - capture_authorization
+ - expiry
+ - void
+ - rollover
+ - adjustment
+ x-cb-is-external-enum: false
+ x-cb-is-api-column: true
+ x-cb-is-gen-separate: false
+ x-cb-sdk-enum-api-name: Type
+ 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
+ example: null
+ - name: sort_by
+ in: query
+ required: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ additionalProperties: true
+ x-cb-sort-order: 6
+ 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: []
+ x-cb-resource-id: ledger_operation
+ x-cb-sort-order: 1
+ x-cb-module: credit-grants
+ x-cb-operation-is-list: true
+ x-cb-operation-method-name: listLedgerOperations
+ x-cb-is-operation-needs-input-object: true
+ x-cb-is-operation-needs-json-input: true
+ x-cb-sdk-method-name: listLedgerOperations
+ /ledger_operations/capture_authorization:
+ post:
+ summary: Capture authorization
+ operationId: capture_authorization
+ parameters:
+ - description: The device from which the customer has made the request
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ - description: The email address of your customer/user. Use this when the email
+ address has only ASCII characters.
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ - description: "The Base64-encoded email address of your customer/user. Use\
+ \ this if the email address has UTF-8 characters. When this header is provided,\
+ \ the header chargebee-request-origin-user is ignored."
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ - description: The IP address of the customer where the request originated
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: skip all actions to be done on the events
+ $ref: "#/components/parameters/chargebee-event-actions"
+ - description: skip only emails
+ $ref: "#/components/parameters/chargebee-event-email"
+ - description: ' skip only webhooks'
+ $ref: "#/components/parameters/chargebee-event-webhook"
+ - description: "If the site has multiple business entities, you can use this\
+ \ custom HTTP header to specify the business entity for which Chargebee\
+ \ should perform the operation."
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ authorization_id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 0
+ maxLength: 50
+ example: null
+ id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 1
+ maxLength: 50
+ example: null
+ amount:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 2
+ maxLength: 36
+ example: null
+ ledger_operation_timestamp:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 3
+ example: null
+ metadata:
+ type: object
+ additionalProperties: true
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 4
+ 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: Resource object representing ledger_operation
+ ledger_account_balance:
+ $ref: "#/components/schemas/LedgerAccountBalance"
+ description: Resource object representing ledger_account_balance
+ required:
+ - ledger_account_balance
+ - 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: []
+ x-cb-resource-id: ledger_operation
+ x-cb-sort-order: 4
+ x-cb-module: credit-grants
+ x-cb-operation-method-name: captureAuthorization
+ x-cb-is-operation-needs-input-object: true
+ x-cb-is-operation-needs-json-input: true
+ x-cb-sdk-method-name: captureAuthorization
+ /ledger_operations/{ledger-operation-id}:
+ get:
+ summary: Retrieve Ledger Operation
+ operationId: retrieve_ledger_operation
+ parameters:
+ - description: The device from which the customer has made the request
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ - description: The email address of your customer/user. Use this when the email
+ address has only ASCII characters.
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ - description: "The Base64-encoded email address of your customer/user. Use\
+ \ this if the email address has UTF-8 characters. When this header is provided,\
+ \ the header chargebee-request-origin-user is ignored."
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ - description: The IP address of the customer where the request originated
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: "If the site has multiple business entities, you can use this\
+ \ custom HTTP header to specify the business entity for which Chargebee\
+ \ should perform the operation."
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ - $ref: "#/components/parameters/ledger-operation-id"
+ responses:
+ "200":
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ ledger_operation:
+ $ref: "#/components/schemas/LedgerOperation"
+ description: Resource object representing ledger_operation
+ 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: []
+ x-cb-resource-id: ledger_operation
+ x-cb-sort-order: 0
+ x-cb-module: credit-grants
+ x-cb-operation-method-name: retrieveLedgerOperation
+ x-cb-sdk-method-name: retrieveLedgerOperation
+ /grant_blocks:
+ get:
+ summary: List Grant Blocks
+ operationId: list_grant_blocks
+ parameters:
+ - description: The device from which the customer has made the request
+ $ref: "#/components/parameters/chargebee-request-origin-device"
+ - description: The email address of your customer/user. Use this when the email
+ address has only ASCII characters.
+ $ref: "#/components/parameters/chargebee-request-origin-user"
+ - description: "The Base64-encoded email address of your customer/user. Use\
+ \ this if the email address has UTF-8 characters. When this header is provided,\
+ \ the header chargebee-request-origin-user is ignored."
+ $ref: "#/components/parameters/chargebee-request-origin-user-encoded"
+ - description: The IP address of the customer where the request originated
+ $ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: "If the site has multiple business entities, you can use this\
+ \ custom HTTP header to specify the business entity for which Chargebee\
+ \ should perform the operation."
+ $ref: "#/components/parameters/chargebee-business-entity-id"
+ - $ref: "#/components/parameters/limit"
+ - $ref: "#/components/parameters/offset"
+ - name: subscription_id
+ in: query
+ required: true
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ description: Subscription id.
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-filter-parameter: true
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: StringFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 2
+ properties:
+ is:
+ type: string
+ minLength: 1
+ example: null
+ example: null
+ - name: unit_id
+ in: query
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ description: Unit id.
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-filter-parameter: true
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: StringFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 3
+ properties:
+ is:
+ type: string
+ minLength: 1
+ example: null
+ example: null
+ - name: effective_from
+ in: query
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-filter-parameter: true
+ x-cb-meta-model-name: grant_blocks
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: TimestampFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 4
+ 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
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-filter-parameter: true
+ x-cb-meta-model-name: grant_blocks
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: TimestampFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 5
+ 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
+ required: false
+ deprecated: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-filter-parameter: true
+ x-cb-meta-model-name: grant_blocks
+ x-cb-is-api-column: true
+ x-cb-sdk-filter-name: TimestampFilter
+ x-cb-is-multi-value-attribute: false
+ x-cb-sort-order: 6
+ 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
+ required: false
+ style: deepObject
+ explode: true
+ schema:
+ type: object
+ additionalProperties: true
+ x-cb-sort-order: 7
+ 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: []
+ x-cb-resource-id: grant_block
+ x-cb-sort-order: 0
+ x-cb-module: credit-grants
x-cb-operation-is-list: true
- x-cb-operation-method-name: alert_statusesForSubscription
+ x-cb-operation-method-name: listGrantBlocks
x-cb-is-operation-needs-input-object: true
- x-cb-sdk-method-name: alertStatusesForSubscription
- /alerts/{alert-id}/alert_statuses:
- get:
- summary: List alert statuses for an alert
- operationId: list_alert_statuses_for_an_alert
+ x-cb-is-operation-needs-json-input: true
+ x-cb-sdk-method-name: listGrantBlocks
+ /promotional_grants:
+ post:
+ summary: Create Promotional Grant
+ operationId: create_promotional_grant
parameters:
- description: The device from which the customer has made the request
$ref: "#/components/parameters/chargebee-request-origin-device"
@@ -163623,45 +165388,74 @@ paths:
$ref: "#/components/parameters/chargebee-request-origin-user-encoded"
- description: The IP address of the customer where the request originated
$ref: "#/components/parameters/chargebee-request-origin-ip"
+ - description: skip all actions to be done on the events
+ $ref: "#/components/parameters/chargebee-event-actions"
+ - description: skip only emails
+ $ref: "#/components/parameters/chargebee-event-email"
+ - description: ' skip only webhooks'
+ $ref: "#/components/parameters/chargebee-event-webhook"
- description: "If the site has multiple business entities, you can use this\
\ custom HTTP header to specify the business entity for which Chargebee\
\ should perform the operation."
$ref: "#/components/parameters/chargebee-business-entity-id"
- - $ref: "#/components/parameters/alert-id"
- - $ref: "#/components/parameters/limit"
- - $ref: "#/components/parameters/offset"
- - name: alarm_status
- in: query
- required: false
- deprecated: false
- style: deepObject
- explode: true
- schema:
- type: object
- deprecated: false
- x-cb-parameter-blank-option: not_allowed
- x-cb-attribute-meta-comment: optional
- x-cb-is-multi-value-attribute: true
- x-cb-is-filter-parameter: true
- x-cb-meta-model-name: alert_statuses
- x-cb-is-api-column: true
- x-cb-sdk-filter-name: EnumFilter
- x-cb-sort-order: 2
- properties:
- is:
- type: string
- description: |-
- * `within_limit` - WITHIN_LIMIT
- * `in_alarm` - IN_ALARM
- enum:
- - within_limit
- - in_alarm
- x-cb-is-external-enum: true
- x-cb-is-api-column: true
- x-cb-is-gen-separate: true
- x-cb-sdk-enum-api-name: AlarmStatus
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ type: object
+ properties:
+ subscription_id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 0
+ maxLength: 50
+ example: null
+ unit_id:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 1
+ maxLength: 50
+ example: null
+ amount:
+ type: string
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 2
+ maxLength: 36
+ example: null
+ expires_at:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-parameter-blank-option: not_allowed
+ x-cb-attribute-meta-comment: required
+ x-cb-is-api-column: true
+ x-cb-sort-order: 3
+ example: null
+ metadata:
+ type: object
+ additionalProperties: true
+ deprecated: false
+ x-cb-parameter-blank-option: as_null
+ x-cb-attribute-meta-comment: optional
+ x-cb-is-api-column: true
+ x-cb-sort-order: 4
+ example: null
+ required:
+ - amount
+ - expires_at
+ - subscription_id
+ - unit_id
example: null
- example: null
+ encoding: {}
responses:
"200":
description: OK
@@ -163670,27 +165464,21 @@ paths:
schema:
type: object
properties:
- list:
+ ledger_operations:
type: array
items:
- type: object
- properties:
- alert_status:
- $ref: "#/components/schemas/AlertStatus"
- description: Resource object representing alert_status
- required:
- - alert_status
- example: null
+ $ref: "#/components/schemas/LedgerOperation"
+ description: Resource object representing ledger_operation
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
+ grant_blocks:
+ type: array
+ items:
+ $ref: "#/components/schemas/GrantBlock"
+ description: Resource object representing grant_block
example: null
required:
- - list
+ - grant_blocks
+ - ledger_operations
example: null
"400":
description: on error
@@ -163755,13 +165543,14 @@ paths:
deprecated: false
security:
- BasicAuth: []
- x-cb-resource-id: alert_status
- x-cb-sort-order: 2
- x-cb-module: usage-based-billing
- x-cb-operation-is-list: true
- x-cb-operation-method-name: alert_statusesForAlert
+ x-cb-resource-id: promotional_grant
+ x-cb-sort-order: 0
+ x-cb-module: credit-grants
+ x-cb-operation-is-idempotent: true
+ x-cb-operation-method-name: promotionalGrants
x-cb-is-operation-needs-input-object: true
- x-cb-sdk-method-name: alertStatusesForAlert
+ x-cb-is-operation-needs-json-input: true
+ x-cb-sdk-method-name: promotionalGrants
/customers/{customer-id}/import_subscription:
post:
summary: Import subscription for customer
@@ -189735,46 +191524,56 @@ components:
maximum: 50000
minimum: -50000
example: null
+ notes:
+ type: array
+ deprecated: false
+ x-cb-sort-order: 31
+ items:
+ type: string
+ deprecated: false
+ maxLength: 3500
+ example: null
+ example: null
deleted:
type: boolean
deprecated: false
- x-cb-sort-order: 43
+ x-cb-sort-order: 44
example: null
tax_category:
type: string
deprecated: false
- x-cb-sort-order: 46
+ x-cb-sort-order: 47
example: null
local_currency_exchange_rate:
type: number
format: decimal
deprecated: false
- x-cb-sort-order: 47
+ x-cb-sort-order: 48
maximum: 1000000000
minimum: 0.0000000010
example: null
create_reason_code:
type: string
deprecated: false
- x-cb-sort-order: 48
+ x-cb-sort-order: 49
maxLength: 100
example: null
vat_number_prefix:
type: string
deprecated: false
- x-cb-sort-order: 49
+ x-cb-sort-order: 50
maxLength: 10
example: null
business_entity_id:
type: string
deprecated: false
- x-cb-sort-order: 50
+ x-cb-sort-order: 51
maxLength: 50
example: null
line_items:
type: array
deprecated: false
- x-cb-sort-order: 31
+ x-cb-sort-order: 32
items:
type: object
deprecated: false
@@ -189970,7 +191769,7 @@ components:
line_item_tiers:
type: array
deprecated: false
- x-cb-sort-order: 32
+ x-cb-sort-order: 33
items:
type: object
deprecated: false
@@ -190058,7 +191857,7 @@ components:
line_item_discounts:
type: array
deprecated: false
- x-cb-sort-order: 33
+ x-cb-sort-order: 34
items:
type: object
deprecated: false
@@ -190116,7 +191915,7 @@ components:
line_item_taxes:
type: array
deprecated: false
- x-cb-sort-order: 34
+ x-cb-sort-order: 35
items:
type: object
deprecated: false
@@ -190232,7 +192031,7 @@ components:
line_item_addresses:
type: array
deprecated: false
- x-cb-sort-order: 36
+ x-cb-sort-order: 37
items:
type: object
deprecated: false
@@ -190332,7 +192131,7 @@ components:
discounts:
type: array
deprecated: false
- x-cb-sort-order: 37
+ x-cb-sort-order: 38
items:
type: object
deprecated: false
@@ -190406,7 +192205,7 @@ components:
taxes:
type: array
deprecated: false
- x-cb-sort-order: 38
+ x-cb-sort-order: 39
items:
type: object
deprecated: false
@@ -190442,7 +192241,7 @@ components:
x-cb-is-sub-resource: true
x-cb-sub-resource-name: TaxOrigin
x-cb-sub-resource-parent-name: CreditNote
- x-cb-sort-order: 39
+ x-cb-sort-order: 40
properties:
country:
type: string
@@ -190458,7 +192257,7 @@ components:
linked_refunds:
type: array
deprecated: false
- x-cb-sort-order: 40
+ x-cb-sort-order: 41
items:
type: object
deprecated: false
@@ -190528,7 +192327,7 @@ components:
allocations:
type: array
deprecated: false
- x-cb-sort-order: 42
+ x-cb-sort-order: 43
items:
type: object
deprecated: false
@@ -190602,7 +192401,7 @@ components:
x-cb-is-sub-resource: true
x-cb-sub-resource-name: ShippingAddress
x-cb-sub-resource-parent-name: CreditNote
- x-cb-sort-order: 51
+ x-cb-sort-order: 52
properties:
first_name:
type: string
@@ -190694,7 +192493,7 @@ components:
x-cb-is-sub-resource: true
x-cb-sub-resource-name: BillingAddress
x-cb-sub-resource-parent-name: CreditNote
- x-cb-sort-order: 52
+ x-cb-sort-order: 53
properties:
first_name:
type: string
@@ -190786,7 +192585,7 @@ components:
x-cb-is-sub-resource: true
x-cb-sub-resource-name: Einvoice
x-cb-sub-resource-parent-name: CreditNote
- x-cb-sort-order: 53
+ x-cb-sort-order: 54
properties:
id:
type: string
@@ -190848,7 +192647,7 @@ components:
x-cb-is-sub-resource: true
x-cb-sub-resource-name: SiteDetailsAtCreation
x-cb-sub-resource-parent-name: CreditNote
- x-cb-sort-order: 54
+ x-cb-sort-order: 55
properties:
timezone:
type: string
@@ -200600,6 +202399,173 @@ components:
- source
- webhook_status
example: null
+ GrantBlock:
+ type: object
+ x-cb-resource-id: grant_block
+ x-cb-resource-path-name: grant_blocks
+ x-cb-is-dependent-resource: false
+ x-cb-sort-order: 170
+ properties:
+ id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 0
+ maxLength: 50
+ example: null
+ granted_amount:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 1
+ maxLength: 36
+ example: null
+ effective_from:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-sort-order: 2
+ example: null
+ expires_at:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-sort-order: 3
+ example: null
+ balance:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 4
+ maxLength: 36
+ example: null
+ hold_amount:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 5
+ maxLength: 36
+ example: null
+ used_amount:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 6
+ maxLength: 36
+ example: null
+ expired_amount:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 7
+ maxLength: 36
+ example: null
+ rolled_over_amount:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 8
+ maxLength: 36
+ example: null
+ voided_amount:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 9
+ maxLength: 36
+ example: null
+ origin_grant_block_id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 10
+ maxLength: 50
+ example: null
+ status:
+ type: string
+ default: available
+ deprecated: false
+ enum:
+ - available
+ - exhausted
+ - scheduled
+ - in_grace_period
+ x-cb-is-global-enum: true
+ x-cb-is-api-column: true
+ x-cb-is-external-enum: false
+ x-cb-is-gen-separate: true
+ x-cb-is-ignore-generation: false
+ x-cb-sdk-enum-api-name: Status
+ x-cb-global-enum-reference: ./schemas/enums/Status.yaml
+ x-cb-sort-order: 11
+ example: null
+ metadata:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 12
+ maxLength: 65000
+ example: null
+ grant_source:
+ type: string
+ deprecated: false
+ enum:
+ - subscription_created
+ - subscription_changed
+ - top_up
+ - promotional_grants
+ - rollover
+ x-cb-is-global-enum: false
+ x-cb-is-api-column: true
+ x-cb-is-external-enum: false
+ x-cb-is-gen-separate: false
+ x-cb-is-ignore-generation: false
+ x-cb-sdk-enum-api-name: GrantSource
+ x-cb-sort-order: 13
+ example: null
+ created_at:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-sort-order: 14
+ example: null
+ account_type:
+ type: string
+ deprecated: false
+ enum:
+ - provisioned
+ - overdraft
+ x-cb-is-global-enum: false
+ x-cb-is-api-column: true
+ x-cb-is-external-enum: false
+ x-cb-is-gen-separate: false
+ x-cb-is-ignore-generation: false
+ x-cb-sdk-enum-api-name: AccountType
+ x-cb-sort-order: 15
+ example: null
+ unit_id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 16
+ maxLength: 50
+ example: null
+ unit_type:
+ type: string
+ deprecated: false
+ enum:
+ - credit_unit
+ x-cb-is-global-enum: false
+ x-cb-is-api-column: true
+ x-cb-is-external-enum: false
+ x-cb-is-gen-separate: false
+ x-cb-is-ignore-generation: false
+ x-cb-sdk-enum-api-name: UnitType
+ x-cb-sort-order: 17
+ example: null
+ required:
+ - balance
+ - effective_from
+ - expired_amount
+ - expires_at
+ - grant_source
+ - granted_amount
+ - hold_amount
+ - id
+ - rolled_over_amount
+ - status
+ - used_amount
+ - voided_amount
+ example: null
Hierarchy:
type: object
x-cb-resource-id: hierarchy
@@ -200800,7 +202766,7 @@ components:
- accept_quote
- checkout_gift
- claim_gift
- x-cb-deprecated-enum-values: update_card
+ x-cb-deprecated-enum-values: "update_card,update_payment_method"
x-cb-is-global-enum: false
x-cb-is-api-column: true
x-cb-is-external-enum: false
@@ -200867,34 +202833,49 @@ components:
deprecated: false
x-cb-sort-order: 8
example: null
+ layout:
+ type: string
+ deprecated: false
+ enum:
+ - in_app
+ - full_page
+ x-cb-is-global-enum: true
+ x-cb-is-api-column: true
+ x-cb-is-external-enum: true
+ x-cb-is-gen-separate: true
+ x-cb-is-ignore-generation: false
+ x-cb-sdk-enum-api-name: Layout
+ x-cb-global-enum-reference: ./schemas/enums/Layout.yaml
+ x-cb-sort-order: 10
+ example: null
content:
type: object
additionalProperties: true
deprecated: false
- x-cb-sort-order: 10
+ x-cb-sort-order: 11
example: null
updated_at:
type: integer
format: unix-time
deprecated: false
- x-cb-sort-order: 11
+ x-cb-sort-order: 12
example: null
resource_version:
type: integer
format: int64
deprecated: false
- x-cb-sort-order: 12
+ x-cb-sort-order: 13
example: null
checkout_info:
type: object
additionalProperties: true
deprecated: false
- x-cb-sort-order: 13
+ x-cb-sort-order: 14
example: null
business_entity_id:
type: string
deprecated: false
- x-cb-sort-order: 14
+ x-cb-sort-order: 15
maxLength: 50
example: null
embed:
@@ -205905,15 +207886,277 @@ components:
enum:
- in_app
- full_page
- x-cb-parameter-blank-option: as_null
- x-cb-attribute-meta-comment: optional
- x-cb-is-api-column: true
x-cb-is-global-enum: true
+ x-cb-is-api-column: true
x-cb-is-external-enum: true
x-cb-is-gen-separate: true
x-cb-is-ignore-generation: false
x-cb-sdk-enum-api-name: Layout
example: null
+ LedgerAccountBalance:
+ type: object
+ x-cb-resource-id: ledger_account_balance
+ x-cb-resource-path-name: ledger_account_balances
+ x-cb-is-dependent-resource: false
+ x-cb-sort-order: 168
+ x-cb-product-catalog-version: 2
+ properties:
+ subscription_id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 0
+ maxLength: 50
+ example: null
+ unit_id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 1
+ maxLength: 50
+ example: null
+ unit_type:
+ type: string
+ deprecated: false
+ enum:
+ - credit_unit
+ x-cb-is-global-enum: false
+ x-cb-is-api-column: true
+ x-cb-is-external-enum: false
+ x-cb-is-gen-separate: false
+ x-cb-is-ignore-generation: false
+ x-cb-sdk-enum-api-name: UnitType
+ x-cb-sort-order: 2
+ example: null
+ modified_at:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-sort-order: 3
+ example: null
+ provisioned_balance:
+ type: object
+ deprecated: false
+ x-cb-is-sub-resource: true
+ x-cb-sub-resource-name: ProvisionedBalance
+ x-cb-sub-resource-parent-name: LedgerAccountBalance
+ x-cb-sort-order: 4
+ properties:
+ total_balance:
+ type: string
+ deprecated: false
+ maxLength: 36
+ example: null
+ usable_balance:
+ type: string
+ deprecated: false
+ maxLength: 36
+ example: null
+ hold_amount:
+ type: string
+ deprecated: false
+ maxLength: 36
+ example: null
+ required:
+ - hold_amount
+ - total_balance
+ - usable_balance
+ example: null
+ overdraft_balance:
+ type: object
+ deprecated: false
+ x-cb-is-sub-resource: true
+ x-cb-sub-resource-name: OverdraftBalance
+ x-cb-sub-resource-parent-name: LedgerAccountBalance
+ x-cb-sort-order: 5
+ properties:
+ is_unlimited:
+ type: boolean
+ default: false
+ deprecated: false
+ example: null
+ limit:
+ type: string
+ deprecated: false
+ maxLength: 36
+ example: null
+ total_balance:
+ type: string
+ deprecated: false
+ maxLength: 36
+ example: null
+ usable_balance:
+ type: string
+ deprecated: false
+ maxLength: 36
+ example: null
+ used_amount:
+ type: string
+ deprecated: false
+ maxLength: 36
+ example: null
+ hold_amount:
+ type: string
+ deprecated: false
+ maxLength: 36
+ example: null
+ required:
+ - hold_amount
+ - is_unlimited
+ - used_amount
+ example: null
+ required:
+ - subscription_id
+ - unit_id
+ - unit_type
+ example: null
+ LedgerOperation:
+ type: object
+ x-cb-resource-id: ledger_operation
+ x-cb-resource-path-name: ledger_operations
+ x-cb-is-dependent-resource: false
+ x-cb-sort-order: 169
+ x-cb-product-catalog-version: 2
+ properties:
+ id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 0
+ maxLength: 50
+ example: null
+ type:
+ type: string
+ deprecated: false
+ enum:
+ - allocation
+ - capture
+ - authorize
+ - release_authorization
+ - capture_authorization
+ - expiry
+ - void
+ - rollover
+ - adjustment
+ x-cb-is-global-enum: false
+ x-cb-is-api-column: true
+ x-cb-is-external-enum: false
+ x-cb-is-gen-separate: false
+ x-cb-is-ignore-generation: false
+ x-cb-sdk-enum-api-name: Type
+ x-cb-sort-order: 1
+ example: null
+ amount:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 2
+ maxLength: 36
+ example: null
+ start_balance:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 3
+ maxLength: 36
+ example: null
+ end_balance:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 4
+ maxLength: 36
+ example: null
+ provisioned_start_balance:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 5
+ maxLength: 36
+ example: null
+ provisioned_end_balance:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 6
+ maxLength: 36
+ example: null
+ overdraft_start_balance:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 7
+ maxLength: 36
+ example: null
+ overdraft_end_balance:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 8
+ maxLength: 36
+ example: null
+ parent_ledger_operation_id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 9
+ maxLength: 50
+ example: null
+ ledger_operation_timestamp:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-sort-order: 10
+ example: null
+ auto_release_timestamp:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-sort-order: 11
+ example: null
+ metadata:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 12
+ maxLength: 65000
+ example: null
+ created_at:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-sort-order: 13
+ example: null
+ modified_at:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-sort-order: 14
+ example: null
+ subscription_id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 15
+ maxLength: 50
+ example: null
+ unit_id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 16
+ maxLength: 100
+ example: null
+ unit_type:
+ type: string
+ deprecated: false
+ enum:
+ - credit_unit
+ x-cb-is-global-enum: false
+ x-cb-is-api-column: true
+ x-cb-is-external-enum: false
+ x-cb-is-gen-separate: false
+ x-cb-is-ignore-generation: false
+ x-cb-sdk-enum-api-name: UnitType
+ x-cb-sort-order: 17
+ example: null
+ required:
+ - amount
+ - end_balance
+ - id
+ - overdraft_end_balance
+ - overdraft_start_balance
+ - provisioned_end_balance
+ - provisioned_start_balance
+ - start_balance
+ - type
+ example: null
Media:
type: object
x-cb-resource-id: media
@@ -216012,6 +218255,50 @@ components:
- source
- webhook_status
example: null
+ PromotionalGrant:
+ type: object
+ x-cb-resource-id: promotional_grant
+ x-cb-resource-path-name: promotional_grants
+ x-cb-is-dependent-resource: false
+ x-cb-sort-order: 171
+ x-cb-product-catalog-version: 2
+ properties:
+ subscription_id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 0
+ maxLength: 50
+ example: null
+ unit_id:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 1
+ maxLength: 50
+ example: null
+ amount:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 2
+ maxLength: 36
+ example: null
+ expires_at:
+ type: integer
+ format: unix-time
+ deprecated: false
+ x-cb-sort-order: 3
+ example: null
+ metadata:
+ type: string
+ deprecated: false
+ x-cb-sort-order: 4
+ maxLength: 65000
+ example: null
+ required:
+ - amount
+ - expires_at
+ - subscription_id
+ - unit_id
+ example: null
ProrationType:
type: string
deprecated: false
@@ -221963,6 +224250,22 @@ components:
x-cb-is-ignore-generation: false
x-cb-sdk-enum-api-name: Source
example: null
+ Status:
+ type: string
+ default: available
+ deprecated: false
+ enum:
+ - available
+ - exhausted
+ - scheduled
+ - in_grace_period
+ x-cb-is-global-enum: true
+ x-cb-is-api-column: true
+ x-cb-is-external-enum: false
+ x-cb-is-gen-separate: true
+ x-cb-is-ignore-generation: false
+ x-cb-sdk-enum-api-name: Status
+ example: null
Subscription:
type: object
additionalProperties: true