{ "openapi" : "3.1.0", "info" : { "title" : "Chargebee API", "contact" : { "name" : "Chargebee Support", "url" : "https://www.chargebee.com", "email" : "support@chargebee.com" }, "version" : "2026-08-28.ac160eefbc69961d63f4f80ac6f28ba294244db8", "x-cb-api-version" : 2, "x-cb-product-catalog-version" : 1, "x-generated-on" : 1787899942100 }, "servers" : [ { "url" : "{protocol}://{site}.{environment}:{port}/api/v2", "variables" : { "protocol" : { "enum" : [ "https" ], "default" : "https" }, "site" : { "default" : "demo" }, "environment" : { "enum" : [ "chargebee.com" ], "default" : "chargebee.com" }, "port" : { "enum" : [ "443" ], "default" : "443" } } }, { "url" : "{protocol}://{site}-test.{environment}:{port}/api/v2", "variables" : { "protocol" : { "enum" : [ "https" ], "default" : "https" }, "site" : { "default" : "demo" }, "environment" : { "enum" : [ "chargebee.com" ], "default" : "chargebee.com" }, "port" : { "enum" : [ "443" ], "default" : "443" } } } ], "paths" : { "/subscriptions/{subscription-id}/remove_advance_invoice_schedule" : { "post" : { "summary" : "Remove an advance invoice schedules", "description" : "Deletes an advance invoicing schedule. When *schedule_type = specific_dates*, you also have the option of deleting a part of the schedule.\n", "operationId" : "remove_an_advance_invoice_schedules", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})(?:(?:(?:(?:(?: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:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "specific_dates_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for specific_dates_schedule\n", "properties" : { "id" : { "type" : "array", "description" : "When *schedule_type = specific_dates*\n, pass the id of the [specific_dates_schedule](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#specific_dates_schedule)\nthat you want to remove. If not passed, the entire advance_invoice_schedule is removed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "specific_dates_schedule" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "
Resource object representing subscription
" }, "advance_invoice_schedules" : { "type" : "array", "description" : "Resource object representing advance_invoice_schedule
", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule", "description" : "Resource object representing advance_invoice_schedule" }, "example" : null } }, "required" : [ "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/remove_coupons" : { "post" : { "summary" : "Remove coupons", "description" : "Removes Coupons associated with the Subscription. If the param 'coupon_ids' is not specified, all the Coupons linked to the Subscription will be removed.\n", "operationId" : "remove_coupons", "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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-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be removed from the subscription. You can provide only [coupon_id](/docs/api/coupons/coupon-object#id)\nand not [coupon_code](/docs/api/coupon_codes/coupon_code-object#code)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/resume" : { "post" : { "summary" : "Resume a subscription", "description" : "**Note:**\nThis operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/getting-started)\nand pass it as input parameter to this API.\n\nThis API is used to resume a **paused** subscription. On resumption the subscription will be activated and any applicable charges will be initiated.\n\nYou could schedule the resumption by passing **specific_date** parameter in resume_option. If scheduled, the subscription will be resumed on the **specific_date** and moved to Active state.\n\nFor in-term resumption, unless there are scheduled changes, unbilled charges will not be charged.\n\n**What is an \"in-term resumption\"?**\n\nAn \"in-term resumption\" is when the pause and resumption happens within the billing term of the subscription.\n\n**Example :** A subscription was billed from 1st to 31st of a month. It was paused on the 20th and resumed before 31st. This is an in-term resumption.\n\n#### UNPAID INVOICES\n\nSpecifying **unpaid_invoices** allows you to close invoices of the subscription which have amounts due. The invoices are chosen for payment collection after applying the available credits and excess payments.\n\nIf specified as **schedule_payment_collection**, payment collection for the amount due of past invoices will be attempted. The payment method available will be charged if auto-collection is enabled for the customer, and appropriate payment collection(payment succeeded or payment failed) events will be triggered. If the payment collection fails, no further retries will be made on the invoices.\n\n**Note:** If the invoices of the subscription are consolidated, and any of the subscriptions in the consolidated invoice are cancelled, these invoices will not be selected for collection.\n", "operationId" : "resume_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|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1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "resume_option" : { "type" : "string", "deprecated" : false, "description" : "List of options to resume the subscription.\n\n* immediately - Resume immediately\n* specific_date - Resume on a specific date\n", "enum" : [ "immediately", "specific_date" ], "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date on which the subscription will be resumed. Applicable when **resume_option**\nis set as 'specific_date'.\n", "example" : null }, "charges_handling" : { "type" : "string", "deprecated" : false, "description" : "Applicable when charges get added during this operation and **resume_option**\nis set as 'immediately'. Allows to raise invoice immediately or add them to unbilled charges.\n\n* add_to_unbilled_charges - Add to unbilled charges\n* invoice_immediately - Invoice immediately\n", "enum" : [ "invoice_immediately", "add_to_unbilled_charges" ], "example" : null }, "unpaid_invoices_handling" : { "type" : "string", "deprecated" : false, "description" : "Applicable when the subscription has past due invoices and **resume_option**\nis set as 'immediately'. Allows to collect past due invoices or retain them as unpaid. If 'schedule_payment_collection' option is chosen in this field, remaining refundable credits and excess payments are applied.\n**Note:**\nThe payment collection attempt will be asynchronous.\n\n* no_action - Retain as unpaid\n* schedule_payment_collection - Collect payment\n", "enum" : [ "no_action", "schedule_payment_collection" ], "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\n* customer - Pass this value to indicate that the request is initiated by the customer\n* merchant - Pass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "description" : "Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay.\n\n* alipay_hk - Payments made via Alipay HK.\n* card - card\n* twint - Payments made via Twint\n* swish - Payments made via Swish\n* after_pay - Payments made via Afterpay\n* netbanking_emandates - netbanking_emandates\n* grab_pay - Payments made via GrabPay\n* paypay - PayPay\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* dotpay - dotpay\n* faster_payments - Faster Payments\n* upi - upi\n* kbc_payment_button - KBC Payment Button\n* electronic_payment_standard - Electronic Payment Standard\n* klarna - Payments made via Klarna.\n* payme - Payments made via PayMe\n* direct_debit - direct_debit\n* sepa_instant_transfer - Sepa Instant Transfer\n* bancontact - bancontact\n* go_pay - Payments made via GoPay\n* pay_by_bank - Pay By Bank\n* touch_n_go - Payments made via Touch 'n Go.\n* google_pay - google_pay\n* apple_pay - apple_pay\n* qpay - Payments made via Qpay.\n* online_banking_poland - Online Banking Poland\n* trustly - Trustly\n* gcash - Payments made via GCash.\n* naver_pay - Payments made via Naver Pay.\n* stablecoin - Payments made via Stablecoin.\n* giropay - giropay\n* paypal_express_checkout - paypal_express_checkout\n* pix - Pix\n* venmo - Venmo\n* klarna_pay_now - Klarna Pay Now\n* alipay - Payments made via Alipay.\n* sofort - sofort\n* amazon_payments - Amazon Payments\n* tamara - Payments made via Tamara.\n* ideal - ideal\n* kakao_pay - Payments made via Kakao Pay.\n* pay_to - PayTo\n* dana - Payments made via Dana.\n* south_korean_cards - Payments made via South Korean Cards\n* boleto - boleto\n* pay_co - Payments made via PayCo\n* revolut_pay - Payments made via Revolut Pay.\n* wechat_pay - Payments made via WeChat Pay.\n* cash_app_pay - Payments made via Cash App Pay.\n", "enum" : [ "card", "ideal", "sofort", "bancontact", "google_pay", "dotpay", "giropay", "apple_pay", "upi", "netbanking_emandates", "paypal_express_checkout", "direct_debit", "boleto", "venmo", "amazon_payments", "pay_to", "faster_payments", "sepa_instant_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "payment_intent" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/regenerate_invoice" : { "post" : { "summary" : "Regenerate an invoice", "description" : "Regenerates the invoice for the current term of the subscription. The subscription must have `status` as `active` or `non_renewing`. This operation is not allowed when any of the following conditions hold true for the subscription:\n\n* An invoice exists for the current term and its `status` is not `voided`.\n* There are [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html) for the current term.\n* The subscription has an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html).\n\n#### Response\n\nReturns one of the following depending on the value of `invoice_immediately`:\n\n* If the value is `true`: an `invoice` object that corresponds to the regenerated invoice.\n* If the value is `false`: a list of `unbilled_charge` objects corresponding to all the unbilled charges created for the current term of the subscription.\n", "operationId" : "regenerate_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])$|^(?:(?:(?:(?:(?:(?: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1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the period being invoiced. The default value is [current_term_start](/docs/api/subscriptions/subscription-object#current_term_start)\n.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the period being invoiced. The default value is [current_term_end](/docs/api/subscriptions/subscription-object#current_term_end)\n.\n", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "Whether the charges should be prorated according to the term specified by `date_from`\nand `date_to`.\nShould not be passed without `date_from`\nand `date_to`\n.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "Only applicable when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html )\nis enabled for the customer. Set to `false`\nto leave the current term charge for the subscription as [unbilled](https://www.chargebee.com/docs/unbilled-charges.html ).\nOnce you have done this for all suitable subscriptions of the customer, call [Create an invoice for unbilled charges](/docs/api/unbilled_charges/create-an-invoice-for-unbilled-charges)\nto invoice them.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions" : { "get" : { "summary" : "List subscriptions", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nReturns a list of subscriptions meeting **all** the conditions specified in the filter parameters below.\n", "operationId" : "list_subscriptions", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "Indicates whether to include deleted objects in the list. The deleted objects have the attribute `deleted`\nas `true`\n.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nA unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"8gsnbYfsMLds\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer with whom this subscription is associated.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"8gsnbYfsMLds\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8gsnbYfsMLds", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "plan_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the plan for this subscription.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*plan_id\\[is\\] = \"basic\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "basic", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent state of the subscription. Possible values are : future, in_trial, active, non_renewing, paused, cancelled.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"active\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `future` - The subscription is scheduled to start at a future date.\n* `in_trial` - The subscription is in trial.\n* `active` - The subscription is active and will be charged for automatically based on the items in it.\n* `non_renewing` - The subscription will be canceled at the end of the current term.\n* `paused` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state.\n* `cancelled` - The subscription has been canceled and is no longer in service.\n* `transferred` - The subscription has been transferred to another business entity within the organization.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `future` - The subscription is scheduled to start at a future date.\n* `in_trial` - The subscription is in trial.\n* `active` - The subscription is active and will be charged for automatically based on the items in it.\n* `non_renewing` - The subscription will be canceled at the end of the current term.\n* `paused` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state.\n* `cancelled` - The subscription has been canceled and is no longer in service.\n* `transferred` - The subscription has been transferred to another business entity within the organization.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "in" : { "type" : "string", "description" : "* `future` - The subscription is scheduled to start at a future date.\n* `in_trial` - The subscription is in trial.\n* `active` - The subscription is active and will be charged for automatically based on the items in it.\n* `non_renewing` - The subscription will be canceled at the end of the current term.\n* `paused` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state.\n* `cancelled` - The subscription has been canceled and is no longer in service.\n* `transferred` - The subscription has been transferred to another business entity within the organization.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `future` - The subscription is scheduled to start at a future date.\n* `in_trial` - The subscription is in trial.\n* `active` - The subscription is active and will be charged for automatically based on the items in it.\n* `non_renewing` - The subscription will be canceled at the end of the current term.\n* `paused` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state.\n* `cancelled` - The subscription has been canceled and is no longer in service.\n* `transferred` - The subscription has been transferred to another business entity within the organization.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "pattern" : "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\]$", "example" : null } } } }, { "name" : "cancel_reason", "in" : "query", "description" : "optional, enumerated string filter\n\nThe reason for canceling the subscription. Set by Chargebee automatically. Possible values are : not_paid, no_card, fraud_review_failed, non_compliant_eu_customer, tax_calculation_failed, currency_incompatible_with_gateway, non_compliant_customer.\n\n**Supported operators :**\nis, is_not, in, not_in, is_present\n\n**Example →**\n*cancel_reason\\[is\\] = \"not_paid\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "not_paid", "properties" : { "is" : { "type" : "string", "description" : "* `not_paid` - Not Paid\n* `no_card` - No Card\n* `fraud_review_failed` - Fraud Review Failed\n* `non_compliant_eu_customer` - Non Compliant EU Customer\n* `tax_calculation_failed` - Tax Calculation Failed\n* `currency_incompatible_with_gateway` - Currency incompatible with Gateway\n* `non_compliant_customer` - Non Compliant Customer", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `not_paid` - Not Paid\n* `no_card` - No Card\n* `fraud_review_failed` - Fraud Review Failed\n* `non_compliant_eu_customer` - Non Compliant EU Customer\n* `tax_calculation_failed` - Tax Calculation Failed\n* `currency_incompatible_with_gateway` - Currency incompatible with Gateway\n* `non_compliant_customer` - Non Compliant Customer", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "example" : null }, "in" : { "type" : "string", "description" : "* `not_paid` - Not Paid\n* `no_card` - No Card\n* `fraud_review_failed` - Fraud Review Failed\n* `non_compliant_eu_customer` - Non Compliant EU Customer\n* `tax_calculation_failed` - Tax Calculation Failed\n* `currency_incompatible_with_gateway` - Currency incompatible with Gateway\n* `non_compliant_customer` - Non Compliant Customer", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "pattern" : "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `not_paid` - Not Paid\n* `no_card` - No Card\n* `fraud_review_failed` - Fraud Review Failed\n* `non_compliant_eu_customer` - Non Compliant EU Customer\n* `tax_calculation_failed` - Tax Calculation Failed\n* `currency_incompatible_with_gateway` - Currency incompatible with Gateway\n* `non_compliant_customer` - Non Compliant Customer", "enum" : [ "not_paid", "no_card", "fraud_review_failed", "non_compliant_eu_customer", "tax_calculation_failed", "currency_incompatible_with_gateway", "non_compliant_customer" ], "pattern" : "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "cancel_reason_code", "in" : "query", "description" : "optional, string filter\n\nReason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Subscriptions \\> Subscription Cancellation** .\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*cancel_reason_code\\[is_not\\] = \"Not Paid\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Not Paid", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "remaining_billing_cycles", "in" : "query", "description" : "optional, integer filter\n\n* When the subscription is not on a contract term: this value is the number of billing cycles remaining after the current cycle, at the end of which, the subscription cancels.\n* When the subscription is on a [contract term](/docs/api/contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle. . **Supported operators :** is, is_not, lt, lte, gt, gte, between, is_present\n\n**Example →**\n*remaining_billing_cycles\\[gt\\] = \"3\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe time at which the subscription was created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "activated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTime at which the subscription `status`\nlast changed to\n`active`.\nFor example, this value is updated when an `in_trial`\nor\n`cancelled`\nsubscription activates.\n**Supported operators :**\nafter, before, on, between, is_present\n\n**Example →**\n*activated_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "next_billing_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe date/time at which the next billing for the subscription happens. This is usually right after `current_term_end`\nunless multiple subscription terms were invoiced in advance using the `terms_to_charge`\nparameter.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*next_billing_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "cancelled_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTime at which subscription was cancelled or is set to be cancelled.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*cancelled_at\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "has_scheduled_changes", "in" : "query", "description" : "optional, boolean filter\n\nIf `true`\n, there are subscription changes scheduled on next renewal. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*has_scheduled_changes\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on `updated_at`.\nThis attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the `sort_by`\ninput parameter as `updated_at`\nfor a faster response.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "offline_payment_method", "in" : "query", "description" : "optional, enumerated string filter\n\nThe preferred offline payment method for the subscription. Possible values are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*offline_payment_method\\[is\\] = \"cash\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "cash", "properties" : { "is" : { "type" : "string", "description" : "* `no_preference` - No Preference\n* `cash` - Cash\n* `check` - Check\n* `bank_transfer` - Bank Transfer\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `boleto` - Boleto\n* `us_automated_bank_transfer` - US Automated Bank Transfer\n* `eu_automated_bank_transfer` - EU Automated Bank Transfer\n* `uk_automated_bank_transfer` - UK Automated Bank Transfer\n* `jp_automated_bank_transfer` - JP Automated Bank Transfer\n* `mx_automated_bank_transfer` - MX Automated Bank Transfer\n* `custom` - Custom", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `no_preference` - No Preference\n* `cash` - Cash\n* `check` - Check\n* `bank_transfer` - Bank Transfer\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `boleto` - Boleto\n* `us_automated_bank_transfer` - US Automated Bank Transfer\n* `eu_automated_bank_transfer` - EU Automated Bank Transfer\n* `uk_automated_bank_transfer` - UK Automated Bank Transfer\n* `jp_automated_bank_transfer` - JP Automated Bank Transfer\n* `mx_automated_bank_transfer` - MX Automated Bank Transfer\n* `custom` - Custom", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "in" : { "type" : "string", "description" : "* `no_preference` - No Preference\n* `cash` - Cash\n* `check` - Check\n* `bank_transfer` - Bank Transfer\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `boleto` - Boleto\n* `us_automated_bank_transfer` - US Automated Bank Transfer\n* `eu_automated_bank_transfer` - EU Automated Bank Transfer\n* `uk_automated_bank_transfer` - UK Automated Bank Transfer\n* `jp_automated_bank_transfer` - JP Automated Bank Transfer\n* `mx_automated_bank_transfer` - MX Automated Bank Transfer\n* `custom` - Custom", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "pattern" : "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `no_preference` - No Preference\n* `cash` - Cash\n* `check` - Check\n* `bank_transfer` - Bank Transfer\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `boleto` - Boleto\n* `us_automated_bank_transfer` - US Automated Bank Transfer\n* `eu_automated_bank_transfer` - EU Automated Bank Transfer\n* `uk_automated_bank_transfer` - UK Automated Bank Transfer\n* `jp_automated_bank_transfer` - JP Automated Bank Transfer\n* `mx_automated_bank_transfer` - MX Automated Bank Transfer\n* `custom` - Custom", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "pattern" : "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\]$", "example" : null } } } }, { "name" : "auto_close_invoices", "in" : "query", "description" : "optional, boolean filter\n\nSet to `false`\nto override for this subscription, the [site-level setting](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing)\nfor auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the [customer level](/docs/api/customers/customer-object#auto_close_invoices).\nPossible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*auto_close_invoices\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "override_relationship", "in" : "query", "description" : "optional, boolean filter\n\nIf `true`\n, ignores the [hierarchy relationship](/docs/api/customers/customer-object#relationship)\nand uses customer as payment and invoice owner. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*override_relationship\\[is\\] = \"false\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "false", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null } }, "example" : null } }, { "name" : "business_entity_id", "in" : "query", "description" : "optional, string filter\n\nThe ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity. \n**Note**\n\n[Multiple Business Entities](/docs/api/getting-started) is a feature available only on Product Catalog 2.0.\n\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*business_entity_id\\[is\\] = \"business_entity_id\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "business_entity_id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is_not\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "properties" : { "is" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "decommissioned", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card" } }, "required" : [ "customer", "subscription" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/move" : { "post" : { "summary" : "Move a subscription", "description" : "Moves a subscription from one [customer](/docs/api/v2/pcv-1/customers) to another asynchronously. All related resources such as [unbilled_charge](/docs/api/v2/pcv-1/unbilled_charges), [invoice](/docs/api/v2/pcv-1/invoices), [credit_note](/docs/api/v2/pcv-1/credit_notes), and [transaction](/docs/api/v2/pcv-1/transactions) are also moved to the new customer.\n\nAfter moving, Chargebee adds a [comment](/docs/api/v2/pcv-1/comments) to the original `customer` resource to document the move, including the [to_customer_id](/docs/api/v2/pcv-1/subscriptions/move-a-subscription#to_customer_id) and the `id`s of all the resources transferred to the destination customer. \n**Warning**\n\n* If [auto_collection](/docs/api/subscriptions/create-subscription-for-items) is `on`, it might fail after this operation. Refer to the warning in [copy_payment_source](/docs/api/v2/pcv-1/subscriptions/move-a-subscription#copy_payment_source) for details.\n* During the time that it takes for the operation to complete, no modifications are allowed on the source customer, the destination customer, and the subscription.\n* After moving a subscription, the change does not reflect in Chargebee Billing's [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html) or in [Chargebee RevRec](https://www.chargebee.com/docs/revrec/chargebee-billing-features.html).\n\n#### Prerequisites\n\n* The subscription should not be part of a `customer` resource that is within an account hierarchy [relationship](/docs/api/v2/pcv-1/customers/customer-object#relationship).\n* There must be no invoices with the [statuses](/docs/api/v2/pcv-1/invoices/invoice-object#status) `payment_due`, `pending`, or `posted` associated with the subscription.\n* The site must have [consolidated invoicing](https://www.chargebee.com/docs/1.0/consolidated-invoicing.html) disabled.\n* There should be no consolidated invoices linked to the subscription.\n* No `credit_note` resources with the [statuses](/docs/api/v2/pcv-1/credit_notes/credit_note-object#status) `adjusted` or `refund_due` should be associated with the subscription.\n\n#### Asynchronous operation\n\nIf the above prerequisites are met, the API call returns a `200 OK` response containing the `subscription` resource as is. However, the actual move operation can take up to **five** minutes to complete.\n\nTo know whether the operation was successful, we recommend that you watch for the [subscription_changed](/docs/api/v2/pcv-1/events) event and see if `subscription.customer_id` has changed.\n\n#### Limitations\n\n* Subscriptions cannot be moved on the same calendar day as their renewal. For instance, if a renewal is scheduled for 2 PM on April 10, 2024, the endpoint is restricted from 12 AM on April 10, 2024, until the renewal is completed.\n* After moving a subscription, the change does not reflect in Chargebee Billing's [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html) or in [Chargebee RevRec](https://www.chargebee.com/docs/revrec/chargebee-billing-features.html).\n\n**Note** :\nResources linked to the original customer such as `unbilled_charge`\n, `invoice`\n, `credit_note`\n, and `transaction`\nbut **not**\nlinked to the subscription being moved, are **not**\nmoved to the destination customer by this operation.\n", "operationId" : "move_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|(?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9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "to_customer_id" : { "type" : "string", "deprecated" : false, "description" : "Specifies the unique ID of the `customer` resource to which the subscription will be moved.\n", "maxLength" : 50, "example" : null }, "copy_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "**When `true`:**\nIf the subscription has an [associated `payment_source`](/docs/api/v2/pcv-1/subscriptions/subscription-object#payment_source_id):\n\n1. A new duplicate copy of the `payment_source` resource is created.\n2. This new copy of the payment source is linked to the subscription and the destination customer.\n\n**Note** :\nDeleting any copy of the `payment_source`\nalso deletes the other copies and the details stored at the payment gateway.\n\n**When `false`:**\nNo new payment source is created for the subscription. Moreover, if a `payment_source` is already [linked](/docs/api/v2/pcv-1/subscriptions/subscription-object#payment_source_id) to the subscription, it gets removed, meaning the `subscription.payment_source_id` is cleared. \n**Warning** :\nWhen `copy_payment_source`\nis `false`\nand if [subscription.auto_collection](/docs/api/subscriptions/create-subscription-for-items)\nis enabled, auto-collection will fail, in turn preventing subscription renewal. To prevent auto-collection failure, [link a payment source](/docs/api/v2/pcv-1/subscriptions/override-billing-profile)\nto the subscription after this operation.\n", "example" : null } }, "required" : [ "to_customer_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" } }, "required" : [ "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/import_subscription" : { "post" : { "summary" : "Import subscription for customer", "description" : "Import the subscription details of a customer.\n", "operationId" : "import_subscription_for_customer", "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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[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription.\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription.\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial ends for this subscription. Can be specified to override the default trial period.If **'0'**\nis passed, the subscription will be activated immediately.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.\n", "minimum" : 0, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately.\n", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n", "enum" : [ "on", "off" ], "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](/docs/api/coupon_codes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Id of the payment source to be attached to this subscription.\n", "maxLength" : 40, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current state of the subscription.\n\n* future - The subscription is scheduled to start at a future date.\n* active - The subscription is active and will be charged for automatically based on the items in it.\n* cancelled - The subscription has been canceled and is no longer in service.\n* transferred - The subscription has been transferred to another business entity within the organization.\n* in_trial - The subscription is in trial.\n* non_renewing - The subscription will be canceled at the end of the current term.\n* paused -\n The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html).\n The subscription will not renew while in this state.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "current_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End of the current billing term. Subscription is renewed immediately after this. If not given, this will be calculated based on plan billing cycle. \n**Note:**\n\nFor subscription status: `non_renewing`, `active`, and `paused`, `current_term_end` is required.\n\n.\n", "example" : null }, "current_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start of the current billing period of the subscription. This is required when the subscription `status`\nis `paused`.\nWhen the `status`\nis `active`\nor `non_renewing`\n, it defaults to the current time.\n", "example" : null }, "trial_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start of the trial period for the subscription. When not passed, it is assumed to be current time. When passed for a `future`\nsubscription, it implies that the subscription goes into `in_trial`\nwhen it starts.\n", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time at which subscription was cancelled or is set to be cancelled.\n", "example" : null }, "started_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time at which the subscription was started. Is `null`\nfor `future`\nsubscriptions as it is yet to be started.\n", "example" : null }, "activated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the subscription was activated. A subscription is \"activated\" when its `status` changes from any other, to either `active` or `non_renewing`.\n\nThe following conditions must be satisfied when passing this parameter:\n\n* When `status` is `active`, `non_renewing`, or `paused`, `activated_at` must be on or after `trial_end` or `started_at`. Additionally, `activated_at` must be on or before `current_term_start`.\n* When `status` is `in_trial`, `activated_at` must precede `trial_start`\n\n#### Note:\n\nThis parameter should not be provided when passing `status` as `future` or `cancelled`.\n", "example" : null }, "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When a pause has been scheduled, it is the date/time of scheduled pause. When the subscription is in the `paused`\nstate, it is the date/time when the subscription was paused.\n", "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "For a paused subscription, it is the date/time when the subscription is scheduled to resume. If the pause is for an indefinite period, this value is not returned.\n", "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null }, "create_current_term_invoice" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Set as `true`\nif you want an invoice to be created for the subscription.\n\n* The invoice will be created for the subscription only if it has an `active` or `non_renewing` status.\n* The period of the invoice is from `current_term_start` to `current_term_end`.\n* The invoice will not be generated if the subscription amount is zero dollars (for that period) and 'Hide Zero Value Line Items' option is enabled in site settings.\n", "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the subscription. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/v2/pcv-1/advanced-features)\n.\n", "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id that uniquely identifies the contract term in the site.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the contract term was created.\n", "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the contract term\n", "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles of the subscription that the contract term is for.\n", "minimum" : 0, "example" : null }, "total_amount_raised" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The amount raised for the contract term till the time of importing the subscription. This amount is added to the [total_contract_value](/docs/api/contract_terms/contract_term-object#total_contract_value)\n", "minimum" : 0, "example" : null }, "total_amount_raised_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The amount raised for the contract term till the time of importing the subscription excluding tax. This amount is added to the [total_contract_value_before_tax](/docs/api/contract_terms/contract_term-object#total_contract_value)\n", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n* renew_once -\n Used when you want to renew the contract term just once. Does the following: - Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n\n * The `action_at_term_end` for the new contract term is set to `cancel`.\n* cancel - Contract term completes and subscription is canceled.\n", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The payment transaction amount. This parameter should be passed only if the invoice is created for current term.\n", "minimum" : 0, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method of this transaction. This parameter should be passed only if the invoice is created for current term.\n\n* cash - Cash\n* custom - Custom\n* check - Check\n* bank_transfer - Bank Transfer\n* other - Payment Methods other than the above types\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "The reference number for this transaction. For example, check number in case of `check`\n`payment_method`.\nThis parameter should be passed only if the invoice is created for current term.\n", "maxLength" : 100, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date of occurence of the transaction. This parameter should be passed only if the invoice is created for current term.\n", "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* plan_activation - Addon will be charged on plan activation.\n* contract_termination - Addon will be charged on contract termination.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "charged_event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charged_event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "Addon id.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "last_charged_at" : { "type" : "array", "description" : "Timestamp indicating when this add-on was last charged for this subscription.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "plan_id", "status" ], "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "charged_event_based_addons" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/subscriptions" : { "post" : { "summary" : "Create subscription for customer", "description" : "**Note:**\nThis operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/getting-started)\nand pass it as input parameter to this API.\n\nCreates a new subscription for an existing customer. You can attach a plan, plan quantity, one or more addons and coupon while creating this subscription.\n\nIf the plan does not have a trial period and if any of the recurring-item has charges, then the customer is charged immediately if auto_collection is turned 'on'. In that case, subscription is created only if the customer has a payment method on file and attempted payment is successful. \nIf an invoice gets generated during this operation, available Credits and Excess Payments will be automatically applied.\n", "operationId" : "create_subscription_for_customer", "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}(?: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?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription.\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription.\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial ends for this subscription. Can be specified to override the default trial period.If **'0'**\nis passed, the subscription will be activated immediately.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Specifies the number of billing cycles for the subscription. The behavior of the subscription after the billing cycles have completed depends on whether the subscription is on a [contract term](/docs/api/v2/pcv-1/contract_terms) or not.\n\n* When the subscription is not on a contract term: if `billing_cycles` is not provided, then the billing cycles [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#billing_cycles) is used. Moreover, once the `billing_cycles` have completed, the subscription cancels.\n* When the subscription is on a contract term: Providing `billing_cycles` is mandatory. Moreover, once the `billing_cycles` have completed, the behavior of the subscription is determined by the `contract_term[action_at_term_end]` parameter.\n", "minimum" : 0, "example" : null }, "mandatory_addons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of addons IDs that are mandatory to the plan and has to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription is to start. If not provided, the subscription starts immediately. You can provide a value in the past as well. This is called backdating the subscription creation and is done when the subscription has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating is enabled for subscription creation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.\n* The date is not more than duration X into the past, where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `start_date` cannot be earlier than 14th February. .\n", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n", "enum" : [ "on", "off" ], "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* sepa_credit - SEPA Credit\n* cash - Cash\n* no_preference - No Preference\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n* custom - Custom\n* bank_transfer - Bank Transfer\n* boleto - Boleto\n* check - Check\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* ach_credit - ACH Credit\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Id of the payment source to be attached to this subscription.\n", "maxLength" : 40, "example" : null }, "override_relationship" : { "type" : "boolean", "deprecated" : false, "description" : "If `true`\n, ignores the [hierarchy relationship](/docs/api/customers/customer-object#relationship)\nand uses customer as payment and invoice owner.\n", "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices`\nis set to `true`\n, and if the site is configured to set invoice dates to the date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes`\nand `line_item_taxes`\nare computed based on the tax configuration as of `invoice_date`.\nWhen passing this parameter, the following prerequisites must be met:\n\n* `invoice_date` must be in the past.\n* It is not earlier than `start_date`.\n* It is not more than one calendar month into the past. Eg. If today is 13th January, then you cannot pass a value that is earlier than 13th December.\n* `invoice_immediately` is true. .\n", "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the subscription. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/v2/pcv-1/advanced-features)\n.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\nThe default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration)\n. \n**Note:**\n`invoice_immediately`\nonly affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.\n\n.\n", "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit.\n", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/v2/pcv-1/plans/create-a-plan#period_unit)\nattribute of the [plan](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#plan_id)\nchosen.\n\n* week - Charge based on week(s)\n* month - Charge based on month(s)\n* day - Charge based on day(s)\n* year - Charge based on year(s)\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nhas been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends.\n\n* cancel_subscription - The subscription cancels.\n* activate_subscription - The subscription activates and charges are raised for non-metered items.\n* plan_default -\n The action [configured for the site](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\n at the time when the trial ends, takes effect.\n* site_default -\n This is the default value. This is the default value. The action [configured for the site](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\n at the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\n* customer - Pass this value to indicate that the request is initiated by the customer\n* merchant - Pass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "Parameters for statement_descriptor\n", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Payment transaction descriptor text to help your customer easily recognize the transaction. When this value is passed this will override the [transaction descriptor](https://www.chargebee.com/docs/1.0/transaction_descriptors.html)\ntext configured in the Chargebee site for all the subscription renewal transactions.\n", "maxLength" : 65000, "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "description" : "Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay.\n\n* card - card\n* twint - Payments made via Twint\n* swish - Payments made via Swish\n* dotpay - dotpay\n* faster_payments - Faster Payments\n* upi - upi\n* kbc_payment_button - KBC Payment Button\n* klarna - Payments made via Klarna.\n* payme - Payments made via PayMe\n* go_pay - Payments made via GoPay\n* google_pay - google_pay\n* trustly - Trustly\n* naver_pay - Payments made via Naver Pay.\n* stablecoin - Payments made via Stablecoin.\n* paypal_express_checkout - paypal_express_checkout\n* pix - Pix\n* venmo - Venmo\n* klarna_pay_now - Klarna Pay Now\n* alipay - Payments made via Alipay.\n* tamara - Payments made via Tamara.\n* ideal - ideal\n* pay_to - PayTo\n* boleto - boleto\n* pay_co - Payments made via PayCo\n* wechat_pay - Payments made via WeChat Pay.\n* cash_app_pay - Payments made via Cash App Pay.\n* alipay_hk - Payments made via Alipay HK.\n* after_pay - Payments made via Afterpay\n* netbanking_emandates - netbanking_emandates\n* grab_pay - Payments made via GrabPay\n* paypay - PayPay\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* electronic_payment_standard - Electronic Payment Standard\n* direct_debit - direct_debit\n* sepa_instant_transfer - Sepa Instant Transfer\n* bancontact - bancontact\n* pay_by_bank - Pay By Bank\n* touch_n_go - Payments made via Touch 'n Go.\n* apple_pay - apple_pay\n* qpay - Payments made via Qpay.\n* online_banking_poland - Online Banking Poland\n* gcash - Payments made via GCash.\n* giropay - giropay\n* sofort - sofort\n* amazon_payments - Amazon Payments\n* kakao_pay - Payments made via Kakao Pay.\n* dana - Payments made via Dana.\n* south_korean_cards - Payments made via South Korean Cards\n* revolut_pay - Payments made via Revolut Pay.\n", "enum" : [ "card", "ideal", "sofort", "bancontact", "google_pay", "dotpay", "giropay", "apple_pay", "upi", "netbanking_emandates", "paypal_express_checkout", "direct_debit", "boleto", "venmo", "amazon_payments", "pay_to", "faster_payments", "sepa_instant_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n* cancel - Contract term completes and subscription is canceled.\n", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Sub Item Plan Unit Amount for create subscription\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "Sub Item Plan Unit Amount in Decimal for create subscription\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The time at which the trial ends for the addon. This value can only be set for subscriptions that start with an `active`\nor `non-renewing`\nstatus. Once set, the value can't be changed. (Addon trial periods must be enabled by [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n)\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* plan_activation - Addon will be charged on plan activation.\n* contract_termination - Addon will be charged on contract termination.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates when the non-recurring addon will be charged.\n\n* immediately - Charges for the addon will be applied immediately.\n* on_event - Charge for the addon will be applied on the occurrence of a specified event.\n", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "plan_id" ], "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "payment_intent" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "statement_descriptor" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/retrieve_advance_invoice_schedule" : { "get" : { "summary" : "Retrieve advance invoice", "description" : "Retrieves the *advance_invoice_schedule* for a subscription. Note that this endpoint is only applicable for *schedule_type = specific_dates* or fixed_intervals.\n", "operationId" : "retrieve_advance_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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,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0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "advance_invoice_schedules" : { "type" : "array", "description" : "Resource object representing advance_invoice_schedule
", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule", "description" : "Resource object representing advance_invoice_schedule" }, "example" : null } }, "required" : [ "advance_invoice_schedules" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/remove_scheduled_cancellation" : { "post" : { "summary" : "Remove scheduled cancellation", "description" : "**Note:** Cannot be called when the subscription is on a [contract term](/docs/api/contract_terms). (That is, when the `contract_term.status attribute` is `active`.)\n\nIf the subscription is in **Non Renewing** or **In Trial** state and is also scheduled to cancel at the end of current term, then this API can be used to remove the scheduled cancellation. When a scheduled cancellation is removed, the subscription will revert to **Active** or **In Trial** state, whichever is the state before cancellation was scheduled.\n\nWhile removing the scheduled cancellation, you may specify the number of billing cycles. If the billing cycle is not specified, the default billing cycle from the plan will be applied on the subscription.\n", "operationId" : "remove_scheduled_cancellation", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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}|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?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.\n", "minimum" : 0, "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* cancel - Contract term completes and subscription is canceled.\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "contract_term" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/retrieve_with_scheduled_changes" : { "get" : { "summary" : "Retrieve with scheduled changes", "description" : "Retrieves a subscription with the scheduled changes applied. If the subscription has one or more [`ramp`](ramps)s, this API returns the subscription with the upcoming ramp applied.\n\n**Note:** Only the following attributes are changed\n\n* plan_id\n* plan_quantity\n* plan_unit_price\n* setup_fee\n* billing_period\n* billing_period_unit\n* plan_free_quantity\n* remaining_billing_cycles\n* addons\n* coupons Other attributes such as **status** ,**next_billing_at** are not changed and will reflect the current subscription values.\n", "operationId" : "retrieve_with_scheduled_changes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])\\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:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/reactivate" : { "post" : { "summary" : "Reactivate a subscription", "description" : "**Note:**\nThis operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/getting-started)\nand pass it as input parameter to this API.\n\nThis API is used to reactivate a **cancelled** subscription. You may also optionally specify a trial end date, to move the subscription to **In Trial** state. If trial end is not specified, the subscription will be activated and any applicable charges will be initiated.\n\nUnless the billing cycle is specified, it will be set to plan's default billing cycle.\n\nDuring an in-term reactivation++, unless the billing cycle is specified, the subscription's remaining billing cycles will be restored. If a trial end date is specified, then the plan's default billing cycle is used.\n\n**What is an \"in-term reactivation\"?**\n\nAn \"in-term reactivation\" happens when the billing term of the subscription is retained upon cancellation and reactivation is initiated within that term.\n\n**When is the 'billing term' retained for a cancelled subscription?**\n\nWhen dunning (payment failure retry settings) is configured with the last retry configured as\n\n* cancel subscription and mark invoice as 'Not Paid', or\n* cancel subscription and mark the invoice as 'Voided' and the case if any of the current term invoices is partially or fully paid, the invoice is not voided but instead Chargebee marks the invoices as 'Not Paid'.\n\n**Note :** In both cases, the billing term is retained and upon reactivation the subscription will be moved to active state (if the plan does not have a trial period) and no invoice will be generated. Ensure that you collect any unpaid invoices.\n\n**Example :** A Subscription was billed from 1st to 31st of a month and it was cancelled on the 20th due to one of the above cases (billing term is not reset). If the reactivation happens on 25th then it is considered an in-term reactivation. \nReactivation of a subscription in **non_renewing** state has been deprecated. To remove a scheduled cancellation of a **non_renewing** Subscription, use [Remove Scheduled Cancellation](/docs/api/subscriptions/remove-scheduled-cancellation) API.\nHowever, if you use reactivate API to remove scheduled cancellation for a **non_renewing** Subscription, then the status will be set to **active** and the billing cycle will be set to forever. If any value is passed for trial_end or billing cycle, an error will be thrown.\nIf an invoice gets generated during this operation, available Credits and Excess Payments will be automatically applied.\n**Additional Error Scenarios:** If there is a need to create an immediate charge and the collection fails, an error will be thrown.\n", "operationId" : "reactivate_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|(?:(?:(?:(?:(?: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?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Providing this parameter indicates that the subscription reactivates with an `in_trial`\n`status`\nand the trial period ends at the date provided. The value must not be earlier than `reactivate_from`.\nNote: This parameter can be backdated (set to a value in the past) only when `reactivate_from`\nhas been backdated. Do this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end`\nis backdated, the subscription immediately goes into `active`\nor `non_renewing`\nstatus.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.\n", "minimum" : 0, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription was reactivated. When not provided, the subscription is reactivated immediately on calling this API. The value of this parameter must always be in the past (backdating). Do this when the subscription has already been reactivated and the billing has been delayed. The following prerequisites must be met for this parameter to be passed:\n\n* The backdating feature has been enabled for subscription reactivation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is the day of the month by which the accounting for the previous month must be closed.\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `reactivate_from` cannot be earlier than 14th February. .\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\nThe default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration)\n. \n**Note:**\n`invoice_immediately`\nonly affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.\n\n.\n", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Applicable when calendar billing is enabled and a new *active*\nterm gets started during this operation. Unless specified the configured *default*\nvalue will be used.\n\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).\nIf a new term is started for the subscription due to this API call, then `terms_to_charge`\nis inclusive of this new term. See description for the `force_term_reset`\nparameter to learn more about when a subscription term is reset.\n", "minimum" : 1, "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices`\nis `true`\n, and if the site is configured to set invoice dates to the date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes`\nand `line_item_taxes`\nare computed based on the tax configuration as of `invoice_date`.\nWhen passing this parameter, the following prerequisites must be met:\n\n* `invoice_date` must be in the past.\n* `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n* It is not earlier than `reactivate_from` or `trial_end`.\n* `invoice_immediately` is `true`. .\n", "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\n* customer - Pass this value to indicate that the request is initiated by the customer\n* merchant - Pass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n* cancel - Contract term completes and subscription is canceled.\n", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "Parameters for statement_descriptor\n", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Payment transaction descriptor text to help your customer easily recognize the transaction. When this value is passed this will override the [transaction descriptor](https://www.chargebee.com/docs/1.0/transaction_descriptors.html)\ntext configured in the Chargebee site for all the subscription renewal transactions.\n", "maxLength" : 65000, "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "description" : "Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay.\n\n* alipay_hk - Payments made via Alipay HK.\n* card - card\n* twint - Payments made via Twint\n* swish - Payments made via Swish\n* after_pay - Payments made via Afterpay\n* netbanking_emandates - netbanking_emandates\n* grab_pay - Payments made via GrabPay\n* paypay - PayPay\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* dotpay - dotpay\n* faster_payments - Faster Payments\n* upi - upi\n* kbc_payment_button - KBC Payment Button\n* electronic_payment_standard - Electronic Payment Standard\n* klarna - Payments made via Klarna.\n* payme - Payments made via PayMe\n* direct_debit - direct_debit\n* sepa_instant_transfer - Sepa Instant Transfer\n* bancontact - bancontact\n* go_pay - Payments made via GoPay\n* pay_by_bank - Pay By Bank\n* touch_n_go - Payments made via Touch 'n Go.\n* google_pay - google_pay\n* apple_pay - apple_pay\n* qpay - Payments made via Qpay.\n* online_banking_poland - Online Banking Poland\n* trustly - Trustly\n* gcash - Payments made via GCash.\n* naver_pay - Payments made via Naver Pay.\n* stablecoin - Payments made via Stablecoin.\n* giropay - giropay\n* paypal_express_checkout - paypal_express_checkout\n* pix - Pix\n* venmo - Venmo\n* klarna_pay_now - Klarna Pay Now\n* alipay - Payments made via Alipay.\n* sofort - sofort\n* amazon_payments - Amazon Payments\n* tamara - Payments made via Tamara.\n* ideal - ideal\n* kakao_pay - Payments made via Kakao Pay.\n* pay_to - PayTo\n* dana - Payments made via Dana.\n* south_korean_cards - Payments made via South Korean Cards\n* boleto - boleto\n* pay_co - Payments made via PayCo\n* revolut_pay - Payments made via Revolut Pay.\n* wechat_pay - Payments made via WeChat Pay.\n* cash_app_pay - Payments made via Cash App Pay.\n", "enum" : [ "card", "ideal", "sofort", "bancontact", "google_pay", "dotpay", "giropay", "apple_pay", "upi", "netbanking_emandates", "paypal_express_checkout", "direct_debit", "boleto", "venmo", "amazon_payments", "pay_to", "faster_payments", "sepa_instant_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "contract_term" : { "style" : "deepObject", "explode" : true }, "payment_intent" : { "style" : "deepObject", "explode" : true }, "statement_descriptor" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/charge_future_renewals" : { "post" : { "summary" : "Create advance invoice or invoicing schedules", "description" : "Creates an advance invoice or an [advance invoicing schedule](/docs/api/advance_invoice_schedules). When an advance invoice is generated, and [`auto_collection`](/docs/api/v2/pcv-1/subscriptions/subscription-object#auto_collection) is `on` for the subscription, the [`payment_source`](/docs/api/subscriptions/subscription-object#payment_source_id) associated with the subscription is charged. Any changes scheduled for the subscription are taken into account automatically while generating an advance invoice. Advance invoices are not generated for a subscription when it is in the [`paused`](/docs/api/subscriptions/subscription-object#status) status. \n* This operation is supported only on select plans. To know more, take a look at our [plans and pricing page](https://www.chargebee.com/pricing/).\n* This operation is not supported for `non_renewing` and `cancelled` subscriptions.\n* This operation is not supported if an advance invoice is already present. You could void/delete that invoice and try creating another advance invoice.\n", "operationId" : "charge_future_renewals", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "terms_to_charge" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "* For `schedule_type = immediate`: the number of future billing cycles to be invoiced in advance. The invoicing is done for the [`remaining_billing_cycles`](/docs/api/subscriptions/subscription-object#remaining_billing_cycles) of the subscription if that is less than `terms_to_charge`.\n* For `schedule_type = fixed_intervals`: The number of future billing cycles in one [interval](/docs/api/advance_invoice_schedules). The schedule is created such that the total number of billing cycles in the schedule does not exceed the [remaining_billing_cycles](/docs/api/subscriptions/subscription-object#remaining_billing_cycles) of the subscription. .\n", "minimum" : 1, "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "Whether the charge should be invoiced immediately or added to [`unbilled_charges`](/docs/api/unbilled_charges).\nApplicable only when [`schedule_type`](/docs/api/subscriptions/charge-future-renewals#schedule_type)\nis `immediate`\n.\n", "example" : null }, "schedule_type" : { "type" : "string", "deprecated" : false, "description" : "The type of advance invoice or advance invoicing schedule.\n\n* immediate -\n Charge immediately for the number of billing cycles specified by [`terms_to_charge`](/docs/api/subscriptions/charge-future-renewals#terms_to_charge)\n .\n* specific_dates -\n Charge on [specific dates](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_date).\n For each date, specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_terms_to_charge)\n to charge for. Up to 5 dates can be configured.\n* fixed_intervals -\n Charge at fixed intervals of time. Specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#terms_to_charge)\n that constitute an interval and the number of [days before each interval](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_days_before_renewal)\n that the invoice should be generated. Also specify [when the schedule should end](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_end_schedule_on)\n .\n", "enum" : [ "immediate", "specific_dates", "fixed_intervals" ], "example" : null }, "fixed_interval_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for fixed_interval_schedule\n", "properties" : { "number_of_occurrences" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the [`remaining_billing_cycles`](/docs/api/subscriptions/subscription-object#remaining_billing_cycles)\nof the subscription. This parameter is applicable only when [`fixed_interval_schedule[end_schedule_on]`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_end_schedule_on)\n= `after_number_of_intervals`\n", "minimum" : 1, "example" : null }, "days_before_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before each interval that advance invoices are generated.\n", "minimum" : 1, "example" : null }, "end_schedule_on" : { "type" : "string", "deprecated" : false, "description" : "Specifies when the schedule should end.\n\n* after_number_of_intervals - Advance invoices are generated a `specified number of times`\n* subscription_end - Advance invoices are generated for as long as the subscription is active.\n* specific_date -\n End the advance invoicing schedule on a `specific date`\n .\n", "enum" : [ "after_number_of_intervals", "specific_date", "subscription_end" ], "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the schedule should end. Advance invoices are not generated beyond this date. It must be at least 1 day before the start of the last billing cycle of the subscription and also within 5 years from the current date. This parameter is only applicable when [`fixed_interval_schedule[end_schedule_on]`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_end_schedule_on)\n= `specific_date`\n.\n", "example" : null } }, "example" : null }, "specific_dates_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for specific_dates_schedule\n", "properties" : { "terms_to_charge" : { "type" : "array", "description" : "The number of billing cycles to charge for, on the date specified. Applicable only when [`schedule_type`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#schedule_type)\nis specific_dates.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "date" : { "type" : "array", "description" : "The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when [`schedule_type`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#schedule_type)\nis `specific_dates`\n.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "fixed_interval_schedule" : { "style" : "deepObject", "explode" : true }, "specific_dates_schedule" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "advance_invoice_schedules" : { "type" : "array", "description" : "Resource object representing advance_invoice_schedule
", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule", "description" : "Resource object representing advance_invoice_schedule" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/add_charge_at_term_end" : { "post" : { "summary" : "Add charge at term end", "description" : "Adds a one time charge to the subscription which will be added to the invoice generated at the end of the current term. If there are any applicable coupons in the subscription, an appropriate discount will be applied.\n\nTo collect a charge immediately, [use this API](/docs/api/v2/pcv-1/invoices/create-invoice-for-a-one-time-charge). \nIf any subscription changes happen before the end of the current term, these charges will be collected along with it.\n", "operationId" : "add_charge_at_term_end", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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,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0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 1, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this charge.\n", "maxLength" : 250, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ).\nProvide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* retail - Transaction is a sale to an end user\n* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer\n* vendor_use - Transaction is for an item that is subject to vendor use tax\n* consumed - Transaction is for an item that is consumed directly\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge starts.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge ends.\n", "example" : null } }, "required" : [ "description" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/remove_scheduled_changes" : { "post" : { "summary" : "Remove scheduled changes", "description" : "Removes the subscription changes scheduled on next renewal. Advance charges, if any, will be refunded as credits and a new invoice will be generated on renewal.\n", "operationId" : "remove_scheduled_changes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "credit_notes" : { "type" : "array", "description" : "Resource object representing credit_note
", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/change_term_end" : { "post" : { "summary" : "Change term end", "description" : "Changes the subscription's current term end date. Depending on the \"status\" of the subscription, \"term end date\" has different effects.\n\n* If the Subscription is in **trial**, it affects trial end date.\n* If the Subscription is **active**, it affects the next billing date.\n* If the Subscription's status is **non_renewing**, this affects the upcoming cancellation date.\n\n**Tip**: To cycle through a couple of billing cycles and test webhooks, you may use this API. \n* When changing the *term_end* for *active* / *non_renewing* subscriptions, by default no additional charges (when term gets extended) will be added or credits (when term gets reduced) will be issued. However you can specify *prorate* param as *true* for adding prorated charges / issuing prorated credits. Further for the charges that got added, you can specify *invoice_immediately* as *false* to add them to *unbilled charges* and invoice them later.\n* Advance charges, if any will be credited back during this operation.\n* Confirm the UTC (Coordinated Universal Time) time zone selected in your Chargebee site matches with your country region.\n", "operationId" : "change_term_end", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|(?: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]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "term_ends_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the current term should end for this subscription.\n", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "Applicable for *active*\n/ *non_renewing*\nsubscriptions. If specified as *true*\nprorated charges / credits will be added during this operation.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\nThe default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration)\n. \n**Note:**\n`invoice_immediately`\nonly affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.\n\n.\n", "example" : null } }, "required" : [ "term_ends_at" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null }, "credit_notes" : { "type" : "array", "description" : "Resource object representing credit_note
", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/delete" : { "post" : { "summary" : "Delete a subscription", "description" : "Deletes the subscription resource. \nThis operation is irreversible - all data related to the subscription, such as invoices, transactions, and reports, will be deleted.\n**Note:** This operation schedules the subscription resource for deletion. It will be deleted in a few minutes.\n", "operationId" : "delete_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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}(?: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?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/import_subscription" : { "post" : { "summary" : "Import a subscription", "description" : "Imports a subscription into Chargebee.\n", "operationId" : "import_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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fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id for the new subscription. If not given, this will be auto-generated.\n", "maxLength" : 50, "example" : null }, "client_profile_id" : { "type" : "string", "deprecated" : false, "description" : "Indicates the Client profile id for the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "maxLength" : 50, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription.\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription.\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial ends for this subscription. Can be specified to override the default trial period.If **'0'**\nis passed, the subscription will be activated immediately.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.\n", "minimum" : 0, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately.\n", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n", "enum" : [ "on", "off" ], "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current state of the subscription.\n\n* future - The subscription is scheduled to start at a future date.\n* non_renewing - The subscription will be canceled at the end of the current term.\n* active - The subscription is active and will be charged for automatically based on the items in it.\n* cancelled - The subscription has been canceled and is no longer in service.\n* transferred - The subscription has been transferred to another business entity within the organization.\n* in_trial - The subscription is in trial.\n* paused -\n The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html).\n The subscription will not renew while in this state.\n", "enum" : [ "future", "in_trial", "active", "non_renewing", "paused", "cancelled", "transferred" ], "example" : null }, "current_term_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "End of the current billing term. Subscription is renewed immediately after this. If not given, this will be calculated based on plan billing cycle. \n**Note:**\n\nFor subscription status: `non_renewing`, `active`, and `paused`, `current_term_end` is required.\n\n.\n", "example" : null }, "current_term_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start of the current billing period of the subscription. This is required when the subscription `status`\nis `paused`.\nWhen the `status`\nis `active`\nor `non_renewing`\n, it defaults to the current time.\n", "example" : null }, "trial_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Start of the trial period for the subscription. When not passed, it is assumed to be current time. When passed for a `future`\nsubscription, it implies that the subscription goes into `in_trial`\nwhen it starts.\n", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time at which subscription was cancelled or is set to be cancelled.\n", "example" : null }, "started_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Time at which the subscription was started. Is `null`\nfor `future`\nsubscriptions as it is yet to be started.\n", "example" : null }, "activated_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the subscription was activated. A subscription is \"activated\" when its `status` changes from any other, to either `active` or `non_renewing`.\n\nThe following conditions must be satisfied when passing this parameter:\n\n* When `status` is `active`, `non_renewing`, or `paused`, `activated_at` must be on or after `trial_end` or `started_at`. Additionally, `activated_at` must be on or before `current_term_start`.\n* When `status` is `in_trial`, `activated_at` must precede `trial_start`\n\n#### Note:\n\nThis parameter should not be provided when passing `status` as `future` or `cancelled`.\n", "example" : null }, "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When a pause has been scheduled, it is the date/time of scheduled pause. When the subscription is in the `paused`\nstate, it is the date/time when the subscription was paused.\n", "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "For a paused subscription, it is the date/time when the subscription is scheduled to resume. If the pause is for an indefinite period, this value is not returned.\n", "example" : null }, "create_current_term_invoice" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Set as `true`\nif you want an invoice to be created for the subscription.\n\n* The invoice will be created for the subscription only if it has an `active` or `non_renewing` status.\n* The period of the invoice is from `current_term_start` to `current_term_end`.\n* The invoice will not be generated if the subscription amount is zero dollars (for that period) and 'Hide Zero Value Line Items' option is enabled in site settings.\n", "example" : null }, "affiliate_token" : { "type" : "string", "deprecated" : false, "description" : "A unique tracking token.\n", "maxLength" : 250, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the subscription. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/v2/pcv-1/advanced-features)\n.\n", "example" : null }, "customer" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the customer for which this `hosted_page`\nshould be created. When not provided, a new customer is created with the ID set to the value provided for `subscription[id]`.\nIf `subscription[id]`\nis unavailable, then the customer ID is autogenerated.\n", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer\n", "maxLength" : 150, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name of the customer.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "description" : "Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.\n", "maxLength" : 50, "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "Specifies if the customer is liable for tax\n\n* exempt -\n * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.\n * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address.\n* taxable -\n Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html).\n In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero.\n", "enum" : [ "taxable", "exempt" ], "example" : null }, "entity_code" : { "type" : "string", "deprecated" : false, "description" : "The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption)\n.\n\n* med2 - US Medical Device Excise Tax with taxable sales tax\n* med1 - US Medical Device Excise Tax with exempt sales tax\n* b - State government\n* c - Tribe/Status Indian/Indian Band\n* a - Federal government\n* f - Religious organization\n* g - Resale\n* d - Foreign diplomat\n* e - Charitable or benevolent organization\n* j - Direct pay permit\n* k - Direct mail\n* h - Commercial agricultural production\n* i - Industrial production/manufacturer\n* n - Local government\n* l - Other or custom\n* m - Educational organization\n* r - Non-resident\n* p - Commercial aquaculture\n* q - Commercial Fishery\n", "enum" : [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "med1", "med2" ], "example" : null }, "exempt_number" : { "type" : "string", "deprecated" : false, "description" : "Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption)\n.\n", "maxLength" : 100, "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days within which the customer has to make payment for the invoice.\n", "example" : null }, "taxjar_exemption_category" : { "type" : "string", "deprecated" : false, "description" : "Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration.\n\n* wholesale - Whole-sale\n* other - Other\n* government - Government\n", "enum" : [ "wholesale", "government", "other" ], "example" : null }, "customer_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks\n* business - When the purchase is made at a place of business\n* residential - When the purchase is made by a customer for home use\n* industrial - When the purchase is made by an industrial business\n", "enum" : [ "residential", "business", "senior_citizen", "industrial" ], "example" : null }, "auto_collection" : { "type" : "string", "default" : "on", "deprecated" : false, "description" : "Whether payments needs to be collected automatically for this customer\n\n* on - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made.\n* off - Automatic collection of charges will not be made. All payments must be recorded offline.\n", "enum" : [ "on", "off" ], "example" : null }, "allow_direct_debit" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the customer can pay via Direct Debit\n", "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "The VAT/tax registration number for the customer. For customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas\n`XI`\n(which is **United Kingdom - Northern Ireland**\n), the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number)\ncan be overridden by setting\n[vat_number_prefix](/docs/api/customers/customer-object#vat_number_prefix)\n.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id that uniquely identifies the contract term in the site.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the contract term was created.\n", "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the contract term\n", "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles of the subscription that the contract term is for.\n", "minimum" : 0, "example" : null }, "total_amount_raised" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The amount raised for the contract term till the time of importing the subscription. This amount is added to the [total_contract_value](/docs/api/contract_terms/contract_term-object#total_contract_value)\n", "minimum" : 0, "example" : null }, "total_amount_raised_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The amount raised for the contract term till the time of importing the subscription excluding tax. This amount is added to the [total_contract_value_before_tax](/docs/api/contract_terms/contract_term-object#total_contract_value)\n", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* renew_once -\n Used when you want to renew the contract term just once. Does the following: - Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n\n * The `action_at_term_end` for the new contract term is set to `cancel`.\n* cancel - Contract term completes and subscription is canceled.\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "description" : "The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "description" : "The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\n* cartes_bancaires - A Cartes Bancaires card scheme.\n* mastercard - A MasterCard scheme.\n* visa - A Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `billing_state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `billing_state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_method\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\n* grab_pay - Payments made via GrabPay\n* go_pay - Payments made via GoPay\n* google_pay - Payments made via Google Pay.\n* after_pay - Payments made via Afterpay\n* pix - Payments made via Pix\n* pay_by_bank - Pay By Bank\n* sofort - Payments made via Sofort.\n* twint - Payments made via Twint\n* netbanking_emandates - Netbanking (eMandates) Payments.\n* apple_pay - Payments made via Apple Pay.\n* unionpay - Payments made via UnionPay.\n* giropay - Payments made via giropay.\n* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* paypay - Payments made via PayPay\n* south_korean_cards - Payments made via South Korean Cards\n* bancontact - Payments made via Bancontact Card.\n* upi - UPI Payments.\n* revolut_pay - Payments made via Revolut Pay.\n* stablecoin - Payments made via Stablecoin.\n* alipay -\n Payments made via Alipay. \n This payment source is deprecated.\n* payme - Payments made via PayMe\n* pay_to - Payments made via PayTo\n* pay_co - Payments made via PayCo\n* kakao_pay - Payments made via Kakao Pay.\n* wechat_pay -\n Payments made via WeChat Pay. \n This payment source is deprecated.\n* sepa_instant_transfer - Payments made via Sepa Instant Transfer\n* dotpay - Payments made via Dotpay.\n* klarna - Payments made via Klarna.\n* paypal_express_checkout - Payments made via PayPal Express Checkout.\n* ideal - Payments made via iDEAL.\n* electronic_payment_standard - Electronic Payment Standard\n* generic - Payments made via Generic Payment Method.\n* klarna_pay_now - Payments made via Klarna Pay Now\n* faster_payments - Payments made via Faster Payments\n* swish - Payments made via Swish\n* venmo - Payments made via Venmo\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* naver_pay - Payments made via Naver Pay.\n* automated_bank_transfer - Represents virtual bank account using which the payment will be done.\n* amazon_payments - Payments made via Amazon Payments.\n* gcash - Payments made via GCash\n* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* online_banking_poland - Payments made via Online Banking Poland\n* trustly - Trustly\n* kbc_payment_button - KBC Payment Button\n* alipay_hk - Payments made via Alipay HK\n* cash_app_pay - Payments made via Cash App Pay.\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal this will be the *billing agreement id* .\nFor GoCardless direct debit this will be 'mandate id'. In the case of card this will be the identifier provided by the gateway/card vault for the specific payment method resource. **Note:**\nThis is not the one-time temporary token provided by gateways like Stripe.\n\nFor more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n", "maxLength" : 200, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "[ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error.\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, then `XI`\n(the code for **United Kingdom - Northern Ireland**\n) is available as an option.\n", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The payment transaction amount. This parameter should be passed only if the invoice is created for current term.\n", "minimum" : 0, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method of this transaction. This parameter should be passed only if the invoice is created for current term.\n\n* cash - Cash\n* custom - Custom\n* other - Payment Methods other than the above types\n* check - Check\n* bank_transfer - Bank Transfer\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "The reference number for this transaction. For example, check number in case of `check`\n`payment_method`.\nThis parameter should be passed only if the invoice is created for current term.\n", "maxLength" : 100, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date of occurence of the transaction. This parameter should be passed only if the invoice is created for current term.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n* plan_activation - Addon will be charged on plan activation.\n* contract_termination - Addon will be charged on contract termination.\n* subscription_activation - Addon will be charged on subscription activation.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "charged_event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charged_event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "Addon id.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "last_charged_at" : { "type" : "array", "description" : "Timestamp indicating when this add-on was last charged for this subscription.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "plan_id", "status" ], "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "billing_address" : { "style" : "deepObject", "explode" : true }, "card" : { "style" : "deepObject", "explode" : true }, "charged_event_based_addons" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "payment_method" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/import_unbilled_charges" : { "post" : { "summary" : "Import unbilled charges", "description" : "Imports unbilled charges into Chargebee.\n", "operationId" : "import_unbilled_charges", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "unbilled_charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for unbilled_charges\n", "properties" : { "id" : { "type" : "array", "description" : "Uniquely identifies an unbilled charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "Start date of this charge.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "End date of this charge.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\n* plan -\n Indicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the [plan](/docs/api/v2/pcv-1/plans/plan-object)\n id\n* plan_setup -\n Indicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the [plan](/docs/api/v2/pcv-1/plans/plan-object)\n id\n* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n* addon -\n Indicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/v2/pcv-1/addons/addon-object)\n id\n", "enum" : [ "plan_setup", "plan", "addon", "adhoc" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "The identifier of the modelled entity this charge is based on. Will be null for 'adhoc' entity type.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Detailed description about this charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "Unit amount of the charge item.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the item which is represented by this charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Total amount of this charge. Typically equals to unit amount x quantity.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the amount for the charge, in major units of the currency. Typically equals to `unit_amount_in_decimal`\nx `quantity_in_decimal`.\nReturned when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of this entity. Returned when the entity is quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the unit amount for the entity. The value is in major units of the currency. Returned when the entity is quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "discount_amount" : { "type" : "array", "description" : "Total discounts for this charge.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "use_for_proration" : { "type" : "array", "description" : "If the unbilled charge falls within the subscription's current term it will be used for proration.\n", "items" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "example" : null }, "is_advance_charge" : { "type" : "array", "description" : "The value of this parameter will be true if it is a recurring unbilled charge for a future term.\n", "items" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "date_from", "date_to", "entity_type" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "unbilled_charge_id" : { "type" : "array", "description" : "Uniquely identifies an unbilled charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "The type of deduction and the amount to which it is applied.\n\n* document_level_coupon -\n The deduction is due to a coupon applied to the invoice `sub_total`.\n The coupon id is passed as `entity_id`\n .\n* item_level_coupon -\n The deduction is due to a coupon applied to line item. The coupon `id`\n is passed as `entity_id`\n .\n", "enum" : [ "item_level_coupon", "document_level_coupon" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "When the deduction is due to a `coupon`\n, then this is the `id`\nof the coupon. Is required when `discounts[entity_type]`\nis `item_level_coupon`\nor `document_level_coupon`\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this deduction.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "required" : [ "amount" ], "example" : null }, "tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tiers\n", "properties" : { "unbilled_charge_id" : { "type" : "array", "description" : "Uniquely identifies an unbilled charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "quantity_used" : { "type" : "array", "description" : "The number of units purchased in a range.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "The price of the tier if the charge model is a `stairtstep`\npricing , or the price of each unit in the tier if the charge model is `tiered`\n/`volume`\npricing.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "starting_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal`\nof the next lower tier. Returned only when the `line_items.pricing_model`\nis `tiered`\n, `volume`\nor `stairstep`\nand [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "ending_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal`\nof the next higher tier. Returned only when the `line_items.pricing_model`\nis `tiered`\n, `volume`\nor stairstep and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "quantity_used_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity purchased from this tier. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the per-unit price for the tier when the `pricing_model`\nis `tiered`\nor `volume`.\nWhen the `pricing_model`\nis `stairstep`\n, it is the decimal representation of the total price for `line_item`.\nThe value is in major units of the currency. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null } }, "required" : [ "unbilled_charge_id" ], "example" : null } }, "example" : null }, "encoding" : { "discounts" : { "style" : "deepObject", "explode" : true }, "tiers" : { "style" : "deepObject", "explode" : true }, "unbilled_charges" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "unbilled_charges" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/remove_scheduled_resumption" : { "post" : { "summary" : "Remove scheduled resumption", "description" : "If the subscription is in **Paused** state and is scheduled to resume on a specific_date, this API can be used to remove the scheduled resumption. When the scheduled resumption is removed, the subscription will remain **Paused**.\n", "operationId" : "remove_scheduled_resumption", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}" : { "get" : { "summary" : "Retrieve a subscription", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nRetrieves details of a subscription.\n", "operationId" : "retrieve_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))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9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] }, "post" : { "summary" : "Update a subscription", "description" : "**Note:**\n\n* This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/getting-started) and pass it as input parameter to this API.\n* When the **Remove mandatory add-ons from old plan during subscription plan update** setting is [enabled](https://www.chargebee.com/docs/1.0/subscriptions.html#editing-a-subscription_remove-mandatory-addons) on your Chargebee site, all [mandatory addons](/docs/api/attached_items) with the old plan will be automatically removed during the subscription update to a new plan.\n\nYou can modify the plan, plan quantity and add or remove addons for the subscription. By default the changes are applied immediately and the charges (/credits) are prorated and adjusted with the next billing term. You may also choose to effect the changes at the end of the current term by passing **end_of_term** as \"true\". In this case proration will not be done.\n\nOnly the parameters that are passed are modified for the subscription. Rest will reflect the existing values.\n\nBy default, the addons passed are appended to the existing list of addons for this subscription. In case a passed addon already exists for this subscription, quantity value is replaced. If you want to completely replace the addons for this subscription, pass **replace_addon_list** as \"true\".\n\n[Card](/docs/api/cards/card-object) and 'vat_number' attributes can also be passed during subscription update. If they are passed, corresponding Billing Info attributes - the [Billing Address](/docs/api/customers/customer-object) and 'vat_number' - will be replaced automatically.\n\nPassing credit card details to this API involves PCI liability at your end as sensitive card info passes through your servers. If you wish to avoid that, you can use one of the following integration methodologies if applicable\n\n* If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your checkout form. Take a look at this [Stripe tutorial](https://stripe.com/docs/payments/accept-a-payment-charges) for more details.\n* If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your checkout form. Please refer this [tutorial](https://www.chargebee.com/tutorials/braintree-js-example.html) for more details.\n* If you are using Authorize.Net gateway, you use [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html) with your checkout form.\n* If you are using the Adyen gateway, you will have to use the Adyen's [Client Side Encryption](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/cse-integration-ecommerce) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API.\n* You can also use our [Hosted Pages](https://www.chargebee.com/docs/hosted_pages.html) based integration.\n\n**Proration Scenario:** A customer changes from a $15 plan to $30 plan after 15 days of a monthly term. He will be charged for $7.50 immediately. The following Credit Note and Invoice will be generated \n\n|-------------------------------|-------|\n| **Credit Note** |\n| Prorated credits for Old Plan | $7.50 |\n\n|-------------------------------|---------|\n| **Invoice** |\n| Prorated charges for New Plan | $15.00 |\n| Total | $15.00 |\n| Credits | ($7.50) |\n| **Amount Due** | $7.50 |\n\nMeanwhile downgrading will result in net credits being created which will be applied when the subscription is charged on start of the next term. Learn more about our proration scenarios [here](https://www.chargebee.com/docs/proration.html).\n\n**Billing Cycle:** The billing period for a subscription does not change if the plans intervals of both old and new are same. However, if a customer changes to a plan that has different billing interval(say monthly to yearly), the billing period is reset. Customer is charged immediately for the modified subscription after applying credit for the unused period for the old subscription.\n**Card and VAT number Input:** If they are passed, corresponding [Billing Address](/docs/api/customers/customer-object) attributes and [vat_number](/docs/api/customers/customer-object) will be replaced. i.e existing values for Billing Address and 'vat_number' will be cleared and the new values will be set.\nIf an invoice gets generated during this operation, available Credits and Excess Payments will be automatically applied.\n\n**Advance charges**, if any, will be refunded as credits and a new invoice will be generated on renewal.\n", "operationId" : "update_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])))))))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-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription.\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Represents the plan quantity for this subscription.\n", "minimum" : 1, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the plan's default price. The unit depends on the [type of currency](/docs/api/getting-started).\nIf `changes_scheduled_at`\nis in the past and a `plan_unit_price`\nis not passed, then the plan's current unit price is considered even if the plan did not exist on the date as of when the change is scheduled.\n", "minimum" : 0, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "replace_addon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Should be true if the existing addons should be replaced with the ones that are being passed.\n", "example" : null }, "mandatory_addons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "A list of IDs representing the [mandatorily attached addons](/docs/api/attached_items)\nassociated with the plan to which the subscription is being updated. These addons will be removed from the subscription during the subscription update process.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](https://www.chargebee.com/docs/price-override.html)\nis enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](/docs/api/item_prices/item_price-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/getting-started)\nis enabled. If `changes_scheduled_at`\nis in the past and a `unit_price_in_decimal`\nis not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled.\n", "maxLength" : 39, "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices`\nis set to `true`\n, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes and line_item_taxes are computed based on the tax configuration as of `invoice_date`.\nWhen passing this parameter, the following prerequisites must be met:\n\n* `invoice_date` must be in the past.\n* `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n* It is not earlier than `changes_scheduled_at`, `reactivate_from`, or `trial_end`.\n* `invoice_immediately` is `true`. .\n", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The new start date of a `future`\nsubscription. Applicable only for `future`\nsubscriptions.\n", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial has ended or will end for the subscription. Set it to `0` to have no trial period. \n**Note**\n\n* This is only allowed when the subscription `status` is `future`, `in_trial`, or `cancelled`.\n* The value must not be earlier than `changes_scheduled_at` or `start_date`.\n* This parameter can be backdated (set to a value in the past) only when the subscription is in `cancelled` or `in_trial` `status`. Do this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end` is backdated, the subscription immediately goes into `active` or `non_renewing` status.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan is used.\n", "minimum" : 0, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).\nIf a new term is started for the subscription due to this API call, then `terms_to_charge`\nis inclusive of this new term. See description for the `force_term_reset`\nparameter to learn more about when a subscription term is reset.\n", "minimum" : 1, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "If the subscription `status`\nis `cancelled`\nand it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.\n**Note:**\nIt is recommended not to pass this parameter along with `changed_scheduled_at`.\n`reactivate_from`\ncan be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating must be enabled for subscription reactivation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.\n* The date is on or after the last date/time any of the product catalog items of the subscription were changed.\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. .\n", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nchosen for the site for calendar billing. Only applicable when using calendar billing.\n\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\n* sepa_credit - SEPA Credit\n* cash - Cash\n* no_preference - No Preference\n* bank_transfer - Bank Transfer\n* check - Check\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n* custom - Custom\n* boleto - Boleto\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* ach_credit - ACH Credit\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](/docs/api/coupon_codes).\nIf `changes_scheduled_at`\nis in the past, then the currently available coupons can be used even if they were not available as of the date for when the change is scheduled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_coupon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If `true`\nthen the existing `coupon_ids`\nlist for the subscription is replaced by the one provided. If `false`\nthen the provided list gets added to the existing `coupon_ids`\n.\n", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "* When `true`: [Prorated credits or charges](https://www.chargebee.com/docs/1.0/proration.html#proration-mechanism) are created as applicable for this change.\n* When `false`: The subscription is changed without creating any credits or charges.\n* When not provided, the value configured in the [site settings](https://www.chargebee.com/docs/1.0/proration.html#proration-for-subscription-change) is considered.\n\n**Caveat**\n\nFor further changes within the same billing term, when `prorate` is set to `true`, **credits** are **not created** when **all** the conditions below hold true:\n\nAn immediate previous change was made\n\n* with `prorate` set to `false` and\n* no changes were made to the subscription's billing term and\n* a change was made to either the subscription's plan, its addons, or the prices of the plan or addons.\n", "example" : null }, "end_of_term" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Set this to true if you want the update to be applied at the end of the current subscription billing cycle.\n", "example" : null }, "force_term_reset" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Say the subscription has the renewal date as 28th of every month. When the plan-item price of the subscription is set to one that has the same billing period as the current plan-item price, the subscription change does not change the term. In other words, the subscription still renews on the 28th. Passing this parameter as `true`\nwill have the subscription reset its term to the current date (provided `end_of_term`\nis false).\n**Note**:\nWhen the new plan-item price has a billing period different from the current plan-item price of the subscription, the term is always reset, regardless of the value passed for this parameter.\n", "example" : null }, "reactivate" : { "type" : "boolean", "deprecated" : false, "description" : "When the `status`\nof the subscription is `cancelled`\n, this parameter determines whether the subscription is reactivated upon making this API request. Unless passed explicitly as `false`\n, this parameter is implied as `true`\nwhen you provide `plan_id`\nor `addons[id]`\n", "example" : null }, "token_id" : { "type" : "string", "deprecated" : false, "description" : "The Chargebee payment token generated by [Chargebee JS](https://www.chargebee.com/checkout-portal-docs/3ds-helper-overview.html#using-gateway-s-hosted-fields). \n**Note** :\nThe payment token created via Chargebee JS uses the gateway selected through [Smart Routing](https://www.chargebee.com/docs/payments/1.0/payment-gateways-and-configuration/gateway_settings#smart-routing).\nExplicitly passing a `gateway_id`\nin this API call will not override the gateway associated with the token.\n", "maxLength" : 40, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the subscription. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/v2/pcv-1/advanced-features)\n.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\nThe default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration)\n. \n**Note:**\n`invoice_immediately`\nonly affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.\n\n.\n", "example" : null }, "override_relationship" : { "type" : "boolean", "deprecated" : false, "description" : "If `true`\n, ignores the [hierarchy relationship](/docs/api/customers/customer-object#relationship)\nand uses customer as payment and invoice owner.\n", "example" : null }, "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When `change_option`\nis set to `specific_date`\n, then set the date/time at which the subscription change is to happen or has happened. **Note:**\nIt is recommended not to pass this parameter along with `reactivate_from`.\n`changes_scheduled_at`\ncan be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating must be enabled for subscription change operations.\n\n* Only the following changes can be backdated:\n\n* Changes in the recurring items or their prices.\n\n* Addition of non-recurring items.\n\n* Subscription `status` is `active`, `cancelled`, or `non_renewing`.\n\n* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is typically the day of the month by which the accounting for the previous month must be closed.\n\n* The date is on or after `current_term_start`.\n\n* The date is on or after the last date/time any of the following changes were made:\n\n* Changes in the recurring items or their prices.\n\n* Addition of non-recurring items.\n\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February..\n\n**Note:**\nThe `changes_scheduled_at`\nparameter does not apply to `auto_collection`\n, `shipping_address`\n, and `po_number`\n; these parameters take effect **immediately**\nwhen scheduling a subscription update.\n", "example" : null }, "change_option" : { "type" : "string", "deprecated" : false, "description" : "When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.\n\n* end_of_term - The change is carried out at the end of the current billing cycle of the subscription.\n* specific_date -\n The change is carried out as of the date specified under `changes_scheduled_at`\n .\n* immediately - The change is carried out immediately.\n", "enum" : [ "immediately", "end_of_term", "specific_date" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit.\n", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/v2/pcv-1/plans/create-a-plan#period_unit)\nattribute of the [plan](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#plan_id)\nchosen.\n\n* week - Charge based on week(s)\n* month - Charge based on month(s)\n* day - Charge based on day(s)\n* year - Charge based on year(s)\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nhas been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends.\n\n* activate_subscription - The subscription activates and charges are raised for non-metered items.\n* cancel_subscription - The subscription cancels.\n* plan_default -\n The action [configured for the site](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\n at the time when the trial ends, takes effect.\n* site_default -\n This is the default value. The action [configured for the site](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\n at the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "description" : "The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "description" : "The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\n* cartes_bancaires - A Cartes Bancaires card scheme.\n* mastercard - A MasterCard scheme.\n* visa - A Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `billing_state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `billing_state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_method\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\n* grab_pay - Payments made via GrabPay\n* go_pay - Payments made via GoPay\n* google_pay - Payments made via Google Pay.\n* after_pay - Payments made via Afterpay\n* qpay - Payments made via Qpay.\n* pix - Payments made via Pix\n* pay_by_bank - Pay By Bank\n* sofort - Payments made via Sofort.\n* twint - Payments made via Twint\n* netbanking_emandates - Netbanking (eMandates) Payments.\n* apple_pay - Payments made via Apple Pay.\n* unionpay - Payments made via UnionPay.\n* giropay - Payments made via giropay.\n* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* paypay - Payments made via PayPay\n* south_korean_cards - Payments made via South Korean Cards\n* bancontact - Payments made via Bancontact Card.\n* upi - UPI Payments.\n* revolut_pay - Payments made via Revolut Pay.\n* stablecoin - Payments made via Stablecoin.\n* alipay -\n Payments made via Alipay. \n This payment source is deprecated.\n* tamara - Payments made via Tamara.\n* payme - Payments made via PayMe\n* pay_to - Payments made via PayTo\n* pay_co - Payments made via PayCo\n* kakao_pay - Payments made via Kakao Pay.\n* wechat_pay -\n Payments made via WeChat Pay. \n This payment source is deprecated.\n* sepa_instant_transfer - Payments made via Sepa Instant Transfer\n* dotpay - Payments made via Dotpay.\n* klarna - Payments made via Klarna.\n* paypal_express_checkout - Payments made via PayPal Express Checkout.\n* ideal - Payments made via iDEAL.\n* electronic_payment_standard - Electronic Payment Standard\n* generic - Payments made via Generic Payment Method.\n* klarna_pay_now - Payments made via Klarna Pay Now\n* faster_payments - Payments made via Faster Payments\n* swish - Payments made via Swish\n* venmo - Payments made via Venmo\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* naver_pay - Payments made via Naver Pay.\n* touch_n_go - Payments made via Touch 'n Go.\n* dana - Payments made via Dana.\n* automated_bank_transfer - Represents virtual bank account using which the payment will be done.\n* amazon_payments - Payments made via Amazon Payments.\n* gcash - Payments made via GCash.\n* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* online_banking_poland - Payments made via Online Banking Poland\n* trustly - Trustly\n* kbc_payment_button - KBC Payment Button\n* alipay_hk - Payments made via Alipay HK.\n* cash_app_pay - Payments made via Cash App Pay.\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal this will be the *billing agreement id* .\nFor GoCardless direct debit this will be 'mandate id'. In the case of card this will be the identifier provided by the gateway/card vault for the specific payment method resource. **Note:**\nThis is not the one-time temporary token provided by gateways like Stripe.\n\nFor more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n", "maxLength" : 200, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "description" : "Single-use tokens created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.Net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details.\n", "maxLength" : 65000, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "[ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error.\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, then `XI`\n(the code for **United Kingdom - Northern Ireland**\n) is available as an option.\n", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "description" : "Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay.\n\n* card - card\n* twint - Payments made via Twint\n* dotpay - dotpay\n* faster_payments -\n* upi - upi\n* kbc_payment_button - KBC Payment Button\n* klarna - Payments made via Klarna.\n* payme - Payments made via PayMe\n* google_pay - google_pay\n* paypal_express_checkout - paypal_express_checkout\n* pix - Pix\n* klarna_pay_now - Klarna Pay Now\n* ideal - ideal\n* boleto - boleto\n* wechat_pay - Payments made via WeChat Pay.\n* after_pay - Payments made via Afterpay\n* grab_pay - Payments made via GrabPay\n* direct_debit - direct_debit\n* sepa_instant_transfer -\n* bancontact - bancontact\n* touch_n_go - Payments made via Touch 'n Go.\n* qpay - Payments made via Qpay.\n* kakao_pay - Payments made via Kakao Pay.\n* dana - Payments made via Dana.\n* south_korean_cards - Payments made via South Korean Cards\n* swish - Payments made via Swish\n* go_pay - Payments made via GoPay\n* trustly - Trustly\n* naver_pay - Payments made via Naver Pay.\n* stablecoin - Payments made via Stablecoin.\n* venmo -\n* alipay - Payments made via Alipay.\n* tamara - Payments made via Tamara.\n* pay_to -\n* pay_co - Payments made via PayCo\n* cash_app_pay - Payments made via Cash App Pay.\n* alipay_hk - Payments made via Alipay HK.\n* netbanking_emandates - netbanking_emandates\n* paypay - PayPay\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* electronic_payment_standard - Electronic Payment Standard\n* pay_by_bank - Pay By Bank\n* apple_pay - apple_pay\n* online_banking_poland - Online Banking Poland\n* gcash - Payments made via GCash.\n* giropay - giropay\n* sofort - sofort\n* amazon_payments - Amazon Payments\n* revolut_pay - Payments made via Revolut Pay.\n", "enum" : [ "card", "ideal", "sofort", "bancontact", "google_pay", "dotpay", "giropay", "apple_pay", "upi", "netbanking_emandates", "paypal_express_checkout", "direct_debit", "boleto", "venmo", "amazon_payments", "pay_to", "faster_payments", "sepa_instant_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "Parameters for statement_descriptor\n", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Payment transaction descriptor text to help your customer easily recognize the transaction. When this value is passed this will override the [transaction descriptor](https://www.chargebee.com/docs/1.0/transaction_descriptors.html)\ntext configured in the Chargebee site for all the subscription renewal transactions.\n", "maxLength" : 65000, "example" : null } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "The VAT/tax registration number for the customer. For customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas\n`XI`\n(which is **United Kingdom - Northern Ireland**\n), the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number)\ncan be overridden by setting\n[vat_number_prefix](/docs/api/customers/customer-object#vat_number_prefix)\n.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null }, "entity_identifier_scheme" : { "type" : "string", "deprecated" : false, "description" : "The Peppol BIS scheme associated with the [vat_number](/docs/api/customers/customer-object#vat_number)\nof the customer. This helps identify the specific type of customer entity. For example, `DE:VAT`\nis used for a German business entity while `DE:LWID45`\nis used for a German government entity. The value must be from the list of possible values and must correspond to the country provided under `billing_address.country`.\nSee [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries)\n. \n**Tip:**\n\nIf there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.\n", "maxLength" : 50, "example" : null }, "is_einvoice_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "Determines whether the customer is e-invoiced. When set to `true`\nor not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (`billing_address.country`\n). When set to `false`\n, the customer is not e-invoiced even if e-invoicing is enabled for their country. \n**Tip:**\n\nIt is possible to set a value for this flag even when E-Invoicing is disabled. However, it comes into effect only when E-Invoicing is enabled.\n", "example" : null }, "einvoicing_method" : { "type" : "string", "deprecated" : false, "description" : "Determines whether to send einvoice manually or automatic.\n\n* automatic - Use this value to send e-invoice every time an invoice or credit note is created.\n* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API.\n* site_default - The default value of the site which can be overridden at the customer level.\n", "enum" : [ "automatic", "manual", "site_default" ], "example" : null }, "entity_identifier_standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "The standard used for specifying the `entity_identifier_scheme`.\nCurrently only `iso6523-actorid-upis`\nis supported and is used by default when not provided. \n**Tip:**\n\nIf there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.\n", "maxLength" : 50, "example" : null }, "business_customer_without_vat_number" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is a valid business without an EU/UK VAT number.\n", "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is registered under GST. If set to `true`\nthen the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism)\nis applicable. This field is applicable only when Australian GST is configured for your site.\n", "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* renew_once -\n Used when you want to renew the contract term just once. Does the following: - Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n\n * The `action_at_term_end` for the new contract term is set to `cancel`.\n* cancel - Contract term completes and subscription is canceled.\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started).\nThe Plan's billing frequency will not be considered for overriding. E.g. If the Plan's billing frequency is every 3 months, and if the price override amount is $10, $10 will be used, and not $30 (i.e $10 x 3). If `changes_scheduled_at`\nis in the past and `addons[unit_price][i]`\nis not passed, then the addon's current unit price is considered even if the addon did not exist on the date as of when the change is scheduled.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](https://www.chargebee.com/docs/price-override.html)\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon period. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/getting-started)\nis enabled. If `changes_scheduled_at`\nis in the past and `addons[unit_price_in_decimal][i]`\nis not passed, then the addon's current unit price is considered even if the addon did not exist on the date as of when the change is scheduled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The time at which the trial ends for the addon. To update this value, redo the complete addon set using [`replace_addon_list`](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#replace_addon_list).\n(Addon trial periods must be enabled by [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n.)\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "proration_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies how to manage charges or credits for the addon during this subscription update. It's relevant only for addons that have their [pricing_model](/docs/api/v2/pcv-1/addons/addon-object#pricing_model)\nset to `per_unit`.\nYou may use this parameter only if the change to the subscription takes effect [immediately](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#change_option). \n**Note**\n\n* Once set, this parameter becomes a [subscription attribute](/docs/api/v2/pcv-1/subscriptions/subscription-object#addons_proration_type) and automatically applies to any additional changes to the addon during the current term. It's removed from the subscription attributes at renewal. You can't alter this parameter's value within the current term via later API calls.\n* If you don't provide a value, Chargebee determines the proration logic based on the following precedence: this parameter \\> [prorate](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#prorate) parameter \\> [addon.proration_type](/docs/api/v2/pcv-1/addons/addon-object#proration_type) \\> [site-wide proration](https://www.chargebee.com/docs/1.0/proration.html#proration-for-subscription-change) setting.\n\n* partial_term - Prorate the charges or credits for the rest of the current term.\n* none - Don't apply any charges or credits for the addon.\n* full_term - Charge the full price of the addon or give the full credit. Don't apply any proration.\n", "enum" : [ "full_term", "partial_term", "none" ], "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates when the non-recurring addon will be charged.\n\n* immediately - Charges for the addon will be applied immediately.\n* on_event - Charge for the addon will be applied on the occurrence of a specified event.\n", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n* plan_activation - Addon will be charged on plan activation.\n* contract_termination - Addon will be charged on contract termination.\n* subscription_activation - Addon will be charged on subscription activation.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "billing_address" : { "style" : "deepObject", "explode" : true }, "card" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "payment_intent" : { "style" : "deepObject", "explode" : true }, "payment_method" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "statement_descriptor" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null }, "credit_notes" : { "type" : "array", "description" : "Resource object representing credit_note
", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/import_contract_term" : { "post" : { "summary" : "Import contract term", "description" : "Import previous and active [contract terms](/docs/api/contract_terms)\n.\n\nFor contract terms in `active`\nstate, import is allowed only if the associated subscription is `active`\n, `in_trial`\n, `future`\nor `non-renewing`\n.\n", "operationId" : "import_contract_term", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Id that uniquely identifies the contract term in the site.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the contract term was created.\n", "example" : null }, "contract_start" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the contract term\n", "example" : null }, "contract_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the contract term\n", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of contract\n\n* active - An actively running contract term.\n* completed - The contract term has run its full duration.\n* cancelled -\n The contract term was ended because: - a change in the subscription caused a [subscription term reset](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#force_term_reset).\n\n * the subscription was cancelled due to non-payment.\n* terminated - The contract term was terminated ahead of completion.\n", "enum" : [ "active", "completed", "cancelled", "terminated" ], "example" : null }, "total_amount_raised" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The amount raised for the contract term till the time of importing the subscription. This amount is added to the [total_contract_value](/docs/api/contract_terms/contract_term-object#total_contract_value)\n", "minimum" : 0, "example" : null }, "total_amount_raised_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The amount raised for the contract term till the time of importing the subscription excluding tax. This amount is added to the [total_contract_value_before_tax](/docs/api/contract_terms/contract_term-object#total_contract_value)\n", "minimum" : 0, "example" : null }, "total_contract_value" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "The sum of the [totals](/docs/api/invoices/invoice-object#total)\nof all the invoices raised as part of the contract term. For `active`\ncontract terms, this is a predicted value. The value depends on the [type of currency](/docs/api/v2/pcv-1/subscriptions).\nIf the subscription was [imported](/docs/api/v2/pcv-1/subscriptions/import-a-subscription)\nwith the contract term, then this value includes the value passed for `total_amount_raised`\n.\n", "minimum" : 0, "example" : null }, "total_contract_value_before_tax" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "It refers to the total amount of revenue that is expected to be generated from a specific contract term, calculated as the sum of all invoices raised during the term, regardless of payment status. It is based on past performance and the specified currency in the contract. If the subscription was imported, the value for `total_amount_raised_before_tax`\nis included in the calculation of the total contract value before tax. It's important to note that this value excludes any applicable taxes.\n", "minimum" : 0, "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles of the subscription that the contract term is for.\n", "minimum" : 0, "example" : null }, "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew_once -\n Used when you want to renew the contract term just once. Does the following: - Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n\n * The `action_at_term_end` for the new contract term is set to `cancel`.\n* cancel - Contract term completes and subscription is canceled.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "contract_term" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "contract_term" : { "$ref" : "#/components/schemas/ContractTerm", "description" : "Resource object representing contract_term
" } }, "required" : [ "contract_term" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/override_billing_profile" : { "post" : { "summary" : "Override billing profile", "description" : "Assigns the payment source and sets auto collection state for the subscription. \nWhen you don't pass any input param for this API, payment source and auto collection for the subscription will be the same as the customer's default settings.\n", "operationId" : "override_billing_profile", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Unique identifier of the payment source to be attached to this subscription.\n", "maxLength" : 40, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/remove_scheduled_pause" : { "post" : { "summary" : "Remove scheduled pause", "description" : "If the subscription is in **Active** or **Non Renewing** state and is also scheduled to pause at the end_of_term/specific_date, this API can be used to remove the scheduled pause.\n", "operationId" : "remove_scheduled_pause", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])?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])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/cancel" : { "post" : { "summary" : "Cancel a subscription", "description" : "Cancelling a subscription will move the subscription from its current state to **Cancelled**, and will stop all recurring actions.\n\nYou could schedule the cancellation by passing **end_of_term** parameter as **true** . If scheduled, the subscription status will be set to **non_renewing** if it is in **active** state, until the end of term, and then **cancelled** . A subscription's state will not change if it is in **in_trial** state. However, cancellation will be scheduled at the end of the trial.\n\n#### CREDIT OPTION\n\nOn subscription cancellation, credits can be issued against current term charges of the subscription by using **credit_option_for_current_term_charges**. You can choose to either provide no credits, prorate credits for the unused period or issue full credits for the current term charges.\n\n#### UNBILLED CHARGES\n\nAny unbilled charges present in the subscription can either be invoiced or deleted by specifying **unbilled_charges_option**. Note that automatic charge will be attempted on the payment method available if the customer has enabled auto-collection. If not, the invoice will be closed as unpaid.\n\n#### ACCOUNT RECEIVABLES\n\nSpecifying **account_receivables_handling** allows you to close invoices of the subscription which have amounts due. The invoices are chosen for payment collection or for writing off the due amount after applying the available credits and excess payments.\n\nIf specified as **schedule_payment_collection** , payment collection for the amount due of past invoices will be attempted. The payment method available will be charged if auto-collection is enabled for the customer, and appropriate payment collection(payment succeeded or payment failed) events will be triggered. If the payment collection fails, no further retries will be made on the invoices. **Note:** If the invoices of the subscription are consolidated, and any of the subscriptions in the consolidated invoice are cancelled, these invoices will not be selected for collection.\n\nIf specified as **write_off** , the amount due of past invoices will be written-off. **Note:** If the invoices of the subscription are consolidated, and any of the subscriptions in the consolidated invoice are still active(future, in-trial, active, and non-renewing), these invoices will not be selected for the write-off operation.\n\n#### ACCOUNT PAYABLES\n\nSpecifying refundable_credits_handling allows you to provide refunds for refundable credits remaining, after they are applied to a subscription's due invoices. The refund initiated will be asynchronous and the payment refunded event will be triggered on refund success. **Note:** Consolidated credit notes of the subscription will not be selected for refund.\n\n#### Contract terms\n\nIf the subscription has [contract terms](/docs/api/contract_terms), it can only be canceled by terminating the contract using the `contract_term_cancel_option`. The contract term and the subscription are canceled together.\n\n##### Contract terms parameters\n\n* [contract_term_cancel_option](/docs/api/v2/pcv-1/subscriptions/cancel-a-subscription#contract_term_cancel_option)\n* [cancel_at](/docs/api/v2/pcv-1/subscriptions/cancel-a-subscription#cancel_at)\n* [credit_option_for_current_term_charges](/docs/api/v2/pcv-1/subscriptions/cancel-a-subscription#credit_option_for_current_term_charges)\n* [unbilled_charges_option](/docs/api/v2/pcv-1/subscriptions/cancel-a-subscription#unbilled_charges_option)\n* [account_receivables_handling](/docs/api/v2/pcv-1/subscriptions/cancel-a-subscription#account_receivables_handling)\n* [refundable_credits_handling](/docs/api/v2/pcv-1/subscriptions/cancel-a-subscription#refundable_credits_handling)\n\nAdvance charges, if any, will be refunded as credits.\n", "operationId" : "cancel_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})(?:(?:(?:(?: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?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "cancel_option" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nDetermines when to cancel the subscription.\n\n##### If the subscription has a contract term:\n\nThis parameter is not applicable.\n\n* end_of_billing_term - This is used to cancel a subscription either at the end of the advance term, if it's billed for future renewals or at the end of its current billing cycle\n* end_of_term - This is used to cancel a subscription at the end of the current billing cycle\n* immediately - This is used to cancel the subscription with immediate effect\n* specific_date - This is used to cancel a subscription on a specified date. The change occurs as of the date/time defined in `cancel_at`\n", "enum" : [ "immediately", "end_of_term", "specific_date", "end_of_billing_term" ], "example" : null }, "end_of_term" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "**(Deprecated)** Use `cancel_option` instead.\nApplicable only when the subscription does not have [contract terms](/docs/api/contract_terms).\nSet this to `true` if you want to cancel the subscription at the end of the current subscription billing cycle. The subscription `status` changes to `non_renewing`.\n", "example" : null }, "cancel_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies the date and time when the subscription should be canceled. Do not use this parameter when `end_of_term` is set to `true`.\n\n##### If the subscription has a contract term:\n\nApplicable only when `contract_term_cancel_option` is `specific_date`. Specifies the date and time to cancel the subscription and contract term.\n\n##### Backdating\n\nYou can set a past date to backdate the cancellation. Backdating is allowed only if the following conditions are met:\n\n* [Backdating](https://www.chargebee.com/docs/1.0/backdating.html) is enabled for subscription cancellation.\n* The current date does not exceed the [backdating limit configured in Chargebee Billing](https://www.chargebee.com/docs/1.0/backdating.html#configuring-backdated-subscription-actions-and-invoicing).\n* The date is on or after the `current_term_start`.\n* The date is on or after the most recent change involving:\n * Addition/change/removal of plan or addon item prices.\n * Addition of charge item prices.\n* The date is not more than one billing period into the past. For example, if the plan's billing period is two months and today is April 14, `cancel_at` cannot be earlier than February 14.\n", "example" : null }, "credit_option_for_current_term_charges" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies how to handle credits for current term charges when canceling immediately (i.e., `cancel_option` is `immediately`). If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/cancellations.html#configure-subscription-cancellation) is used.\n\n##### If the subscription has a contract term:\n\nSpecifies how to handle credits for current term charges when `contract_term_cancel_option` is `terminate_immediately`. If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/contract-terms.html#configuring-contract-terms) is used.\n\n* none - No credits notes are created.\n* full - Credits are issues for the full value of the current term charges.\n* prorate - Prorated credits are issued.\n", "enum" : [ "none", "prorate", "full", "consumption_based" ], "example" : null }, "unbilled_charges_option" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies how to handle unbilled charges when canceling immediately (i.e., `cancel_option` is `immediately`). If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/cancellations.html#configure-subscription-cancellation) is used.\n\n##### If the subscription has a contract term:\n\nSpecifies how to handle unbilled charges when `contract_term_cancel_option` is `terminate_immediately`. If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/contract-terms.html#configuring-contract-terms) is used.\n\n* invoice - An invoice is generated immediately with the unbilled charges.\n* delete - The unbilled charges are deleted.\n", "enum" : [ "invoice", "delete" ], "example" : null }, "account_receivables_handling" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies how to handle past due invoices when canceling immediately (i.e., `cancel_option` is `immediately`). If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/cancellations.html#configure-subscription-cancellation) is used.\n\n##### If the subscription has a contract term:\n\nSpecifies how to handle past due invoices when `contract_term_cancel_option` is `terminate_immediately`. If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/contract-terms.html#configuring-contract-terms) is used.\n\n* no_action - No action is taken.\n* write_off -\n Applies excess payments and refundable credits to past due invoices. Any remaining balance is written off.\n\n *Note: The credit note for the write-off is not included in the API response.*\n* schedule_payment_collection -\n Applies excess payments and refundable credits to past due invoices. If any amount remains and `auto_collection`\n is `on`\n , the remaining amount is automatically charged to the available payment method.\n", "enum" : [ "no_action", "schedule_payment_collection", "write_off" ], "example" : null }, "refundable_credits_handling" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies how to handle refundable credits when canceling immediately (i.e., `cancel_option` is `immediately`). If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/cancellations.html#configure-subscription-cancellation) is used.\n\n##### If the subscription has a contract term:\n\nSpecifies how to handle refundable credits when `contract_term_cancel_option` is `terminate_immediately`. If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/contract-terms.html#configuring-contract-terms) is used.\n\n* schedule_refund - Refunds remaining credits after applying them to any past due invoices.\n* no_action - No action is taken.\n", "enum" : [ "no_action", "schedule_refund" ], "example" : null }, "contract_term_cancel_option" : { "type" : "string", "deprecated" : false, "description" : "Required when the subscription has a contract term. Determines when to cancel the subscription along with the contract term.\n\n* terminate_immediately -\n Cancels the subscription and contract term immediately. Sets the contract term's `status` to `terminated` and collects any termination fee, if applicable.\n\n To specify the termination fee, include a single object in the `subscription_items` array. If not specified, the [default termination fee](/docs/api/contract_terms) is applied (if configured).\n* end_of_contract_term - Prevents the contract term from renewing and schedules the subscription for cancellation at the end of the contract term.\n* specific_date -\n Cancels the subscription and contract term on the date specified by `cancel_at`. Sets `action_at_term_end` to `cancel`.\n\n **Note** : Contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this option for your [Chargebee site](https://www.chargebee.com/docs/1.0/sites-intro.html).\n* end_of_subscription_billing_term -\n Cancels the subscription and contract term at the end of the current billing cycle. Sets `action_at_term_end` to `cancel`.\n\n **Note** : Contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this option for your [Chargebee site](https://www.chargebee.com/docs/1.0/sites-intro.html).\n", "enum" : [ "terminate_immediately", "end_of_contract_term", "specific_date", "end_of_subscription_billing_term" ], "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices`\nis `true`\n, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes`\nand `line_item_taxes`\nare computed based on the `tax`\nconfiguration as of `invoice_date`.\nWhen passing this parameter, the following prerequisites must be met:\n\n* `invoice_date` must be in the past.\n* `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n* It is not earlier than `cancel_at`. .\n", "example" : null }, "cancel_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Subscriptions \\> Subscription Cancellation**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "The unique `id`\nof the event-based addon that represents the termination fee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity associated with the termination fee. Applicable only when the addon for the termination charge is quantity-based.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The termination fee. In case it is quantity-based, this is the fee per unit.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "The service period of the termination fee-expressed in days-starting from the current date.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "event_based_addons" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null }, "credit_notes" : { "type" : "array", "description" : "Resource object representing credit_note
", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/charge_addon_at_term_end" : { "post" : { "summary" : "Charge addon at term end", "description" : "Adds a \"non-recurring addon\" charge to a subscription which will be added to the invoice generated at the end of the current term. If there are any applicable coupons in the subscription, an appropriate discount will be applied.\n\nTo collect the charges for the non-recurring addon immediately, [use this API](/docs/api/v2/pcv-1/invoices/create-invoice-for-a-non-recurring-addon). \nIf any subscription changes happen before the end of the current term, these charges will be collected along with it.\n", "operationId" : "charge_addon_at_term_end", "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])))))))|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9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "addon_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the non-recurring addon to be charged.\n", "maxLength" : 100, "example" : null }, "addon_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of addon units to be charged. Mandatory for quantity based addons.\n", "minimum" : 1, "example" : null }, "addon_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "addon_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the [non-recurring addon](https://www.chargebee.com/docs/charges.html#non-recurring-addon ).\nProvide the value in major units of the currency. Must be provided when the addon is quantity-based. This parameter can only be passed when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "addon_unit_price_in_decimal" : { "type" : "string", "default" : "Addon Amount in Decimal", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of [the non-recurring addon](https://www.chargebee.com/docs/charges.html#non-recurring-addon )\ncan be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. This parameter can only be passed when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the addon starts.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the addon ends.\n", "example" : null } }, "required" : [ "addon_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/edit_advance_invoice_schedule" : { "post" : { "summary" : "Edit advance invoice schedule", "description" : "Modifies the [advance invoicing schedule](/docs/api/advance_invoice_schedules) for a subscription.\n", "operationId" : "edit_advance_invoice_schedule", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles in one interval.\n", "minimum" : 1, "example" : null }, "schedule_type" : { "type" : "string", "deprecated" : false, "description" : "The type of advance invoice or advance invoicing schedule.\n\n* specific_dates -\n Charge on [specific dates](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_date).\n For each date, specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_terms_to_charge)\n to charge for. Up to 5 dates can be configured.\n* fixed_intervals -\n Charge at fixed intervals of time. Specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#terms_to_charge)\n that constitute an interval and the number of [days before each interval](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_days_before_renewal)\n that the invoice should be generated. Also specify [when the schedule should end](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_end_schedule_on)\n .\n", "enum" : [ "specific_dates", "fixed_intervals" ], "example" : null }, "fixed_interval_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for fixed_interval_schedule\n", "properties" : { "number_of_occurrences" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the [`remaining_billing_cycles`](/docs/api/subscriptions/subscription-object#remaining_billing_cycles)\nof the subscription. This parameter is applicable only when [`fixed_interval_schedule[end_schedule_on]`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_end_schedule_on)\n= `after_number_of_intervals`\n", "minimum" : 1, "example" : null }, "days_before_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before each interval that advance invoices are generated.\n", "minimum" : 1, "example" : null }, "end_schedule_on" : { "type" : "string", "deprecated" : false, "description" : "Specifies when the schedule should end.\n\n* after_number_of_intervals - Advance invoices are generated a `specified number of times`\n* subscription_end - Advance invoices are generated for as long as the subscription is active.\n* specific_date -\n End the advance invoicing schedule on a `specific date`\n .\n", "enum" : [ "after_number_of_intervals", "specific_date", "subscription_end" ], "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the schedule should end. Advance invoices are not generated beyond this date. It must be at least 1 day before the start of the last billing cycle of the subscription and also within 5 years from the current date. This parameter is only applicable when [`fixed_interval_schedule[end_schedule_on]`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_end_schedule_on)\n= `specific_date`\n.\n", "example" : null } }, "example" : null }, "specific_dates_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for specific_dates_schedule\n", "properties" : { "id" : { "type" : "array", "description" : "The [unique id](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#id)\nof the member of the [advance_invoice_schedule](/docs/api/advance_invoice_schedules)\narray which corresponds to the [specific_dates_schedule](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#specific_dates_schedule)\nthat you intend to modify. Only applicable when [schedule_type](/docs/api/subscriptions/edit-advance-invoice-schedule#schedule_type)\nis specific_dates.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "array", "description" : "The number of billing cycles to charge for, on the date specified. Applicable only when [`schedule_type`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#schedule_type)\nis specific_dates.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "date" : { "type" : "array", "description" : "The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when [`schedule_type`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#schedule_type)\nis `specific_dates`\n.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "fixed_interval_schedule" : { "style" : "deepObject", "explode" : true }, "specific_dates_schedule" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "advance_invoice_schedules" : { "type" : "array", "description" : "Resource object representing advance_invoice_schedule
", "items" : { "$ref" : "#/components/schemas/AdvanceInvoiceSchedule", "description" : "Resource object representing advance_invoice_schedule" }, "example" : null } }, "required" : [ "advance_invoice_schedules" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/contract_terms" : { "get" : { "summary" : "List contract terms for a subscription", "description" : "Retrieves a list of contract term resources for the subscription specified in the path.\n", "operationId" : "list_contract_terms_for_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "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, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending (earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "contract_term" : { "$ref" : "#/components/schemas/ContractTerm", "description" : "Resource object representing contract_term" } }, "required" : [ "contract_term" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing subscription
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null }, "credit_notes" : { "type" : "array", "description" : "Resource object representing credit_note
", "items" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" }, "example" : null } }, "required" : [ "customer", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/scheduled_changes" : { "get" : { "summary" : "Scheduled_changes a subscription_scheduled_change", "operationId" : "scheduled_changes_a_subscription_scheduled_change", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(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.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription_scheduled_change" : { "$ref" : "#/components/schemas/SubscriptionScheduledChange", "description" : "Resource object representing subscription_scheduled_change" } }, "required" : [ "subscription_scheduled_change" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/update_scheduled_changes" : { "post" : { "summary" : "Update_scheduled_changes a subscription_scheduled_change", "operationId" : "update_scheduled_changes_a_subscription_scheduled_change", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "cancel_reason_code" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "action_type" : { "type" : "string", "deprecated" : false, "enum" : [ "cancel", "pause", "reactivate" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "subscription_scheduled_change" : { "$ref" : "#/components/schemas/SubscriptionScheduledChange", "description" : "Resource object representing subscription_scheduled_change" } }, "required" : [ "subscription_scheduled_change" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/delete" : { "post" : { "summary" : "Delete a customer", "description" : "Deletes a particular customer identified by the a unique identifier. \nThis will delete the Payment Method from the gateway/vault. If you do not want the Payment Method to be deleted from the vault, set the value for the delete_payment_method parameter to false.\nThis operation is irreversible - all data related to the customer, such as subscriptions, invoices, transactions, and reports, will be deleted.\n**Note:** This operation schedules the customer resource for deletion. It will be deleted in a few minutes.\n", "operationId" : "delete_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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[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-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "delete_payment_method" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Deletes the Payment Method from the gateway/vault.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/relationships" : { "post" : { "summary" : "Link a customer to an account hierarchy", "description" : "Establish a [hierarchical relationship](https://www.chargebee.com/docs/1.0/account-hierarchy.html) between customers. The path parameter `customer_id` identifies the child in this relationship. \n**Prerequisite**\nBoth parent and child customers must be part of the same [business entity](/docs/api/v2/pcv-1/advanced-features). \n**Note**\n\n* A customer can have a maximum of 250 direct children.\n* The hierarchy allows a maximum of 5 levels from the root node to the lowest child node. \n**Note**\nFor the `use_default_hierarchy_settings`, `parent_account_access`, and `child_account_access` parameters below, the term \"parent\" usually refers to the customer with the ID [payment_owner_id](/docs/api/v2/pcv-1/customers/link-a-customer#payment_owner_id). However, if the `payment_owner_id` is the same as the child's ID (`{customer_id}`), the \"parent\" is identified by [parent_id](/docs/api/v2/pcv-1/customers/link-a-customer#parent_id).\n", "operationId" : "link_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})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?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "parent_id" : { "type" : "string", "deprecated" : false, "description" : "ID of the customer intended to be set as the immediate parent of the customer identified by `customer_id`\n.\n", "maxLength" : 50, "example" : null }, "payment_owner_id" : { "type" : "string", "deprecated" : false, "description" : "The `id`\nof the customer responsible for paying the invoices for the customer identified by `customer_id`.\nThis ID must match either `customer_id`\nor `invoice_owner_id`\n.\n", "maxLength" : 50, "example" : null }, "invoice_owner_id" : { "type" : "string", "deprecated" : false, "description" : "The `id`\nof the customer who receives the invoice for charges incurred by the customer identified by `customer_id`.\nThis ID must match either `customer_id`\nor one of its ancestors.\n", "maxLength" : 50, "example" : null }, "use_default_hierarchy_settings" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Decides if Chargebee should apply settings from the [Chargebee Billing UI](https://www.chargebee.com/docs/1.0/account-hierarchy.html#advanced-mode) or from this API request.\n\n* If set to `true`: Chargebee uses settings configured in the Chargebee Billing UI.\n* If set to `false`: Settings provided in the `parent_account_access` and `child_account_access` parameters are applied.\n", "example" : null }, "parent_account_access" : { "type" : "object", "deprecated" : false, "description" : "Settings for the parent account's access.\n", "properties" : { "portal_edit_child_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Determines the parent's access to the child's subscriptions in the Self-Serve Portal.\n\n* yes - The parent can view and edit the child's subscriptions.\n* no - The parent can't view or edit the child's subscriptions.\n* view_only - The parent can only view the child's subscriptions.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "portal_download_child_invoices" : { "type" : "string", "deprecated" : false, "description" : "Determines the parent's access to the child's invoices in the Self-Serve Portal.\n\n* no - The parent can't view or download the child's invoices.\n* view_only - The parent can view but not download the child's invoices.\n* yes - The parent can both view and download the child's invoices.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If set to `true`\n, the parent receives email notifications for the child's subscriptions.\n", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If set to `true`\n, the parent receives email notifications for payment-related activities on the child's invoices.\n", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If set to `true`\n, the parent receives email notifications for the child's invoices.\n", "example" : null } }, "example" : null }, "child_account_access" : { "type" : "object", "deprecated" : false, "description" : "Settings for the child account's access.\n", "properties" : { "portal_edit_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own subscriptions in the Self-Serve Portal.\n\n* view_only - The child account can only view its subscriptions.\n* yes - The child account can view and edit its subscriptions.\n", "enum" : [ "yes", "view_only" ], "example" : null }, "portal_download_invoices" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own invoices in the Self-Serve Portal.\n\n* yes - The child account can both view and download its invoices.\n* view_only - The child account can view but not download its invoices.\n* no - The child account cannot view or download its own invoices.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If set to `true`\n, the child account receives email notifications for its subscriptions.\n", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If set to `true`\n, the child account receives email notifications for payment-related activities for its invoices.\n", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If set to `true`\n, the child account receives email notifications for its invoices.\n", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "child_account_access" : { "style" : "deepObject", "explode" : true }, "parent_account_access" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/delete_relationship" : { "post" : { "summary" : "Unlink a customer from its parent account", "description" : "When a customer belongs to an [account hierarchy](https://www.chargebee.com/docs/1.0/account-hierarchy.html)\n, this operation detaches the customer from its parent. The hierarchy, if any, beneath the customer remains unchanged.\n", "operationId" : "delink_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/delete_contact" : { "post" : { "summary" : "Delete contacts for a customer", "description" : "Deletes a particular contact for a customer. You can delete a contact by giving the Contact ID as the input parameter.\n", "operationId" : "delete_contacts_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "contact" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contact\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique reference ID provided for the contact.\n", "maxLength" : 150, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "contact" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/assign_payment_role" : { "post" : { "summary" : "Assign payment role", "description" : "Assign Primary or Backup payment role or unassign role for the payment source based on the preference for the payment collection.\n", "operationId" : "assign_payment_role", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})):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9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source id this role will be assigned to.\n", "maxLength" : 40, "example" : null }, "role" : { "type" : "string", "deprecated" : false, "description" : "Indicates whether the payment source is Primary, Backup, or neither.\n\n* backup - Backup\n* none - None\n* primary - Primary\n", "enum" : [ "primary", "backup", "none" ], "example" : null } }, "required" : [ "payment_source_id", "role" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/move" : { "post" : { "summary" : "Move a customer", "description" : "This API copies a customer object from one site to another. The destination site (the site to which the customer is copied) is specified by the path parameter `{site}`; whereas, the source site (the site from which the customer is copied) is specified by the query parameter `from_site`. \n**Prerequisites**\n\n* This endpoint is disabled by default. For the operation to work, the endpoint must be enabled for both the source and destination sites. Contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to have it enabled.\n* The customer's `preferred_currency_code` must be enabled in the destination site.\n", "operationId" : "move_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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}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[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "id_at_from_site" : { "type" : "string", "deprecated" : false, "description" : "Id of the customer to be copied.\n", "maxLength" : 100, "example" : null }, "from_site" : { "type" : "string", "deprecated" : false, "description" : "Name of the site from which this customer need to be copied.\n", "maxLength" : 50, "example" : null } }, "required" : [ "from_site", "id_at_from_site" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "resource_migration" : { "$ref" : "#/components/schemas/ResourceMigration", "description" : "Resource object representing resource_migration
" } }, "required" : [ "resource_migration" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/hierarchy" : { "get" : { "summary" : "Get account hierarchy for a customer", "description" : "Retrieves the full or partial [account hierarchy](/docs/api/v2/pcv-1/hierarchies)\nfor a customer.\n", "operationId" : "get_hierarchy", "parameters" : [ { "name" : "hierarchy_operation_type", "in" : "query", "description" : "Specifies which part of the account hierarchy to retrieve for the customer identified by `{customer_id}`\n\n* complete_hierarchy - Retrieve all nodes in the account hierarchy.\n* subordinates -\n Retrieve all nodes in the account hierarchy that start from the specified customer (identified by `{customer_id}`\n ) and include its subordinates. In other words, get nodes in the account hierarchy tree where the root node is the specified customer.\n* path_to_root -\n Retrieve nodes from the specified customer (identified by `{customer_id}`\n ) to the root of its account hierarchy.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "enum" : [ "complete_hierarchy", "subordinates", "path_to_root" ], "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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,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-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hierarchies" : { "type" : "array", "description" : "Resource object representing hierarchy
", "items" : { "$ref" : "#/components/schemas/Hierarchy", "description" : "Resource object representing hierarchy" }, "example" : null } }, "required" : [ "hierarchies" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/update_payment_method" : { "post" : { "summary" : "Update payment method for a customer", "description" : "[Payment Sources](/docs/api/payment_sources)\ncomes with additional options and improvements to the [Card APIs](/docs/api/cards)\n. For this operation, use the [Create using temporary token](/docs/api/v2/pcv-1/payment_sources/create-using-gateway-temporary-token)\nAPI or [Create using permanent token](/docs/api/payment_sources/create-using-permanent-token)\nAPI under Payment Sources to update payment method for the customer.\n\nUpdates payment method details for a customer. \n**Note:**\nIf you wish to pass the card number, CVV, or the single-use card tokens provided by gateways like Stripe, then use the [Update card for a customer](/docs/api/cards/update-card-for-a-customer)\nAPI under Cards resource. This API is not supported for Chargebee Test Gateway, it is provided to help you understand the billing workflow in Chargebee.\n\n**PayPal Express Checkout**\n\nYou can use this API if you are directly integrating PayPal Express Checkout in your website instead of using Chargebee's hosted pages. When your customer updates his payment method using PayPal Express Checkout, you will be provided with the *Billing Agreement ID* by PayPal. You can update the payment method for that customer in Chargebee by passing `type` as `paypal_express_checkout` and `reference_id` with the *Billing Agreement ID*.\n\n**Login and Pay with Amazon**\n\nYou can use this API if you are directly integrating *Login and Pay with Amazon* in your website instead of using Chargebee's hosted pages. When your customer updates Amazon as a payment method, you will be provided with the *Billing Agreement ID* by Amazon. You can update the payment method for that customer in Chargebee by passing `type` as `amazon_payments` and `reference_id` with the *Billing Agreement ID*.\n\n**Card Payments**\n\nWhen the card details of your customer are stored in the vault of gateways such as Stripe or Braintree, you can use this API to update the *reference id* provided by them in Chargebee. To use this API, pass\n\n* `type` as `card`.\n* `gateway` with the gateway associated with the card. If the gateway is not specified, the default gateway will be used.\n* `reference_id` with the identifier provided by the gateway/Spreedly to reference that specific card.\n\n**Reference id format for Card Payments**\n\nThe format of reference_id will differ based on where the card is stored.\n\n**Stripe:** In case of Stripe, the reference_id consists of combination of Stripe Customer ID and Stripe Card ID separated by forward slash (e.g. *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G*). If you are passing Stripe Customer ID alone, then Chargebee will store the card marked as active for that customer in Stripe.\n\n**Braintree:** In case of Braintree, the reference_id consists of combination of Braintree Customer ID and Braintree Payment Method Token separated by forward slash\n\n(e.g. *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G* ). If you are passing Braintree Customer ID alone, then Chargebee will store the card marked as default for that customer in Braintree.\n\n**Spreedly Card vault:** If the card details are stored in Spreedly vault, then you need to provide the Spreedly token as `reference_id`.\n\n**Direct Debit Payments**\n\nWhen the bank account details of your customer are stored in the gateway vault, you can use this API to update the reference id provided by them in Chargebee. To use this API, pass\n\n* `type` as `direct_debit`.\n* `gateway` with the gateway where the bank account details are stored (e.g. *authorize_net*). If the gateway is not specified, the gateway supporting the direct debit will be used.\n* `reference_id` with the identifier provided by the gateway to reference the customer's bank account details.\n* `tmp_token` with the single use token provided by the gateway ( Should be passed only if reference_id is not passed ).\n\n**Reference id format for Direct Debit Payments**\n\nThe format of reference_id will differ based on where the bank account is stored.\n\n**Stripe:** In case of Stripe, the reference_id consists of combination of Stripe Customer ID and Stripe Bank Account ID separated by forward slash\n\n(e.g. *cus_8suoHaLQH4G5AW/ba_18b8z2KmcbENlhgU03RznRYW*). If you are passing Stripe Customer ID alone, then Chargebee will store the first bank account details present in payment profile list of that customer in Stripe.\n\n**Authorize.Net:** The reference_id consists of combination of Authorize.Net's Customer Profile ID and Payment Profile ID separated by forward slash (e.g. *2384383/34834382*). If you are passing Authorize.Net's Customer Profile ID alone, then Chargebee will store the first bank account details present in payment profile list of that customer in Authorize.Net.\n\n**GoCardless:** The reference_id is the GoCardless Customer Mandate ID (e.g. *MD0077Z99TTQXK*).\n\n**Note:** While using this API to update payment method details, [Card Verification](https://www.chargebee.com/docs/cards.html#card-verification) will not happen even if it is enabled for that particular gateway.\n", "operationId" : "update_payment_method_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(?:(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?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_method\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\n* grab_pay - Payments made via GrabPay\n* sepa_instant_transfer - Payments made via Sepa Instant Transfer\n* touch_n_go - Payments made via Touch 'n Go.\n* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* paypay - Payments made via PayPay\n* south_korean_cards - Payments made via South Korean Cards\n* go_pay - Payments made via GoPay\n* dana - Payments made via Dana.\n* bancontact - Payments made via Bancontact Card.\n* dotpay - Payments made via Dotpay.\n* automated_bank_transfer - Represents virtual bank account using which the payment will be done.\n* upi - UPI Payments.\n* google_pay - Payments made via Google Pay.\n* revolut_pay - Payments made via Revolut Pay.\n* amazon_payments - Payments made via Amazon Payments.\n* klarna - Payments made via Klarna.\n* gcash - Payments made via GCash.\n* paypal_express_checkout - Payments made via PayPal Express Checkout.\n* after_pay - Payments made via Afterpay\n* qpay - Payments made via Qpay.\n* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* ideal - Payments made via iDEAL.\n* pix - Payments made via Pix\n* pay_by_bank - Pay By Bank\n* stablecoin - Payments made via Stablecoin.\n* sofort - Payments made via Sofort.\n* alipay -\n Payments made via Alipay. \n This payment source is deprecated.\n* twint - Payments made via Twint\n* electronic_payment_standard - Electronic Payment Standard\n* generic - Payments made via Generic Payment Method.\n* tamara - Payments made via Tamara.\n* klarna_pay_now - Payments made via Klarna Pay Now\n* netbanking_emandates - Netbanking (eMandates) Payments.\n* payme - Payments made via PayMe\n* online_banking_poland - Payments made via Online Banking Poland\n* pay_to - Payments made via PayTo\n* unionpay - Payments made via UnionPay.\n* faster_payments - Payments made via Faster Payments\n* pay_co - Payments made via PayCo\n* swish - Payments made via Swish\n* trustly - Trustly\n* venmo - Payments made via Venmo\n* kbc_payment_button - KBC Payment Button\n* giropay - Payments made via giropay.\n* kakao_pay - Payments made via Kakao Pay.\n* alipay_hk - Payments made via Alipay HK.\n* wechat_pay -\n Payments made via WeChat Pay. \n This payment source is deprecated.\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* naver_pay - Payments made via Naver Pay.\n* cash_app_pay - Payments made via Cash App Pay.\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal this will be the *billing agreement id* .\nFor GoCardless direct debit this will be 'mandate id'. In the case of card this will be the identifier provided by the gateway/card vault for the specific payment method resource. **Note:**\nThis is not the one-time temporary token provided by gateways like Stripe.\n\nFor more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n", "maxLength" : 200, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "description" : "Single-use toke created by payment gateways. In Stripe, a single-use token is created for direct debit. In Braintree, a nonce is created for PayPal.\n", "maxLength" : 65000, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "[ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error.\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, then `XI`\n(the code for **United Kingdom - Northern Ireland**\n) is available as an option.\n", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "required" : [ "type" ], "example" : null } }, "example" : null }, "encoding" : { "payment_method" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}" : { "get" : { "summary" : "Retrieve a customer", "description" : "Retrieves the details of the desired customer. You can use the unique identifier for a particular customer to retrieve the desired details.\n", "operationId" : "retrieve_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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}(?:(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:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] }, "post" : { "summary" : "Update a customer", "description" : "Updates the customer resource. However, this method cannot be used for updating the 'Billing Info' - the Billing Address and 'vat_number' attributes - of the customer. To update the same, use our [Update Billing Info](/docs/api/customers/update-billing-info-for-a-customer) API.\n", "operationId" : "update_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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\\-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F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "maxLength" : 70, "example" : null }, "preferred_currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled.\n", "maxLength" : 3, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer.\n", "maxLength" : 50, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name of the customer.\n", "maxLength" : 250, "example" : null }, "auto_collection" : { "type" : "string", "default" : "on", "deprecated" : false, "description" : "Whether payments needs to be collected automatically for this customer.\n\n* on - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made.\n* off - Automatic collection of charges will not be made. All payments must be recorded offline.\n", "enum" : [ "on", "off" ], "example" : null }, "allow_direct_debit" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the customer can pay via Direct Debit.\n", "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days within which the customer has to make payment for the invoice.\n", "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "Specifies if the customer is liable for tax.\n\n* taxable -\n Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html).\n In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero.\n* exempt -\n * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.\n * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address.\n", "enum" : [ "taxable", "exempt" ], "example" : null }, "exemption_details" : { "type" : "array", "deprecated" : false, "description" : "Indicates the exemption information. You can customize customer exemption based on specific Location, Tax level (Federal, State, County and Local), Category of Tax or specific Tax Name. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\nTo know more about what values you need to provide, refer to this [Avalara's API document](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/exemption/)\n.\n", "items" : { "example" : null }, "example" : null }, "customer_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks\n* industrial - When the purchase is made by an industrial business\n* business - When the purchase is made at a place of business\n* residential - When the purchase is made by a customer for home use\n", "enum" : [ "residential", "business", "senior_citizen", "industrial" ], "example" : null }, "client_profile_id" : { "type" : "string", "deprecated" : false, "description" : "Indicates the Client profile id for the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "maxLength" : 50, "example" : null }, "taxjar_exemption_category" : { "type" : "string", "deprecated" : false, "description" : "Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration.\n\n* government - Government\n* other - Other\n* wholesale - Whole-sale\n", "enum" : [ "wholesale", "government", "other" ], "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "description" : "Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.\n", "maxLength" : 50, "example" : null }, "entity_code" : { "type" : "string", "deprecated" : false, "description" : "The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption)\n.\n\n* med2 - US Medical Device Excise Tax with taxable sales tax\n* med1 - US Medical Device Excise Tax with exempt sales tax\n* d - Foreign diplomat\n* e - Charitable or benevolent organization\n* f - Religious organization\n* g - Resale\n* a - Federal government\n* b - State government\n* c - Tribe/Status Indian/Indian Band\n* l - Other or custom\n* m - Educational organization\n* n - Local government\n* h - Commercial agricultural production\n* i - Industrial production/manufacturer\n* j - Direct pay permit\n* k - Direct mail\n* p - Commercial aquaculture\n* q - Commercial Fishery\n* r - Non-resident\n", "enum" : [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "med1", "med2" ], "example" : null }, "exempt_number" : { "type" : "string", "deprecated" : false, "description" : "Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption)\n.\n", "maxLength" : 100, "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the customer.\n\n* custom - Custom\n* bank_transfer - Bank Transfer\n* boleto - Boleto\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* sepa_credit - SEPA Credit\n* cash - Cash\n* check - Check\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* no_preference - No Preference\n* us_automated_bank_transfer - US Automated Bank Transfer\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* ach_credit - ACH Credit\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "auto_close_invoices" : { "type" : "boolean", "deprecated" : false, "description" : "Override for this customer, the [site-level setting](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing)\nfor auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the [subscription level](/docs/api/subscriptions/subscription-object#auto_close_invoices)\nwhich takes precedence.\n", "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the customer. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/v2/pcv-1/advanced-features)\n.\n", "example" : null }, "fraud_flag" : { "type" : "string", "deprecated" : false, "description" : "Indicates whether or not the customer has been identified as fraudulent.\n\n* fraudulent - The customer has been marked as fraudulent\n* safe - The customer has been marked as safe\n", "enum" : [ "safe", "fraudulent" ], "example" : null }, "consolidated_invoicing" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether invoices raised on the same day for the `customer` are consolidated. When provided, this overrides the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing). This parameter can be provided only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html) is enabled. \n**Note:**\n\nAny invoices raised when a subscription activates from `in_trial` or `future` `status`, are not consolidated by default. [Contact Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable consolidation for such invoices.\n\n.\n", "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the related tax field\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/hierarchy_detail" : { "get" : { "summary" : "Get paginated account hierarchy for a customer", "description" : "Retrieves the [account hierarchy tree](/docs/api/hierarchies)\nfor the customer.\n", "operationId" : "list_hierarchy_details", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "maximum" : 100, "minimum" : 1, "example" : null } }, { "name" : "offset", "in" : "query", "description" : "Used for pagination. Set this to the `next_offset`\nvalue from the previous API response to fetch the next page.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "hierarchy_operation_type", "in" : "query", "description" : "Specifies which part of the hierarchy to fetch. Choose from the available operation types.\n\n* complete_hierarchy - Fetches all nodes in the full hierarchy that the customer belongs to.\n* subordinates - Fetches all nodes in the sub-hierarchy rooted at the customer, including the customer and its subordinates.\n* path_to_root - Fetches a list of nodes along the path from the customer to the root of the hierarchy.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "enum" : [ "complete_hierarchy", "subordinates", "path_to_root" ], "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "hierarchy" : { "$ref" : "#/components/schemas/Hierarchy", "description" : "Resource object representing hierarchy" } }, "required" : [ "hierarchy" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing customer
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers" : { "get" : { "summary" : "List customers", "description" : "Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID.\n", "operationId" : "list_customers", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|(?:(?:(?:(?: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})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "If set to true, includes the deleted resources in the response. For the deleted resources in the response, the '**deleted**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is_not\\] = \"9bsvnHgsvmsI\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "9bsvnHgsvmsI", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "first_name", "in" : "query", "description" : "optional, string filter\n\nFirst name of the customer.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*first_name\\[is\\] = \"John\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "John", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "last_name", "in" : "query", "description" : "optional, string filter\n\nLast name of the customer.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*last_name\\[is\\] = \"Clint\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Clint", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "email", "in" : "query", "description" : "optional, string filter\n\nEmail of the customer. Configured email notifications will be sent to this email.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*email\\[is\\] = \"john@test.com\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "john@test.com", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "company", "in" : "query", "description" : "optional, string filter\n\nCompany name of the customer.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*company\\[is\\] = \"Globex Corp\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Globex Corp", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "phone", "in" : "query", "description" : "optional, string filter\n\nPhone number of the customer.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*phone\\[is\\] = \"(541) 754-3010\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "(541) 754-3010", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "auto_collection", "in" : "query", "description" : "optional, enumerated string filter\n\nWhether payments needs to be collected automatically for this customer. Possible values are : on, off.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*auto_collection\\[is\\] = \"on\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "on", "properties" : { "is" : { "type" : "string", "description" : "* `on` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made.\n* `off` - Automatic collection of charges will not be made. All payments must be recorded offline.", "enum" : [ "on", "off" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `on` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made.\n* `off` - Automatic collection of charges will not be made. All payments must be recorded offline.", "enum" : [ "on", "off" ], "example" : null }, "in" : { "type" : "string", "description" : "* `on` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made.\n* `off` - Automatic collection of charges will not be made. All payments must be recorded offline.", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `on` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made.\n* `off` - Automatic collection of charges will not be made. All payments must be recorded offline.", "enum" : [ "on", "off" ], "pattern" : "^\\[(on|off)(,(on|off))*\\]$", "example" : null } } } }, { "name" : "taxability", "in" : "query", "description" : "optional, enumerated string filter\n\nSpecifies if the customer is liable for tax. Possible values are : taxable, exempt.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*taxability\\[is\\] = \"taxable\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "taxable", "properties" : { "is" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero.\n* `exempt` -\n * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.\n * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address.\n", "enum" : [ "taxable", "exempt" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero.\n* `exempt` -\n * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.\n * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address.\n", "enum" : [ "taxable", "exempt" ], "example" : null }, "in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero.\n* `exempt` -\n * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.\n * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address.\n", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `taxable` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero.\n* `exempt` -\n * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.\n * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address.\n", "enum" : [ "taxable", "exempt" ], "pattern" : "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this customer resource is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on `updated_at`.\nThis attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the `sort_by`\ninput parameter as `updated_at`\nfor a faster response.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "offline_payment_method", "in" : "query", "description" : "optional, enumerated string filter\n\nThe preferred offline payment method for the customer. Possible values are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*offline_payment_method\\[is\\] = \"cash\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "cash", "properties" : { "is" : { "type" : "string", "description" : "* `no_preference` - No Preference\n* `cash` - Cash\n* `check` - Check\n* `bank_transfer` - Bank Transfer\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `boleto` - Boleto\n* `us_automated_bank_transfer` - US Automated Bank Transfer\n* `eu_automated_bank_transfer` - EU Automated Bank Transfer\n* `uk_automated_bank_transfer` - UK Automated Bank Transfer\n* `jp_automated_bank_transfer` - JP Automated Bank Transfer\n* `mx_automated_bank_transfer` - MX Automated Bank Transfer\n* `custom` - Custom", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `no_preference` - No Preference\n* `cash` - Cash\n* `check` - Check\n* `bank_transfer` - Bank Transfer\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `boleto` - Boleto\n* `us_automated_bank_transfer` - US Automated Bank Transfer\n* `eu_automated_bank_transfer` - EU Automated Bank Transfer\n* `uk_automated_bank_transfer` - UK Automated Bank Transfer\n* `jp_automated_bank_transfer` - JP Automated Bank Transfer\n* `mx_automated_bank_transfer` - MX Automated Bank Transfer\n* `custom` - Custom", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "in" : { "type" : "string", "description" : "* `no_preference` - No Preference\n* `cash` - Cash\n* `check` - Check\n* `bank_transfer` - Bank Transfer\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `boleto` - Boleto\n* `us_automated_bank_transfer` - US Automated Bank Transfer\n* `eu_automated_bank_transfer` - EU Automated Bank Transfer\n* `uk_automated_bank_transfer` - UK Automated Bank Transfer\n* `jp_automated_bank_transfer` - JP Automated Bank Transfer\n* `mx_automated_bank_transfer` - MX Automated Bank Transfer\n* `custom` - Custom", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "pattern" : "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `no_preference` - No Preference\n* `cash` - Cash\n* `check` - Check\n* `bank_transfer` - Bank Transfer\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `boleto` - Boleto\n* `us_automated_bank_transfer` - US Automated Bank Transfer\n* `eu_automated_bank_transfer` - EU Automated Bank Transfer\n* `uk_automated_bank_transfer` - UK Automated Bank Transfer\n* `jp_automated_bank_transfer` - JP Automated Bank Transfer\n* `mx_automated_bank_transfer` - MX Automated Bank Transfer\n* `custom` - Custom", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "pattern" : "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\]$", "example" : null } } } }, { "name" : "auto_close_invoices", "in" : "query", "description" : "optional, boolean filter\n\nOverride for this customer, the [site-level setting](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing)\nfor auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the [subscription level](/docs/api/subscriptions/subscription-object#auto_close_invoices)\nwhich takes precedence. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*auto_close_invoices\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "properties" : { "is" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "business_entity_id", "in" : "query", "description" : "optional, string filter\n\nThe ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity. \n**Note**\n\n[Multiple Business Entities](/docs/api/getting-started) is a feature available only on Product Catalog 2.0.\n\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*business_entity_id\\[is_not\\] = \"business_entity_id\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "business_entity_id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null } }, "example" : null } }, { "name" : "relationship", "in" : "query", "description" : "Parameters for relationship\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "parent_id" : { "type" : "object", "deprecated" : false, "description" : "Immediate parent with whom we will link our new customer(child)\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "payment_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to pay\n", "example" : "active1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "invoice_owner_id" : { "type" : "object", "deprecated" : false, "description" : "Parent who is going to handle invoices\n", "example" : "future_billing", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card" } }, "required" : [ "customer" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/add_contact" : { "post" : { "summary" : "Add contacts to a customer", "description" : "Adds the required contact to a customer. You can give the First Name, Last Name, Email ID and more details as input parameters to add them under the desired customer.\n", "operationId" : "add_contacts_to_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]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,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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "contact" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contact\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique reference ID provided for the contact.\n", "maxLength" : 150, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the contact.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the contact.\n", "maxLength" : 50, "example" : null }, "label" : { "type" : "string", "deprecated" : false, "description" : "Label/Tag provided for contact.\n", "maxLength" : 50, "example" : null }, "enabled" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Contact enabled / disabled\n", "example" : null }, "send_billing_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Billing Emails option is enabled for the contact.\n", "example" : null }, "send_account_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Account Emails option is enabled for the contact.\n", "example" : null } }, "required" : [ "email" ], "example" : null } }, "example" : null }, "encoding" : { "contact" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/contacts" : { "get" : { "summary" : "List of contacts for a customer", "description" : "This API retrieves all the contacts for a customer.\n", "operationId" : "list_of_contacts_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})):(?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|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "contact" : { "$ref" : "#/components/schemas/Contact", "description" : "Resource object representing contact" } }, "required" : [ "contact" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing customer
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/merge" : { "post" : { "summary" : "Merge customers", "description" : "This API moves a customer's payment methods, subscriptions, invoices, credit notes, transactions, unbilled charges, and orders to another customer. Events and email logs will not be moved. The API execution is asynchronous. \n**Note**\n\n* Moving virtual bank accounts from one customer to another is not supported in this API.\n* Merging customers from different [business entities](/docs/api/getting-started) is not permitted.\n", "operationId" : "merge_customers", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(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}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "from_customer_id" : { "type" : "string", "deprecated" : false, "description" : "From customer id.\n", "maxLength" : 50, "example" : null }, "to_customer_id" : { "type" : "string", "deprecated" : false, "description" : "To customer id.\n", "maxLength" : 50, "example" : null } }, "required" : [ "from_customer_id", "to_customer_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/collect_payment" : { "post" : { "summary" : "Collect payment for customer", "description" : "**Note:**\nThis operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/getting-started)\nand pass it as input parameter to this API.\n\nThis API can be used to collect the payments for customer's **payment_due** and **not_paid** invoices. You can either choose to collect the payment from an existing payment source or a new payment source. You can choose to either retain or discard the new payment source, which is being used for payment. If the amount collected exceeds the invoice amount, the surplus will be counted in as excess payments.\n", "operationId" : "collect_payment_for_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(?:(?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:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount to be collected. If this parameter is not passed then the invoice(s) amount to collect will be collected.\n", "minimum" : 0, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source used for the payment.\n", "maxLength" : 40, "example" : null }, "token_id" : { "type" : "string", "deprecated" : false, "description" : "Token generated by Chargebee JS representing payment method details.\n", "maxLength" : 40, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "retain_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the payment source should be retained for the customer.\n", "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\n* customer - Pass this value to indicate that the request is initiated by the customer\n* merchant - Pass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "payment_method" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_method\n", "properties" : { "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\n* grab_pay - Payments made via GrabPay\n* sepa_instant_transfer - Payments made via Sepa Instant Transfer\n* go_pay - Payments made via GoPay\n* dotpay - Payments made via Dotpay.\n* google_pay - Payments made via Google Pay.\n* klarna - Payments made via Klarna.\n* paypal_express_checkout - Payments made via PayPal Express Checkout.\n* after_pay - Payments made via Afterpay\n* qpay - Payments made via Qpay.\n* ideal - Payments made via iDEAL.\n* pix - Payments made via Pix\n* pay_by_bank - Pay By Bank\n* sofort - Payments made via Sofort.\n* twint - Payments made via Twint\n* electronic_payment_standard - Electronic Payment Standard\n* generic - Payments made via Generic Payment Method.\n* klarna_pay_now - Payments made via Klarna Pay Now\n* netbanking_emandates - Netbanking (eMandates) Payments.\n* apple_pay - Payments made via Apple Pay.\n* unionpay - Payments made via UnionPay.\n* faster_payments - Payments made via Faster Payments\n* swish - Payments made via Swish\n* venmo - Payments made via Venmo\n* giropay - Payments made via giropay.\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* naver_pay - Payments made via Naver Pay.\n* touch_n_go - Payments made via Touch 'n Go.\n* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* paypay - Payments made via PayPay\n* south_korean_cards - Payments made via South Korean Cards\n* dana - Payments made via Dana.\n* bancontact - Payments made via Bancontact Card.\n* automated_bank_transfer - Represents virtual bank account using which the payment will be done.\n* upi - UPI Payments.\n* revolut_pay - Payments made via Revolut Pay.\n* amazon_payments - Payments made via Amazon Payments.\n* gcash - Payments made via GCash.\n* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* stablecoin - Payments made via Stablecoin.\n* alipay -\n Payments made via Alipay. \n This payment source is deprecated.\n* tamara - Payments made via Tamara.\n* payme - Payments made via PayMe\n* online_banking_poland - Payments made via Online Banking Poland\n* pay_to - Payments made via PayTo\n* pay_co - Payments made via PayCo\n* trustly - Trustly\n* kbc_payment_button - KBC Payment Button\n* kakao_pay - Payments made via Kakao Pay.\n* alipay_hk - Payments made via Alipay HK.\n* wechat_pay -\n Payments made via WeChat Pay. \n This payment source is deprecated.\n* cash_app_pay - Payments made via Cash App Pay.\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal this will be the *billing agreement id* .\nFor GoCardless direct debit this will be 'mandate id'. In the case of card this will be the identifier provided by the gateway/card vault for the specific payment method resource. **Note:**\nThis is not the one-time temporary token provided by gateways like Stripe.\n\nFor more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n", "maxLength" : 200, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "description" : "Single-use token created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet or card details. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.Net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "description" : "The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "description" : "The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\n* cartes_bancaires - A Cartes Bancaires card scheme.\n* mastercard - A MasterCard scheme.\n* visa - A Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `billing_state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `billing_state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "description" : "Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay.\n\n* card - card\n* twint - Payments made via Twint\n* swish - Payments made via Swish\n* dotpay - dotpay\n* faster_payments - Faster Payments\n* upi - upi\n* kbc_payment_button - KBC Payment Button\n* klarna - Payments made via Klarna.\n* payme - Payments made via PayMe\n* go_pay - Payments made via GoPay\n* google_pay - google_pay\n* trustly - Trustly\n* naver_pay - Payments made via Naver Pay.\n* stablecoin - Payments made via Stablecoin.\n* paypal_express_checkout - paypal_express_checkout\n* pix - Pix\n* venmo - Venmo\n* klarna_pay_now - Klarna Pay Now\n* alipay - Payments made via Alipay.\n* tamara - Payments made via Tamara.\n* ideal - ideal\n* pay_to - PayTo\n* boleto - boleto\n* pay_co - Payments made via PayCo\n* wechat_pay - Payments made via WeChat Pay.\n* cash_app_pay - Payments made via Cash App Pay.\n* alipay_hk - Payments made via Alipay HK.\n* after_pay - Payments made via Afterpay\n* netbanking_emandates - netbanking_emandates\n* grab_pay - Payments made via GrabPay\n* paypay - PayPay\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* electronic_payment_standard - Electronic Payment Standard\n* direct_debit - direct_debit\n* sepa_instant_transfer - Sepa Instant Transfer\n* bancontact - bancontact\n* pay_by_bank - Pay By Bank\n* touch_n_go - Payments made via Touch 'n Go.\n* apple_pay - apple_pay\n* qpay - Payments made via Qpay.\n* online_banking_poland - Online Banking Poland\n* gcash - Payments made via GCash.\n* giropay - giropay\n* sofort - sofort\n* amazon_payments - Amazon Payments\n* kakao_pay - Payments made via Kakao Pay.\n* dana - Payments made via Dana.\n* south_korean_cards - Payments made via South Korean Cards\n* revolut_pay - Payments made via Revolut Pay.\n", "enum" : [ "card", "ideal", "sofort", "bancontact", "google_pay", "dotpay", "giropay", "apple_pay", "upi", "netbanking_emandates", "paypal_express_checkout", "direct_debit", "boleto", "venmo", "amazon_payments", "pay_to", "faster_payments", "sepa_instant_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "invoice_allocations" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice_allocations\n", "properties" : { "invoice_id" : { "type" : "array", "description" : "Identifier for the invoice. Multiple invoices can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "allocation_amount" : { "type" : "array", "description" : "Amount that will override the Invoice amount to be collected. If not specified Invoice amount to collect will be taken as default. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "required" : [ "invoice_id" ], "example" : null } }, "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true }, "invoice_allocations" : { "style" : "deepObject", "explode" : true }, "payment_intent" : { "style" : "deepObject", "explode" : true }, "payment_method" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "customer", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/record_excess_payment" : { "post" : { "summary" : "Record an excess payment for a customer", "description" : "Use this API to record any [excess payments](https://www.chargebee.com/docs/customers.html#excess-payments) made by the customer, such as advance payments. Such payments will be automatically applied to the future invoices. It can also be [manually applied](https://www.chargebee.com/docs/invoice-operations.html#apply-excess-payments) to the existing *Not Paid* or *Payment Due* invoices.\n", "operationId" : "record_an_excess_payment_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-f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(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the payment.\n", "maxLength" : 300, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The payment transaction ID\n", "maxLength" : 40, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The payment transaction amount\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the transaction.\n", "maxLength" : 3, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method of this transaction\n\n* cash - Cash\n* other - Payment Methods other than the above types\n* custom - Custom\n* check - Check\n* bank_transfer - Bank Transfer\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "The reference number for this transaction. e.g check number in case of 'check' payments.\n", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the custom payment method of this transaction.\n", "maxLength" : 50, "example" : null } }, "required" : [ "amount", "date", "payment_method" ], "example" : null } }, "example" : null }, "encoding" : { "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "customer", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/update_contact" : { "post" : { "summary" : "Update contacts for a customer", "description" : "Updates the details of a contact for a customer. You can give the field data to be updated as input parameters along with the Contact ID to update it.\n", "operationId" : "update_contacts_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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\\-]*[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(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "contact" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contact\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Unique reference ID provided for the contact.\n", "maxLength" : 150, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the contact.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the contact.\n", "maxLength" : 50, "example" : null }, "label" : { "type" : "string", "deprecated" : false, "description" : "Label/Tag provided for contact.\n", "maxLength" : 50, "example" : null }, "enabled" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Contact enabled / disabled\n", "example" : null }, "send_billing_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Billing Emails option is enabled for the contact.\n", "example" : null }, "send_account_email" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether Account Emails option is enabled for the contact.\n", "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "contact" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/update_hierarchy_settings" : { "post" : { "summary" : "Update account hierarchy access settings for a customer", "description" : "When the customer is part of an [account hierarchy](https://www.chargebee.com/docs/1.0/account-hierarchy.html), this operation updates the access privileges that both the customer and its parent have to the customer's data. \n**Terminology**\nThe term \"parent\" usually refers to the customer with the ID [payment_owner_id](/docs/api/v2/pcv-1/customers/customer-object#relationship_payment_owner_id). However, if the `payment_owner_id` is the same as the child's ID (given by the path parameter), the \"parent\" is identified by [parent_id](/docs/api/v2/pcv-1/customers/customer-object#relationship_parent_id). \n**Tip**\nYou cannot use this endpoint to change the `parent_id`, `invoice_owner_id` or `payment_owner_id` for the customer. To change them, [unlink the customer](/docs/api/v2/pcv-1/customers/delink-a-customer) and then call [Link a customer](/docs/api/v2/pcv-1/customers/link-a-customer) with the updated values.\n", "operationId" : "update_hierarchy_access_settings_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "use_default_hierarchy_settings" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Decides if Chargebee should apply settings from the [Chargebee Billing UI](https://www.chargebee.com/docs/1.0/account-hierarchy.html#advanced-mode) or from this API request.\n\n* If set to `true`: Chargebee removes existing settings stored in the `parent_account_access` and `child_account_access` attributes of the customer. The settings configured in the Chargebee Billing UI apply for the customer.\n* If set to `false`: Chargebee replaces existing settings stored in the `parent_account_access` and `child_account_access` parameters with those passed in this API call. If any of those parameters are not passed, they remain unchanged for the customer.\n", "example" : null }, "parent_account_access" : { "type" : "object", "deprecated" : false, "description" : "Parameters for parent_account_access\n", "properties" : { "portal_edit_child_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Sets parent's level of access to child subscriptions on the Self-Serve Portal.\n\n* yes - The parent account can view and edit the subscriptions of the child account.\n* no - The parent account cannot view or edit the subscriptions of the child account.\n* view_only - The parent account can only view the subscriptions of the child account.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "portal_download_child_invoices" : { "type" : "string", "deprecated" : false, "description" : "Sets parent's level of access to child invoices on the Self-Serve Portal.\n\n* yes - The parent account can view and download the invoices of the child account.\n* no - The parent account can neither view nor download the invoices of the child account.\n* view_only - The parent account can only view the invoices of the child account.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If `true`\n, the parent account will receive subscription-related emails sent to the child account.\n", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If `true`\n, the parent account will receive payment-related emails sent to the child account.\n", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If `true`\n, the parent account will receive invoice-related emails sent to the child account.\n", "example" : null } }, "example" : null }, "child_account_access" : { "type" : "object", "deprecated" : false, "description" : "When the customer is part of an [account hierarchy](https://www.chargebee.com/docs/1.0/account-hierarchy.html)\n, this attribute defines the level of access that the customer has to its own information.\n", "properties" : { "portal_edit_subscriptions" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own subscriptions in the Self-Serve Portal.\n\n* view_only - The child account can only view its subscriptions.\n* yes - The child account can view and edit its subscriptions.\n", "enum" : [ "yes", "view_only" ], "example" : null }, "portal_download_invoices" : { "type" : "string", "deprecated" : false, "description" : "Determines the child's access to its own invoices in the Self-Serve Portal.\n\n* view_only - The child account can view but not download its invoices.\n* no - The child account cannot view or download its own invoices.\n* yes - The child account can both view and download its invoices.\n", "enum" : [ "yes", "view_only", "no" ], "example" : null }, "send_subscription_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If `true`\n, the child account receives email notifications for its subscriptions.\n", "example" : null }, "send_payment_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If `true`\n, the child account receives email notifications for payment-related activities for its invoices.\n", "example" : null }, "send_invoice_emails" : { "type" : "boolean", "deprecated" : false, "description" : "If `true`\n, the child account receives email notifications for its invoices.\n", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "child_account_access" : { "style" : "deepObject", "explode" : true }, "parent_account_access" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/update_billing_info" : { "post" : { "summary" : "Update billing info for a customer", "description" : "This method is used for updating the `billing_address` and `vat_number` attributes of the `customer`. For updating the other customer attributes use [Update Customer API](/docs/api/customers/update-a-customer).\n\nDuring this operation, if `billing_address` and `vat_number` are not already present, they're added. Whereas if present, the existing values are replaced with the new values passed. The only exception here is for `entity_identifiers[i]` when `entity_identifiers[operation][i]` is passed as `delete`.\n\n**Note:** When an invoice is generated for a customer, the billing address provided for the customer will be stored with the invoice. If the First Name, Last Name, and Company fields do not contain any information under Billing Info, the same will be picked from Customer Details if the same is available there.Please ensure that the VAT number is provided whenever the billing address is updated, as failing to do so will override any existing VAT numbers if new values are not provided.\n", "operationId" : "update_billing_info_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])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(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "The VAT/tax registration number for the customer. For customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas\n`XI`\n(which is **United Kingdom - Northern Ireland**\n), the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number)\ncan be overridden by setting\n[vat_number_prefix](/docs/api/customers/customer-object#vat_number_prefix)\n.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null }, "entity_identifier_scheme" : { "type" : "string", "deprecated" : false, "description" : "The Peppol BIS scheme associated with the [vat_number](/docs/api/customers/customer-object#vat_number)\nof the customer. This helps identify the specific type of customer entity. For example, `DE:VAT`\nis used for a German business entity while `DE:LWID45`\nis used for a German government entity. The value must be from the list of possible values and must correspond to the country provided under `billing_address.country`.\nSee [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries)\n. \n**Tip:**\n\nIf there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.\n", "maxLength" : 50, "example" : null }, "entity_identifier_standard" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "description" : "The standard used for specifying the `entity_identifier_scheme`.\nCurrently only `iso6523-actorid-upis`\nis supported and is used by default when not provided. \n**Tip:**\n\nIf there are additional entity identifiers for the customer not associated with the `vat_number`, they can be provided as the `entity_identifiers[]` array.\n", "maxLength" : 50, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is registered under GST. If set to `true`\nthen the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism)\nis applicable. This field is applicable only when Australian GST is configured for your site.\n", "example" : null }, "business_customer_without_vat_number" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is a valid business without an EU/UK VAT number.\n", "example" : null }, "is_einvoice_enabled" : { "type" : "boolean", "deprecated" : false, "description" : "Determines whether the customer is e-invoiced. When set to `true`\nor not set to any value, the customer is e-invoiced so long as e-invoicing is enabled for their country (`billing_address.country`\n). When set to `false`\n, the customer is not e-invoiced even if e-invoicing is enabled for their country. \n**Tip:**\n\nIt is possible to set a value for this flag even when E-Invoicing is disabled. However, it comes into effect only when E-Invoicing is enabled.\n", "example" : null }, "einvoicing_method" : { "type" : "string", "deprecated" : false, "description" : "Determines whether to send einvoice manually or automatic.\n\n* automatic - Use this value to send e-invoice every time an invoice or credit note is created.\n* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API.\n* site_default - The default value of the site which can be overridden at the customer level.\n", "enum" : [ "automatic", "manual", "site_default" ], "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option. \n**E-Invoicing**\n\nIf `country` is provided as different from the existing value and if `entity_identifier_scheme`, `entity_identifier_standard`, and `entity_identifier` already exist and are not provided for this operation, they're cleared.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* invalid - Address is invalid.\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "entity_identifiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for entity_identifiers\n", "properties" : { "id" : { "type" : "array", "description" : "The unique id for the `entity_identifier[i]`\nin Chargebee. This is required when `entity_identifier[operation][i]`\nis `update`\nor `delete`\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "scheme" : { "type" : "array", "description" : "The Peppol BIS scheme associated with the [vat_number](/docs/api/customers/customer-object#vat_number)\nof the customer. This helps identify the specific type of customer entity. For example, `DE:VAT`\nis used for a German business entity while `DE:LWID45`\nis used for a German government entity. The value must be from the list of possible values and must correspond to the country provided under `billing_address.country`.\nSee [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries)\n. \n**Tip:**\n\nIf there is only one entity identifier for the customer and the value is the same as `vat_number`, then there is no need to provide the `entity_identifiers[]` array. See [description for `entity_identifiers[]`](/docs/api/customers/customer-object#entity_identifiers).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "value" : { "type" : "array", "description" : "The value of the `entity_identifier`.\nThis identifies the customer entity on the Peppol network. For example: `10101010-STO-10`\n. \n**Tip:**\n\nIf there is only one entity identifier for the customer and the value is the same as `vat_number`, then there is no need to provide the `entity_identifiers[]` array. See [description for `entity_identifiers[]`](/docs/api/customers/customer-object#entity_identifiers).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "operation" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "The operation to be performed for the `entity_identifier`\n.\n\n* update -\n Updates an existing `entity_identifier`\n for the customer. `entity_identifier[id]`\n must be provided in this case.\n* delete -\n Deletes an existing `entity_identifier`\n for the customer. `entity_identifier[id]`\n must be provided in this case.\n* create -\n Creates a new `entity_identifier`\n for the customer.\n", "enum" : [ "create", "update", "delete" ], "example" : null }, "example" : null }, "standard" : { "type" : "array", "description" : "The standard used for specifying the `entity_identifier`\n`scheme`.\nCurrently, only `iso6523-actorid-upis`\nis supported and is used by default when not provided. \n**Tip:**\n\nIf there is only one entity identifier for the customer and the value is the same as `vat_number`, then there is no need to provide the `entity_identifiers[]` array. See [description for `entity_identifiers[]`](/docs/api/customers/customer-object#entity_identifiers).\n", "items" : { "type" : "string", "default" : "iso6523-actorid-upis", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the related tax field\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "entity_identifiers" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/tokens/create_using_temp_token" : { "post" : { "summary" : "Create using vault temp token", "description" : "Generate a token using the one time token created by payment gateways for any specific payment method.\n", "operationId" : "create_using_vault_temp_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))?::(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fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which the token is associated.\n", "maxLength" : 50, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "Type of payment method of the token.\n\n* google_pay - Payments made via Google Pay.\n* pay_co - Payments made via PayCo\n* tamara - Payments made via Tamara.\n* alipay_hk - Payments made via Alipay HK.\n* apple_pay - Payments made via Apple Pay.\n* unionpay - Payments made via UnionPay.\n* ideal - Payments made via iDEAL.\n* bancontact - Payments made via Bancontact Card.\n* netbanking_emandates - Netbanking (eMandates) Payments.\n* trustly - Trustly\n* after_pay - Payments made via Afterpay\n* alipay -\n Payments made via Alipay. \n This payment source is deprecated.\n* dotpay - Payments made via Dotpay.\n* giropay - Payments made via giropay.\n* sofort - Payments made via Sofort.\n* gcash - Payments made via GCash.\n* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* dana - Payments made via Dana.\n* paypal_express_checkout - Payments made via PayPal Express Checkout.\n* touch_n_go - Payments made via Touch 'n Go.\n* qpay - Payments made via Qpay.\n* amazon_payments - Payments made via Amazon Payments.\n* electronic_payment_standard - Electronic Payment Standard\n* grab_pay - Payments made via GrabPay\n* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* upi - UPI Payments.\n* pay_by_bank - Pay By Bank\n* go_pay - Payments made via GoPay\n* swish - Payments made via Swish\n* twint - Payments made via Twint\n* generic - Payments made via Generic Payment Method.\n* payme - Payments made via PayMe\n* wechat_pay -\n Payments made via WeChat Pay. \n This payment source is deprecated.\n* kbc_payment_button - KBC Payment Button\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "id_at_vault" : { "type" : "string", "deprecated" : false, "description" : "Single-use token created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details.\n", "maxLength" : 65000, "example" : null }, "gw_obj_type" : { "type" : "string", "deprecated" : false, "description" : "Represents what type of object at gateway eg. \"token\" in case Stripe token and \"source\" in case of Stripe Source.\n", "maxLength" : 255, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "Used to derieve Bank Account Scheme by default will take site default currency.\n", "maxLength" : 3, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device .\n", "example" : null }, "browser_details" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "token_additional_detail" : { "type" : "object", "deprecated" : false, "description" : "Parameters for token_additional_detail\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null } }, "example" : null }, "token_billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for token_billing_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search)\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n).\n", "maxLength" : 50, "example" : null }, "country_code" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null } }, "example" : null } }, "required" : [ "id_at_vault", "payment_method_type" ], "example" : null }, "encoding" : { "token_additional_detail" : { "style" : "deepObject", "explode" : true }, "token_billing_address" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "token" : { "$ref" : "#/components/schemas/Token", "description" : "Resource object representing token
" } }, "required" : [ "token" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/tokens/create_for_card" : { "post" : { "summary" : "Create a card payment method token", "description" : "Generate a token that holds card related information.\n", "operationId" : "create_a_card_payment_method_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(?:(?:(?:(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:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "browser_details" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "description" : "The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "description" : "The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\n* cartes_bancaires - A Cartes Bancaires card scheme.\n* mastercard - A MasterCard scheme.\n* mada - A Mada card scheme.\n* visa - A Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `billing_state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n).\n", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `billing_state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null }, "card_type" : { "type" : "string", "deprecated" : false, "description" : "Type of the card\n\n* not_applicable - Used for offline entries in transactions. Not applicable for cards\n* visa - A Visa card.\n* electronic_payment_standard - Electronic Payment Standard\n* jcb - A JCB card.\n* kbc_payment_button - KBC Payment Button\n* diners_club - A Diner's Club card.\n* other - Card belonging to types other than those listed above.\n* discover - A Discover card.\n* american_express - An American Express card.\n* bancontact - A Bancontact card.\n* pay_by_bank - Pay By Bank\n* mastercard - A MasterCard.\n* trustly - Trustly\n", "enum" : [ "visa", "mastercard", "american_express", "discover", "jcb", "diners_club", "bancontact", "cmr_falabella", "tarjeta_naranja", "nativa", "cencosud", "cabal", "argencard", "elo", "hipercard", "carnet", "rupay", "maestro", "dankort", "cartes_bancaires", "mada", "other", "not_applicable" ], "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "maxLength" : 70, "example" : null } }, "required" : [ "expiry_month", "expiry_year", "number" ], "example" : null } }, "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "token" : { "$ref" : "#/components/schemas/Token", "description" : "Resource object representing token
" } }, "required" : [ "token" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/tokens/{cb-token-id}" : { "get" : { "summary" : "Retrieve a token", "description" : "Retrieve a token using token ID.\n", "operationId" : "retrieve_a_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "cb-token-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cb-token-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "token" : { "$ref" : "#/components/schemas/Token", "description" : "Resource object representing token
" } }, "required" : [ "token" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/create_using_permanent_token" : { "post" : { "summary" : "Create using permanent token", "description" : "This API provides an alternative way to create a payment source using a permanent token, instead of having to add the full payment method details via API or the Chargebee UI. Permanent tokens are provided by payment gateways such as Stripe. \nStoring card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources/create-using-payment-intent)\nunder Payment source to store the card after successful 3DS flow completion.\n", "operationId" : "create_using_permanent_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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}(?:(?: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?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer)\nAPI under Customer resource.\n\n* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* unionpay - Payments made via UnionPay.\n* google_pay - Payments made via Google Pay.\n* sepa_instant_transfer - Payments made via Sepa Instant Transfer\n* dotpay - Payments made via Dotpay.\n* pay_to - Payments made via PayTo\n* klarna - Payments made via Klarna.\n* revolut_pay - Payments made via Revolut Pay.\n* naver_pay - Payments made via Naver Pay.\n* giropay - Payments made via giropay.\n* grab_pay - Payments made via GrabPay\n* stablecoin - Payments made via Stablecoin.\n* alipay -\n Payments made via Alipay. \n This payment source is deprecated.\n* kakao_pay - Payments made via Kakao Pay.\n* sofort - Payments made via Sofort.\n* gcash - Payments made via GCash.\n* dana - Payments made via Dana.\n* pix - Payments made via Pix\n* pay_co - Payments made via PayCo\n* wechat_pay -\n Payments made via WeChat Pay. \n This payment source is deprecated.\n* netbanking_emandates - Netbanking (eMandates) Payments.\n* bancontact - Payments made via Bancontact Card.\n* go_pay - Payments made via GoPay\n* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* amazon_payments - Payments made via Amazon Payments.\n* pay_by_bank - Pay By Bank\n* online_banking_poland - Payments made via Online Banking Poland\n* touch_n_go - Payments made via Touch 'n Go.\n* after_pay - Payments made via Afterpay\n* faster_payments - Payments made via Faster Payments\n* alipay_hk - Payments made via Alipay HK.\n* paypay - Payments made via PayPay\n* generic - Payments made via Generic Payment Method.\n* payme - Payments made via PayMe\n* tamara - Payments made via Tamara.\n* klarna_pay_now - Payments made via Klarna Pay Now\n* twint - Payments made via Twint\n* swish - Payments made via Swish\n* automated_bank_transfer - Represents virtual bank account using which the payment will be done.\n* paypal_express_checkout - Payments made via PayPal Express Checkout.\n* venmo - Payments made via Venmo\n* ideal - Payments made via iDEAL.\n* trustly - Trustly\n* upi - UPI Payments.\n* kbc_payment_button - KBC Payment Button\n* cash_app_pay - Payments made via Cash App Pay.\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* south_korean_cards - Payments made via South Korean Cards\n* qpay - Payments made via Qpay.\n* apple_pay - Payments made via Apple Pay.\n* electronic_payment_standard - Electronic Payment Standard\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which the payment source is associated.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "The reference id. In the case of Amazon and PayPal, this will be the billing agreement ID. For GoCardless direct debit this will be `mandate_id`. In the case of a card, this will be the identifier provided by the gateway or card vault for the specific payment method resource. \n**Note:**\n\n* This is not the one-time temporary token provided by gateways like Stripe.\n\n* `reference_id` is an alternative for `payment_method_token`, `customer_profile_token`, `network_transaction_id`, or `mandate_id`.\n\n* `payment_method_token`, `customer_profile_token`, `network_transaction_id`, or `mandate_id` cannot be used with `reference_id`.\n\n* `reference_id` is a combination of multiple tokens available at the gateway. Learn more about the combination of each gateway from this [document](/docs/api/payment_parameters).\n\n", "maxLength" : 200, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "payment_method_token" : { "type" : "string", "deprecated" : false, "description" : "An identifier provided by the gateway or card vault for the specific payment method resource. \n**Note:**\n`payment_method_token` is an alternative for reference_id and cannot be used with `reference_id`.\n", "maxLength" : 100, "example" : null }, "customer_profile_token" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier associated with a customer\\`s profile within a payment gateway. \n**Note:**\n`customer_profile_token` is an alternative for reference_id and cannot be used with `reference_id`.\n", "maxLength" : 100, "example" : null }, "network_transaction_id" : { "type" : "string", "deprecated" : false, "description" : "An identifier of the payment or authorization transaction at the gateway initiated using this payment method. \n**Note:**\n`network_transaction_id` is an alternative for reference_id and cannot be used with `reference_id`.\n", "maxLength" : 100, "example" : null }, "mandate_id" : { "type" : "string", "deprecated" : false, "description" : "An identifier of mandates which is an authorization given by the payer (usually a customer or account holder) to allow a third party such as a merchant or service provider to initiate payments from their account. \n**Note:**\n`mandate_id` is an alternative for reference_id and cannot be used with `reference_id`.\n", "maxLength" : 100, "example" : null }, "skip_retrieval" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "By default, the value is `false` and payment method details will be retrieved from the selected payment gateway using `reference_id` or `payment_method_token` / `customer_profile_token` / `network_transaction_id` / `mandate_id`. Learn more about the multiple token combinations of each gateway from this [document](/docs/api/payment_parameters).\nEnter the value as `true` for the payment gateways that do not allow to retrieve the payment method details. Once passed, it will create payment method at Chargebee with the provided attributes in `payment_method_token`, `customer_profile_token`, `network_transaction_id`, `mandate_id`, `card`, and `billing_address`. \n**Note:**\nCurrently, the `skip_retrieval` value as `true` is only supported for the Vantiv payment gateway.\n", "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://docs.checkout.com/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device .\n", "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters of tokenized card details\n", "properties" : { "last4" : { "type" : "string", "deprecated" : false, "description" : "Last four digits of the card number\n", "maxLength" : 4, "minLength" : 4, "example" : null }, "iin" : { "type" : "string", "deprecated" : false, "description" : "The Issuer Identification Number, i.e. the first six digits of the card number\n", "maxLength" : 6, "minLength" : 6, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "brand" : { "type" : "string", "deprecated" : false, "description" : "Card brand\n\n* cabal - A Cabal card.\n* cartes_bancaires - A Cartes Bancaires card.\n* american_express - An American Express card.\n* visa - A Visa card.\n* cencosud - A Cencosud card.\n* maestro - A Maestro card.\n* carnet - A Carnet card.\n* argencard - An Argencard.\n* dankort - A Dankort card.\n* tarjeta_naranja - A Tarjeta Naranja card.\n* mastercard - A MasterCard.\n* jcb - A JCB card.\n* hipercard - An Hipercard.\n* other - Card belonging to types other than those listed above.\n* bancontact - A Bancontact card.\n* cmr_falabella - A CMR Falabella card.\n* rupay - A Rupay card.\n* nativa - A Nativa card.\n* discover - A Discover card.\n* elo - A Elo card.\n* diners_club - A Diner's Club card.\n* mada - A Mada card.\n", "enum" : [ "visa", "mastercard", "american_express", "discover", "jcb", "diners_club", "other", "bancontact", "cmr_falabella", "tarjeta_naranja", "nativa", "cencosud", "cabal", "argencard", "elo", "hipercard", "carnet", "rupay", "maestro", "dankort", "cartes_bancaires", "mada" ], "example" : null }, "funding_type" : { "type" : "string", "deprecated" : false, "description" : "Card Funding type\n\n* not_known - An unknown card.\n* debit - A debit card.\n* credit - A credit card.\n* prepaid - A prepaid card.\n", "enum" : [ "credit", "debit", "prepaid", "not_known" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null } }, "example" : null } }, "required" : [ "customer_id", "type" ], "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "card" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/{cust-payment-source-id}/delete" : { "post" : { "summary" : "Delete a payment source", "description" : "Deletes a payment source. Once the payment source is deleted, if\n\n* **Deleted payment source is Primary, and Backup is available**\n * The Backup payment source will become the Primary payment source.\n* **Deleted payment source is Primary, and no Backup is available**\n * The other payment source available, but not assigned to any subscription, will become the Primary payment source.\n\n **Note** : *When multiple payment sources exist, the payment method added most recently will be considered*.\n * If other payment sources available are assigned to subscriptions, the auto collection attribute for the customer will be set to Off, and the events *card_deleted* and *payment_source_deleted* will be triggered.\n\n* **Deleted payment source is attached to subscriptions**\n * Dunning will be initiated for subscriptions attached to this payment source if auto collection is set to On, and when no customer default is present.\n\nIf there is no such payment source present in the gateway for the customer, this API will return successfully without throwing any error. \n**Note**\n:\n\nIf you delete the only available payment method of a customer in Chargebee, it also deletes the customer's record at the gateway. To delete the payment method locally(delete only in Chargebee), use [Local Delete a Payment Source API](/docs/api/payment_sources/local-delete-a-payment-source)\n.\n", "operationId" : "delete_a_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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.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3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/create_card" : { "post" : { "summary" : "Create a card payment source", "description" : "Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources/create-using-payment-intent)\nunder Payment source to store the card after successful 3DS flow completion.\n", "operationId" : "create_a_card_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "description" : "The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "description" : "The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\n* mastercard - A MasterCard scheme.\n* cartes_bancaires - A Cartes Bancaires card scheme.\n* visa - A Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `billing_state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `billing_state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "required" : [ "expiry_month", "expiry_year", "number" ], "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/{cust-payment-source-id}/gateway_payment_method_tokens" : { "get" : { "summary" : "List gateway payment method tokens for a payment source", "operationId" : "list_gateway_payment_method_tokens_for_a_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "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" : "include_deleted", "in" : "query", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "gateway_payment_method_token" : { "$ref" : "#/components/schemas/GatewayPaymentMethodToken", "description" : "Resource object representing gateway_payment_method_token" } }, "required" : [ "gateway_payment_method_token" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/{cust-payment-source-id}/verify_bank_account" : { "post" : { "summary" : "Verify bank account payment source", "description" : "This API can be used to verify bank accounts which have been added as payment source. This is applicable for **Stripe ACH with micro-deposit mode bank accounts** only. Stripe handles verification in two ways - via Plaid, and micro-deposit.\n\nFor verifying bank accounts via **micro-deposit**, Stripe deposits two small amounts to the bank account being added. These deposits will take 1-2 business days to appear on the customer's bank statement. The bank statement description for the two micro-deposits contains the amount and the values deposited. Your customer will need to relay the value of the two deposits to you, after which you can verify the bank account. Once the bank account has been verified, the payment source will be marked as \"Valid\". \nA maximum of 10 failed verification attempts are allowed. Once this limit has been crossed, the bank account can no longer be verified, and will be marked as \"Invalid\" in Chargebee.\n", "operationId" : "verify_bank_account_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount1" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Value of the micro-deposits sent to the bank account.\n", "minimum" : 0, "example" : null }, "amount2" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Value of the micro-deposits sent to the bank account.\n", "minimum" : 0, "example" : null } }, "required" : [ "amount1", "amount2" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources" : { "get" : { "summary" : "List payment sources", "description" : "Lists all the payment sources\n", "operationId" : "list_payment_sources", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))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?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "subscription_id", "in" : "query", "description" : "Unique subscription identifier that helps to retrieve the payment source of a subscription which has `mandate`\nassociated to it.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "Indicates whether to include deleted objects in the list. The deleted objects have the attribute '`deleted`\n' as '`true`\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on Customer Id.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is_not\\] = \"3bdjnDnsdQn\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nType of payment source. Possible values are : card, paypal_express_checkout, amazon_payments, direct_debit, generic, alipay, alipay_hk, gcash, dana, touch_n_go, tamara, qpay, unionpay, apple_pay, wechat_pay, ideal, google_pay, sofort, bancontact, giropay, dotpay, upi, netbanking_emandates.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is\\] = \"card\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "card", "properties" : { "is" : { "type" : "string", "description" : "* `card` - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* `paypal_express_checkout` - Payments made via PayPal Express Checkout.\n* `amazon_payments` - Payments made via Amazon Payments.\n* `direct_debit` - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* `generic` - Payments made via Generic Payment Method.\n* `alipay` - Payments made via Alipay\n* `unionpay` - Payments made via UnionPay.\n* `apple_pay` - Payments made via Apple Pay.\n* `wechat_pay` - Payments made via WeChat Pay\n* `ideal` - Payments made via iDEAL.\n* `google_pay` - Payments made via Google Pay.\n* `sofort` - Payments made via Sofort.\n* `bancontact` - Payments made via Bancontact Card.\n* `giropay` - Payments made via giropay.\n* `dotpay` - Payments made via Dotpay.\n* `upi` - UPI Payments.\n* `netbanking_emandates` - Netbanking (eMandates) Payments.\n* `venmo` - Payments made via Venmo\n* `pay_to` - Payments made via PayTo\n* `faster_payments` - Payments made via Faster Payments\n* `sepa_instant_transfer` - Payments made via Sepa Instant Transfer\n* `automated_bank_transfer` - Represents virtual bank account using which the payment will be done.\n* `klarna_pay_now` - Payments made via Klarna Pay Now\n* `online_banking_poland` - Payments made via Online Banking Poland\n* `payconiq_by_bancontact` - Payments made via Payconiq by Bancontact\n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Payments made via Stablecoin\n* `kakao_pay` - Payments made via Kakao Pay\n* `naver_pay` - Payments made via Naver Pay\n* `revolut_pay` - Payments made via Revolut Pay\n* `cash_app_pay` - Payments made via Cash App Pay\n* `twint` - Payments made via Twint\n* `go_pay` - Payments made via Go Pay\n* `grab_pay` - Payments made via Grab Pay\n* `pay_co` - Payments made via Pay Co\n* `after_pay` - Payments made via After pay\n* `swish` - Payments made via Swish\n* `payme` - Payments made via PayMe\n* `pix` - Payments made via Pix\n* `klarna` - Payments made via Klarna\n* `alipay_hk` - Payments made via Alipay HK\n* `paypay` - Payments made via PayPay\n* `gcash` - Payments made via GCash\n* `south_korean_cards` - Payments made via South Korean Cards\n* `paynow` - Payments made via PayNow\n* `bizum` - Payments made via Bizum\n* `promptpay` - Payments made via PromptPay\n* `dana` - Payments made via Dana\n* `touch_n_go` - Payments made via Touch 'n Go\n* `tamara` - Payments made via Tamara\n* `qpay` - Payments made via Qpay\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `card` - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* `paypal_express_checkout` - Payments made via PayPal Express Checkout.\n* `amazon_payments` - Payments made via Amazon Payments.\n* `direct_debit` - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* `generic` - Payments made via Generic Payment Method.\n* `alipay` - Payments made via Alipay\n* `unionpay` - Payments made via UnionPay.\n* `apple_pay` - Payments made via Apple Pay.\n* `wechat_pay` - Payments made via WeChat Pay\n* `ideal` - Payments made via iDEAL.\n* `google_pay` - Payments made via Google Pay.\n* `sofort` - Payments made via Sofort.\n* `bancontact` - Payments made via Bancontact Card.\n* `giropay` - Payments made via giropay.\n* `dotpay` - Payments made via Dotpay.\n* `upi` - UPI Payments.\n* `netbanking_emandates` - Netbanking (eMandates) Payments.\n* `venmo` - Payments made via Venmo\n* `pay_to` - Payments made via PayTo\n* `faster_payments` - Payments made via Faster Payments\n* `sepa_instant_transfer` - Payments made via Sepa Instant Transfer\n* `automated_bank_transfer` - Represents virtual bank account using which the payment will be done.\n* `klarna_pay_now` - Payments made via Klarna Pay Now\n* `online_banking_poland` - Payments made via Online Banking Poland\n* `payconiq_by_bancontact` - Payments made via Payconiq by Bancontact\n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Payments made via Stablecoin\n* `kakao_pay` - Payments made via Kakao Pay\n* `naver_pay` - Payments made via Naver Pay\n* `revolut_pay` - Payments made via Revolut Pay\n* `cash_app_pay` - Payments made via Cash App Pay\n* `twint` - Payments made via Twint\n* `go_pay` - Payments made via Go Pay\n* `grab_pay` - Payments made via Grab Pay\n* `pay_co` - Payments made via Pay Co\n* `after_pay` - Payments made via After pay\n* `swish` - Payments made via Swish\n* `payme` - Payments made via PayMe\n* `pix` - Payments made via Pix\n* `klarna` - Payments made via Klarna\n* `alipay_hk` - Payments made via Alipay HK\n* `paypay` - Payments made via PayPay\n* `gcash` - Payments made via GCash\n* `south_korean_cards` - Payments made via South Korean Cards\n* `paynow` - Payments made via PayNow\n* `bizum` - Payments made via Bizum\n* `promptpay` - Payments made via PromptPay\n* `dana` - Payments made via Dana\n* `touch_n_go` - Payments made via Touch 'n Go\n* `tamara` - Payments made via Tamara\n* `qpay` - Payments made via Qpay\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "in" : { "type" : "string", "description" : "* `card` - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* `paypal_express_checkout` - Payments made via PayPal Express Checkout.\n* `amazon_payments` - Payments made via Amazon Payments.\n* `direct_debit` - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* `generic` - Payments made via Generic Payment Method.\n* `alipay` - Payments made via Alipay\n* `unionpay` - Payments made via UnionPay.\n* `apple_pay` - Payments made via Apple Pay.\n* `wechat_pay` - Payments made via WeChat Pay\n* `ideal` - Payments made via iDEAL.\n* `google_pay` - Payments made via Google Pay.\n* `sofort` - Payments made via Sofort.\n* `bancontact` - Payments made via Bancontact Card.\n* `giropay` - Payments made via giropay.\n* `dotpay` - Payments made via Dotpay.\n* `upi` - UPI Payments.\n* `netbanking_emandates` - Netbanking (eMandates) Payments.\n* `venmo` - Payments made via Venmo\n* `pay_to` - Payments made via PayTo\n* `faster_payments` - Payments made via Faster Payments\n* `sepa_instant_transfer` - Payments made via Sepa Instant Transfer\n* `automated_bank_transfer` - Represents virtual bank account using which the payment will be done.\n* `klarna_pay_now` - Payments made via Klarna Pay Now\n* `online_banking_poland` - Payments made via Online Banking Poland\n* `payconiq_by_bancontact` - Payments made via Payconiq by Bancontact\n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Payments made via Stablecoin\n* `kakao_pay` - Payments made via Kakao Pay\n* `naver_pay` - Payments made via Naver Pay\n* `revolut_pay` - Payments made via Revolut Pay\n* `cash_app_pay` - Payments made via Cash App Pay\n* `twint` - Payments made via Twint\n* `go_pay` - Payments made via Go Pay\n* `grab_pay` - Payments made via Grab Pay\n* `pay_co` - Payments made via Pay Co\n* `after_pay` - Payments made via After pay\n* `swish` - Payments made via Swish\n* `payme` - Payments made via PayMe\n* `pix` - Payments made via Pix\n* `klarna` - Payments made via Klarna\n* `alipay_hk` - Payments made via Alipay HK\n* `paypay` - Payments made via PayPay\n* `gcash` - Payments made via GCash\n* `south_korean_cards` - Payments made via South Korean Cards\n* `paynow` - Payments made via PayNow\n* `bizum` - Payments made via Bizum\n* `promptpay` - Payments made via PromptPay\n* `dana` - Payments made via Dana\n* `touch_n_go` - Payments made via Touch 'n Go\n* `tamara` - Payments made via Tamara\n* `qpay` - Payments made via Qpay\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "pattern" : "^\\[(card|paypal_express_checkout|amazon_payments|direct_debit|generic|alipay|unionpay|apple_pay|wechat_pay|ideal|google_pay|sofort|bancontact|giropay|dotpay|upi|netbanking_emandates|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|pix|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(card|paypal_express_checkout|amazon_payments|direct_debit|generic|alipay|unionpay|apple_pay|wechat_pay|ideal|google_pay|sofort|bancontact|giropay|dotpay|upi|netbanking_emandates|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|pix|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `card` - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* `paypal_express_checkout` - Payments made via PayPal Express Checkout.\n* `amazon_payments` - Payments made via Amazon Payments.\n* `direct_debit` - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* `generic` - Payments made via Generic Payment Method.\n* `alipay` - Payments made via Alipay\n* `unionpay` - Payments made via UnionPay.\n* `apple_pay` - Payments made via Apple Pay.\n* `wechat_pay` - Payments made via WeChat Pay\n* `ideal` - Payments made via iDEAL.\n* `google_pay` - Payments made via Google Pay.\n* `sofort` - Payments made via Sofort.\n* `bancontact` - Payments made via Bancontact Card.\n* `giropay` - Payments made via giropay.\n* `dotpay` - Payments made via Dotpay.\n* `upi` - UPI Payments.\n* `netbanking_emandates` - Netbanking (eMandates) Payments.\n* `venmo` - Payments made via Venmo\n* `pay_to` - Payments made via PayTo\n* `faster_payments` - Payments made via Faster Payments\n* `sepa_instant_transfer` - Payments made via Sepa Instant Transfer\n* `automated_bank_transfer` - Represents virtual bank account using which the payment will be done.\n* `klarna_pay_now` - Payments made via Klarna Pay Now\n* `online_banking_poland` - Payments made via Online Banking Poland\n* `payconiq_by_bancontact` - Payments made via Payconiq by Bancontact\n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Payments made via Stablecoin\n* `kakao_pay` - Payments made via Kakao Pay\n* `naver_pay` - Payments made via Naver Pay\n* `revolut_pay` - Payments made via Revolut Pay\n* `cash_app_pay` - Payments made via Cash App Pay\n* `twint` - Payments made via Twint\n* `go_pay` - Payments made via Go Pay\n* `grab_pay` - Payments made via Grab Pay\n* `pay_co` - Payments made via Pay Co\n* `after_pay` - Payments made via After pay\n* `swish` - Payments made via Swish\n* `payme` - Payments made via PayMe\n* `pix` - Payments made via Pix\n* `klarna` - Payments made via Klarna\n* `alipay_hk` - Payments made via Alipay HK\n* `paypay` - Payments made via PayPay\n* `gcash` - Payments made via GCash\n* `south_korean_cards` - Payments made via South Korean Cards\n* `paynow` - Payments made via PayNow\n* `bizum` - Payments made via Bizum\n* `promptpay` - Payments made via PromptPay\n* `dana` - Payments made via Dana\n* `touch_n_go` - Payments made via Touch 'n Go\n* `tamara` - Payments made via Tamara\n* `qpay` - Payments made via Qpay\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "pattern" : "^\\[(card|paypal_express_checkout|amazon_payments|direct_debit|generic|alipay|unionpay|apple_pay|wechat_pay|ideal|google_pay|sofort|bancontact|giropay|dotpay|upi|netbanking_emandates|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|pix|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(card|paypal_express_checkout|amazon_payments|direct_debit|generic|alipay|unionpay|apple_pay|wechat_pay|ideal|google_pay|sofort|bancontact|giropay|dotpay|upi|netbanking_emandates|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|pix|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent status of the payment source. Possible values are : valid, expiring, expired, invalid, pending_verification.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"valid\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "valid", "properties" : { "is" : { "type" : "string", "description" : "* `valid` - A payment source that is valid and active.\n* `expiring` - A payment source that is expiring (like card's status based on its expiry date).\n* `expired` - A payment source that has expired\n* `invalid` - The billing agreement cannot be used. It might become valid again either automatically or due to customer action.\n* `pending_verification` - The payment source needs to be verified", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `valid` - A payment source that is valid and active.\n* `expiring` - A payment source that is expiring (like card's status based on its expiry date).\n* `expired` - A payment source that has expired\n* `invalid` - The billing agreement cannot be used. It might become valid again either automatically or due to customer action.\n* `pending_verification` - The payment source needs to be verified", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "example" : null }, "in" : { "type" : "string", "description" : "* `valid` - A payment source that is valid and active.\n* `expiring` - A payment source that is expiring (like card's status based on its expiry date).\n* `expired` - A payment source that has expired\n* `invalid` - The billing agreement cannot be used. It might become valid again either automatically or due to customer action.\n* `pending_verification` - The payment source needs to be verified", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "pattern" : "^\\[(valid|expiring|expired|invalid|pending_verification)(,(valid|expiring|expired|invalid|pending_verification))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `valid` - A payment source that is valid and active.\n* `expiring` - A payment source that is expiring (like card's status based on its expiry date).\n* `expired` - A payment source that has expired\n* `invalid` - The billing agreement cannot be used. It might become valid again either automatically or due to customer action.\n* `pending_verification` - The payment source needs to be verified", "enum" : [ "valid", "expiring", "expired", "invalid", "pending_verification" ], "pattern" : "^\\[(valid|expiring|expired|invalid|pending_verification)(,(valid|expiring|expired|invalid|pending_verification))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this payment source resource was last updated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this payment source resource is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source" } }, "required" : [ "payment_source" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing third_party_payment_method
" } }, "required" : [ "third_party_payment_method" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/create_using_payment_intent" : { "post" : { "summary" : "Create using payment intent", "description" : "Used to attach the card to the customer after 3DS completion. [Learn more](/docs/api/3ds_card_payments)\non the 3DS implementation via Chargebee APIs.\n", "operationId" : "create_using_payment_intent", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "description" : "Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay.\n\n* alipay_hk - Payments made via Alipay HK.\n* card - card\n* twint - Payments made via Twint\n* swish - Payments made via Swish\n* after_pay - Payments made via Afterpay\n* netbanking_emandates - netbanking_emandates\n* grab_pay - Payments made via GrabPay\n* paypay - PayPay\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* dotpay - dotpay\n* faster_payments - Faster Payments\n* upi - upi\n* kbc_payment_button - KBC Payment Button\n* electronic_payment_standard - Electronic Payment Standard\n* klarna - Payments made via Klarna.\n* payme - Payments made via PayMe\n* direct_debit - direct_debit\n* sepa_instant_transfer - Sepa Instant Transfer\n* bancontact - bancontact\n* go_pay - Payments made via GoPay\n* pay_by_bank - Pay By Bank\n* touch_n_go - Payments made via Touch 'n Go.\n* google_pay - google_pay\n* apple_pay - apple_pay\n* qpay - Payments made via Qpay.\n* online_banking_poland - Online Banking Poland\n* trustly - Trustly\n* gcash - Payments made via GCash.\n* naver_pay - Payments made via Naver Pay.\n* stablecoin - Payments made via Stablecoin.\n* giropay - giropay\n* paypal_express_checkout - paypal_express_checkout\n* pix - Pix\n* venmo - Venmo\n* klarna_pay_now - Klarna Pay Now\n* alipay - Payments made via Alipay.\n* sofort - sofort\n* amazon_payments - Amazon Payments\n* tamara - Payments made via Tamara.\n* ideal - ideal\n* kakao_pay - Payments made via Kakao Pay.\n* pay_to - PayTo\n* dana - Payments made via Dana.\n* south_korean_cards - Payments made via South Korean Cards\n* boleto - boleto\n* pay_co - Payments made via PayCo\n* revolut_pay - Payments made via Revolut Pay.\n* wechat_pay - Payments made via WeChat Pay.\n* cash_app_pay - Payments made via Cash App Pay.\n", "enum" : [ "card", "ideal", "sofort", "bancontact", "google_pay", "dotpay", "giropay", "apple_pay", "upi", "netbanking_emandates", "paypal_express_checkout", "direct_debit", "boleto", "venmo", "amazon_payments", "pay_to", "faster_payments", "sepa_instant_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_info" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Applicable only for Braintree gateway. Can be used only for Braintree's [Premium Fraud Management Tools](https://developer.paypal.com/braintree/articles/guides/fraud-tools/premium/overview).\nPass a stringified JSON containing the `device_session_id`\nand `fraud_merchant_id`\nas an input to `fingerprint`.\nHere's a [sample](/docs/api/payment_parameters)\nto it.\n", "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "payment_intent" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/{cust-payment-source-id}" : { "get" : { "summary" : "Retrieve a payment source", "description" : "Retrieves the payment source identified by the unique identifier.\n", "operationId" : "retrieve_a_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/create_voucher_payment_source" : { "post" : { "summary" : "Create a voucher payment method", "description" : "Create a voucher payment method for the payment source.\n", "operationId" : "create_a_voucher_payment_method", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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[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9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "voucher_payment_source" : { "type" : "object", "deprecated" : false, "description" : "Parameters for voucher_payment_source\n", "properties" : { "voucher_type" : { "type" : "string", "deprecated" : false, "description" : "Voucher based payment methods\n\n* boleto - Boleto\n", "enum" : [ "boleto" ], "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which the payment method is associated.\n", "maxLength" : 50, "example" : null }, "tax_id" : { "type" : "string", "deprecated" : false, "description" : "Customer Tax id\n", "maxLength" : 20, "example" : null }, "billing_address" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "The billing address of the customer. The value is a JSON object with the following keys and their values:- `first_name`:(string, max chars=150) The first name of the contact.\n\n* `last_name`:(string, max chars=150) The last name of the contact.\n* `line1`:(string, max chars=180) The first line of the address.\n* `line2`:(string, max chars=180) The second line of the address.\n* `country_code`:(string, max chars=50) The two-letter, [ISO 3166 alpha-2](https://www.iso.org/iso-3166-country-codes.html) country code for the address.\n* `state_code`:(string, max chars=50) The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code/) without the country prefix.For instance, for Arizona (USA), set state_code as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC)`.\n* `city`:(string, max chars=50) The city name for the address.\n* `postal_code`:(string, max chars=20) The postal or ZIP code for the address.\n* `phone`:(string, max chars=50) The contact phone number for the address.\n* `email`:(string, max chars=70) The contact email address for the address.\n", "example" : null } }, "required" : [ "voucher_type" ], "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "voucher_payment_source" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/create_using_temp_token" : { "post" : { "summary" : "Create using gateway temporary token", "description" : "This API offers an alternative way to create a payment source using a single-use gateway temporary token, which is generally provided by your payment gateway. In the case of Stripe, this temporary token is generated according to the instruction detailed in [Stripe documentation](https://stripe.com/docs/api/tokens/create_card). \nStoring card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources/create-using-payment-intent)\nunder Payment source to store the card after successful 3DS flow completion.\n", "operationId" : "create_using_gateway_temporary_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account to which the payment source is associated.\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "Type of payment source.\n\n* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created.\n* touch_n_go - Payments made via Touch 'n Go.\n* unionpay - Payments made via UnionPay.\n* after_pay - Payments made via Afterpay\n* faster_payments - Payments made via Faster Payments\n* google_pay - Payments made via Google Pay.\n* alipay_hk - Payments made via Alipay HK.\n* sepa_instant_transfer - Payments made via Sepa Instant Transfer\n* dotpay - Payments made via Dotpay.\n* pay_to - Payments made via PayTo\n* klarna - Payments made via Klarna.\n* revolut_pay - Payments made via Revolut Pay.\n* naver_pay - Payments made via Naver Pay.\n* paypay - Payments made via PayPay\n* generic - Payments made via Generic Payment Method.\n* payme - Payments made via PayMe\n* giropay - Payments made via giropay.\n* tamara - Payments made via Tamara.\n* klarna_pay_now - Payments made via Klarna Pay Now\n* grab_pay - Payments made via GrabPay\n* twint - Payments made via Twint\n* swish - Payments made via Swish\n* automated_bank_transfer - Represents virtual bank account using which the payment will be done.\n* stablecoin - Payments made via Stablecoin.\n* paypal_express_checkout - Payments made via PayPal Express Checkout.\n* alipay -\n Payments made via Alipay. \n This payment source is deprecated.\n* venmo - Payments made via Venmo\n* kakao_pay - Payments made via Kakao Pay.\n* sofort - Payments made via Sofort.\n* gcash - Payments made via GCash.\n* dana - Payments made via Dana.\n* pix - Payments made via Pix\n* pay_co - Payments made via PayCo\n* wechat_pay -\n Payments made via WeChat Pay. \n This payment source is deprecated.\n* ideal - Payments made via iDEAL.\n* trustly - Trustly\n* netbanking_emandates - Netbanking (eMandates) Payments.\n* upi - UPI Payments.\n* bancontact - Payments made via Bancontact Card.\n* go_pay - Payments made via GoPay\n* kbc_payment_button - KBC Payment Button\n* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.\n* cash_app_pay - Payments made via Cash App Pay.\n* payconiq_by_bancontact - Payments made via Payconiq using Bancontact.\n* amazon_payments - Payments made via Amazon Payments.\n* south_korean_cards - Payments made via South Korean Cards\n* pay_by_bank - Pay By Bank\n* online_banking_poland - Payments made via Online Banking Poland\n* qpay - Payments made via Qpay.\n* apple_pay - Payments made via Apple Pay.\n* electronic_payment_standard - Electronic Payment Standard\n", "enum" : [ "card", "paypal_express_checkout", "amazon_payments", "direct_debit", "generic", "alipay", "unionpay", "apple_pay", "wechat_pay", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "upi", "netbanking_emandates", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "description" : "Single-use token created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details.\n", "maxLength" : 65000, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://docs.checkout.com/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device .\n", "example" : null } }, "required" : [ "customer_id", "tmp_token", "type" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/{cust-payment-source-id}/update_card" : { "post" : { "summary" : "Update a card payment source", "description" : "Merchants look to update card details when:\n\n* The billing address of a customer has changed. In such a case, modify the billing address in the Chargebee and the payment gateway.\n* The expiration date of the card has been extended by the bank. (This usually happens when the date of card expiry is in near future).\n\nMultiple parameters such as address, expiry date, month, and so on, can be updated through this API.\n\nMeta data can also be added additionally(supported in Stripe only). Metadata is a JSON object. It is used to store additional information about customers.\n\nIn **Stripe** and **Braintree** payment gateways, changes in card details are auto-updated. This feature can also be used for other payment gateways in which auto-update is not enabled or is not supported by Chargebee. \n**Note**\n: This endpoint supports Chargebee Test Gateway, [Stripe](https://www.chargebee.com/docs/1.0/stripe.html)\n, [Braintree](https://www.chargebee.com/docs/1.0/braintree.html)\n, [Authorize.net](https://www.chargebee.com/docs/1.0/authorize-index.html)\n, [Worldpay US eCom](https://www.chargebee.com/docs/1.0/vantiv_worldpay.html)\n, and [WorldPay Direct Integration](https://www.chargebee.com/docs/1.0/worldpay-direct.html)\n. For all other gateways, your customers must re-enter the full [card details](/docs/api/payment_sources/update-a-card-payment-source#card_first_name)\nto update existing card details. For example, consider a customer not using the gateways mentioned above and wants to update the [card\\[billing_addr1\\]](/docs/api/payment_sources/update-a-card-payment-source#card_billing_addr1)\nparameter. In such a case, the customer must re-enter the value of all the parameters present in the [card](/docs/api/payment_sources/update-a-card-payment-source#card_first_name)\nobject.\n", "operationId" : "update_a_card_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])$|^(?:(?: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:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Additional data about this resource can be passed to **Stripe**\ngateway here in the JSON Format. This will be stored along with payment source at the gateway account.\n", "example" : null }, "reference_transaction" : { "type" : "string", "deprecated" : false, "description" : "Reference transaction is used for future purchases. This is only applicable for Vantiv.\n", "maxLength" : 50, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name\n", "maxLength" : 50, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `billing_state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name.\n", "maxLength" : 50, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/{cust-payment-source-id}/switch_gateway_account" : { "post" : { "summary" : "Switch gateway account", "description" : "Switches the gateway in which this payment source information is stored.\n\nThis is applicable only if the payment source is present in Spreedly vault. \nThis operation does not support switching between Braintree and Stripe. If you need help using this API, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "operationId" : "switch_gateway_account", "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-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?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account you want to switch to.\n", "maxLength" : 50, "example" : null } }, "required" : [ "gateway_account_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/create_using_token" : { "post" : { "summary" : "Create using Chargebee token", "description" : "Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources/create-using-payment-intent)\nunder Payment source to store the card after successful 3DS flow completion.\n", "operationId" : "create_using_chargebee_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})):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{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "token_id" : { "type" : "string", "deprecated" : false, "description" : "Token generated by Chargebee JS representing payment method details.\n", "maxLength" : 40, "example" : null } }, "required" : [ "customer_id", "token_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/{cust-payment-source-id}/delete_local" : { "post" : { "summary" : "Local delete a payment source", "description" : "Deletes a payment method from Chargebee. Payment method in the payment gateway will not be affected.\n", "operationId" : "local_delete_a_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])$|^(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(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/create_bank_account" : { "post" : { "summary" : "Create a bank account payment source", "description" : "This API adds a Direct Debit payment source for a customer. The bank account details collected from your customer are passed as input to this API.\n\n#### [Automated Clearing House (ACH) Network](https://www.chargebee.com/docs/direct-debit-payments.html#direct-debit-payments-in-the-united-states)\n\nACH is an electronic network for passing financial transactions in the US. Chargebee currently supports ACH via [Stripe](https://www.chargebee.com/docs/ach-payments-stripe.html) , [Authorize.Net](https://www.chargebee.com/docs/ach-payments-authorize_net.html), and [GoCardless](https://www.chargebee.com/docs/2.0/gocardless.html). \n**Note:**\n\n* For ACH via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features) such as IP address(`chargebee-request-origin-ip`) and the device information(`chargebee-request-origin-device`).\n\n##### Bank account verification\n\nOnce the bank account has been added, it needs to be verified.\n\n* For Stripe, perform this verification using the [Verify bank account payment source API](/docs/api/payment_sources/verify-bank-account-payment-source).\n* For [Authorize.net](https://www.authorize.net/), the verification is done by them in 2-3 days after the account is added. No intervention is needed from your side or your customer.\n\n#### Single Euro Payment Area (SEPA)\n\nSEPA is an initiative that integrates bank transfer payments denominated in euro. It is supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html), [Stripe](https://www.chargebee.com/docs/sepa-stripe.html) and [Adyen](https://www.chargebee.com/docs/adyen-sepa.html). \n**Note:**\n\n* For SEPA via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features) such as IP address and device information.\n* For GoCardless, [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) can be passed instead of IBAN.\n\n#### Bacs Payment Schemes Limited (BACS) and Bg Autogiro\n\nBacs is an organization that manages the Direct Debit and Direct Credit payment methods in the UK. Bg Autogiro is a Direct Debit scheme for krona denominated payments in Sweden. Both Bacs and Bg Autogiro are supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html). \n**Note:**\n\n* For BACS via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features) such as IP address(`chargebee-request-origin-ip`) and the device information(`chargebee-request-origin-device`).\n\n#### Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)\n\nBECS is an automated payment method for Direct Debit in Australia and New Zealand while PAD does the same for Canada. [GoCardless](https://www.chargebee.com/docs/gocardless.html) supports both.\n\nFor Direct Debit, the customer needs to accept a mandate that allows the merchant to debit their bank account. This agreement PDF can be obtained using the [Retrieve direct debit agreement PDF API](/docs/api/hosted_pages/retrieve-direct-debit-agreement-pdf).\n\nIf the customer has already reached the payment source limit allowed for the site, pass `replace_primary_payment_source` as `true`. Alternatively, [delete](/docs/api/payment_sources/delete-a-payment-source) one of the payment sources first and then add the bank account payment source for the customer. \n**Note:**\n\n* For BECS via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features) such as IP address(`chargebee-request-origin-ip`) and the device information(`chargebee-request-origin-device`).\n", "operationId" : "create_a_bank_account_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})(?: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]{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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer with whom this payment source is associated.\n", "maxLength" : 50, "example" : null }, "issuing_country" : { "type" : "string", "deprecated" : false, "description" : "2-letter(alpha2) ISO country code. Required when local bank details are provided, and not IBAN.\n", "maxLength" : 50, "example" : null }, "replace_primary_payment_source" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether the primary payment source should be replaced with this payment source.\nIn case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.\n", "example" : null }, "bank_account" : { "type" : "object", "deprecated" : false, "description" : "Parameters for bank_account\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "iban" : { "type" : "string", "deprecated" : false, "description" : "Account holder's International Bank Account Number. For the [GoCardless](https://www.chargebee.com/docs/gocardless.html)\nplatform, this can be the [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details)\n", "maxLength" : 50, "minLength" : 10, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's first name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's last name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 150, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Account holder's company name as per bank account. If not passed, details from customer details will be considered.\n", "maxLength" : 250, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Account holder's email address. If not passed, details from customer details will be considered. All Direct Debit compliant emails will be sent to this email address.\n", "maxLength" : 70, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the account holder that is linked to the bank account.\n", "maxLength" : 50, "example" : null }, "bank_name" : { "type" : "string", "deprecated" : false, "description" : "Name of account holder's bank.\n", "maxLength" : 100, "example" : null }, "account_number" : { "type" : "string", "deprecated" : false, "description" : "Account holder's bank account number.\n", "maxLength" : 17, "minLength" : 4, "example" : null }, "routing_number" : { "type" : "string", "deprecated" : false, "description" : "Bank account routing number.\n", "maxLength" : 9, "minLength" : 3, "example" : null }, "bank_code" : { "type" : "string", "deprecated" : false, "description" : "Indicates the bank code.\n", "maxLength" : 20, "example" : null }, "account_type" : { "type" : "string", "deprecated" : false, "description" : "Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/)\nACH and Razorpay NetBanking users only. If not passed, account type is taken as null.\n\n* current - Current Account\n* savings - Savings Account\n* checking - Checking Account\n* business_checking - Business Checking Account\n", "enum" : [ "checking", "savings", "business_checking", "current" ], "example" : null }, "account_holder_type" : { "type" : "string", "deprecated" : false, "description" : "For Stripe ACH users only. Indicates the account holder type.\n\n* company - Company Account.\n* individual - Individual Account.\n", "enum" : [ "individual", "company" ], "example" : null }, "echeck_type" : { "type" : "string", "deprecated" : false, "description" : "For Authorize.net ACH users only. Indicates the type of eCheck.\n\n* ppd - Payment Authorization is prearranged between the customer and the merchant.\n* web - Payment Authorization obtained from the customer via the internet.\n* ccd - Payment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type.\n", "enum" : [ "web", "ppd", "ccd" ], "example" : null }, "swedish_identity_number" : { "type" : "string", "deprecated" : false, "description" : "For GoCardless Autogiro users only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.\n", "maxLength" : 12, "minLength" : 10, "example" : null }, "billing_address" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "The billing address associated with the bank account. The value is a JSON object with the following keys and their values:- `first_name`:(string, max chars=150) The first name of the contact.\n\n* `last_name`:(string, max chars=150) The last name of the contact.\n* `company_name`:(string, max chars=250) The company name for the address.\n* `line1`:(string, max chars=180) The first line of the address.\n* `line2`:(string, max chars=180) The second line of the address.\n* `country`:(string) The name of the country for the address.\n* `country_code`:(string, max chars=50) The two-letter, [ISO 3166 alpha-2](https://www.iso.org/iso-3166-country-codes.html) country code for the address.\n* `state`:(string, max chars=50) The name of the state or province for the address. When not provided, this is set automatically for US, Canada, India, and UAE.\n* `state_code`:(string, max chars=50) The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code/) without the country prefix. This is supported for USA, Canada, India, and UAE. For instance, for Arizona (USA), set state_code as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). For Dubai (UAE), set as `DU` (not `AE-DU`).\n* `city`:(string, max chars=50) The city name for the address.\n* `postal_code`:(string, max chars=20) The postal or ZIP code for the address.\n* `phone`:(string, max chars=50) The contact phone number for the address.\n* `email`:(string, max chars=70) The contact email address for the address.\n", "example" : null } }, "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "bank_account" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/payment_sources/{cust-payment-source-id}/update_bank_account" : { "post" : { "summary" : "Update a bank account payment source", "description" : "This API is used to update the payment source details of a customer. Information related to bank account payment source such as email, first name, and last name can be updated.\n\n* For GoCardless, Chargebee supports (ACH,BACS,SEPA,AUTOGIRO,BECS,BECS_NZ,PAD).\n* For Stripe, Chargebee only supports SEPA.\n\nThe API is only supported for the `payment_method` of type `direct_debit`.\n", "operationId" : "update_a_bank_account_payment_source", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|(?: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a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "cust-payment-source-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/cust-payment-source-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "bank_account" : { "type" : "object", "deprecated" : false, "description" : "Parameters for bank_account\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's first name as per bank account.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Account holder's last name as per bank account.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Account holder's email address. All Direct Debit compliant emails will be sent to this email address.\n", "maxLength" : 70, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "bank_account" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "payment_source" : { "$ref" : "#/components/schemas/PaymentSource", "description" : "Resource object representing payment_source
" } }, "required" : [ "customer", "payment_source" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/vaulted_payment_methods/{vaulted-payment-method-id}" : { "get" : { "summary" : "Retrieve vaulted payment method", "operationId" : "retrieve_vaulted_payment_method", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "vaulted-payment-method-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/vaulted-payment-method-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "vaulted_payment_method" : { "$ref" : "#/components/schemas/VaultedPaymentMethod", "description" : "Resource object representing vaulted_payment_method" } }, "required" : [ "vaulted_payment_method" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/virtual_bank_accounts/{virtual-bank-account-id}/delete_local" : { "post" : { "summary" : "Local delete a virtual bank account", "description" : "Deletes virtual bank accounts from Chargebee. Payment method in the payment gateway, and Auto Collection settings in Chargebee are not affected.\n", "operationId" : "local_delete_a_virtual_bank_account", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|(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-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "virtual-bank-account-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/virtual-bank-account-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "Resource object representing virtual_bank_account
" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/virtual_bank_accounts/{virtual-bank-account-id}/delete" : { "post" : { "summary" : "Delete a virtual bank account", "description" : "Deletes a virtual bank account. If there is no virtual bank account present in the gateway for the customer, this API will return successfully without throwing an error.\n", "operationId" : "delete_a_virtual_bank_account", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]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-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "virtual-bank-account-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/virtual-bank-account-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "Resource object representing virtual_bank_account
" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/virtual_bank_accounts" : { "get" : { "summary" : "List virtual bank accounts", "description" : "Lists all the virtual bank accounts.\n", "operationId" : "list_virtual_bank_accounts", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|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fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"3bdjnDnsdQn\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this virtual bank account resource was last updated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this virtual bank account resource is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "Resource object representing virtual_bank_account" } }, "required" : [ "virtual_bank_account" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing virtual_bank_account
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/virtual_bank_accounts/{virtual-bank-account-id}" : { "get" : { "summary" : "Retrieve a virtual bank account", "description" : "Retrieves the virtual bank account identified by the unique identifier.\n", "operationId" : "retrieve_a_virtual_bank_account", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|(?:(?:(?:(?:(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)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "virtual-bank-account-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/virtual-bank-account-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "Resource object representing virtual_bank_account
" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/virtual_bank_accounts/create_using_permanent_token" : { "post" : { "summary" : "Create a virtual bank account using permanent token", "description" : "Creates a virtual bank account using the identifier provided by the gateway. \nCustomer's email and virtual bank accounts will always be in sync. Email ID specified for virtual bank account creation will be considered over customers' email ID.\n", "operationId" : "create_a_virtual_bank_account_using_permanent_token", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "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\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier provided by the gateway for the virtual bank account source. In case of Stripe, the reference_id consists of a combination of Stripe Customer ID and Stripe Source ID separated by a forward slash (e.g. cus_63MnDn0t6kfDW7/src_6WjCF20vT9WN1G).\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the gateway account to use when creating the virtual bank account. \n**Default behavior**\nWhen not provided, Chargebee selects an applicable gateway account for the chosen `scheme`. Selection follows your site's [Smart Routing](https://www.chargebee.com/docs/payments/1.0/payment-gateways-and-configuration/gateway_settings#smart-routing) rules.\n", "maxLength" : 50, "example" : null }, "scheme" : { "type" : "string", "default" : "ach_credit", "deprecated" : false, "description" : "Type of the credit transfer.\n\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* sepa_credit -\n SEPA Credit Transfer \n This scheme is deprecated. Instead of `sepa_credit`\n use `eu_automated_bank_transfer`\n .\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* ach_credit -\n ACH Credit Transfer \n This scheme is deprecated. Instead of `ach_credit`\n use `us_automated_bank_transfer`\n .\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* gb_automated_bank_transfer - UK Automated Bank Transfer\n", "enum" : [ "ach_credit", "sepa_credit", "us_automated_bank_transfer", "gb_automated_bank_transfer", "eu_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer" ], "example" : null } }, "required" : [ "customer_id", "reference_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "virtual_bank_account" : { "$ref" : "#/components/schemas/VirtualBankAccount", "description" : "Resource object representing virtual_bank_account
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" } }, "required" : [ "virtual_bank_account" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/copy_card" : { "post" : { "summary" : "Copy card", "description" : "#### deprecated\n\nThe [Payment Sources API](/docs/api/payment_sources)\n, with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Export payment source API](/docs/api/payment_sources/export-payment-source)\n.\n\nCopies the customer's card information to another payment gateway. This is useful if you want to port your customer's card details to another gateway. \n**Limitation**\n\nThis request does not support copying of cards between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\nto perform those actions.\n", "operationId" : "copy_card", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account you want to copy the card.\n", "maxLength" : 50, "example" : null } }, "required" : [ "gateway_account_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "third_party_payment_method" : { "$ref" : "#/components/schemas/ThirdPartyPaymentMethod", "description" : "Resource object representing third_party_payment_method
" } }, "required" : [ "third_party_payment_method" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/cards/{customer-id}" : { "get" : { "summary" : "Retrieve card for a customer", "description" : "#### Deprecated\n\nThis operation is obsoleted by the [Retrieve a payment source API](/docs/api/payment_sources/retrieve-a-payment-source)\n.\n\nRetrieves the credit card for the customer id.\n", "operationId" : "retrieve_card_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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}(?:(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(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "card" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/switch_gateway" : { "post" : { "summary" : "Switch gateway", "description" : "#### Deprecated\n\nThis request is obsoleted by the [Switch gateway account API](/docs/api/payment_sources/switch-gateway-account)\nfor Payment Sources.\n\nSwitches the gateway in which customer's card information is stored. This is applicable only if the payment method is `card`. \n**Limitation**\n\nThis request does not support switching between Braintree and Stripe payment gateways. Contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\nto perform those actions.\n", "operationId" : "switch_gateway", "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])\\.)*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[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account you want to switch to.\n", "maxLength" : 50, "example" : null } }, "required" : [ "gateway_account_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "card", "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/delete_card" : { "post" : { "summary" : "Delete card for a customer", "description" : "#### deprecated\n\nThe [Payment Sources API](/docs/api/payment_sources)\n, with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Delete a payment source API](/docs/api/payment_sources/delete-a-payment-source)\n.\n\nDeletes the card for a customer. Upon successful deletion the `auto_collection` attribute for the customer is set to `off` and a `card_deleted` event is triggered. If there is no card found at the gateway for the customer, this API returns without errors.\n", "operationId" : "delete_card_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})(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-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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" } }, "required" : [ "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/credit_card" : { "post" : { "summary" : "Update card for a customer", "description" : "#### Deprecated\n\nThe [Payment Sources API](/docs/api/payment_sources)\n, with its additional options and improvements, obsoletes the [Cards APIs](/docs/api/cards)\n. This operation is obsoleted by the following:\n\n* [Create using temporary token](/docs/api/v2/pcv-1/payment_sources/create-using-gateway-temporary-token)\n* [Create using permanent token](/docs/api/payment_sources/create-using-permanent-token)\n* [Create a card payment source](/docs/api/payment_sources/create-a-card-payment-source)\n\nAdds or replaces card details of a customer. Updating card details replaces the present payment method.\n\nPassing credit card details to this API involves PCI liability at your end as sensitive card info passes through your servers. If you wish to avoid that, you can use one of the following integration methodologies if applicable\n\n* If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your card update form.\n* If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your card update form.\n* If you are using Authorize.Net gateway, you use [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html) with your card update form.\n* In case you are using the Adyen gateway, you will have to use the Adyen's [Client Side Encryption](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/cse-integration-ecommerce) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API.\n* You can also use our [Hosted Pages](https://www.chargebee.com/docs/hosted_pages.html) based integration. Use our [Hosted Page - Update Card](/docs/api/hosted_pages) API to generate a 'Update Card' Hosted Page link.\n\n**Legacy behavior:**\n\n* **For [sites](https://www.chargebee.com/docs/sites-intro.html) created before March 1st, 2014:** On making this request, the `billing_address` and `vat_number` of the customer are **deleted** and replaced by the values passed with this request. Ensure that you pass the [billing address parameters](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#card_billing_addr1) and the `vat_number` parameters each time you make this request, to avoid losing the same information at the customer-level.\n* **For [sites](https://www.chargebee.com/docs/sites-intro.html) created on or after March 1st, 2014:** This request does not alter the `billing_address` and `vat_number` of the customer.\n", "operationId" : "update_card_for_a_customer", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]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1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null }, "tmp_token" : { "type" : "string", "deprecated" : false, "description" : "The single-use card token returned by vaults like Stripe/Braintree which act as a substitute for your card details. Before calling this API, you should have submitted your card details to the gateway and gotten this token in return.\n**Note:**\nSupported only for Stripe, Braintree and Authorize.Net. If this value is specified, there is no need to specify other card details (like number, cvv, etc).\n", "maxLength" : 300, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's first name.\n", "maxLength" : 50, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Cardholder's last name.\n", "maxLength" : 50, "example" : null }, "number" : { "type" : "string", "deprecated" : false, "description" : "The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted card number here.\n", "maxLength" : 1500, "example" : null }, "expiry_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry month.\n", "maximum" : 12, "minimum" : 1, "example" : null }, "expiry_year" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Card expiry year.\n", "example" : null }, "cvv" : { "type" : "string", "deprecated" : false, "description" : "The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js)\n, you can specify the Braintree encrypted CVV here.\n", "maxLength" : 520, "example" : null }, "preferred_scheme" : { "type" : "string", "deprecated" : false, "description" : "The customer's preferred card scheme for co-branded cards. \n**Note**:\nCurrently, this parameter is only supported for Stripe.\n\n* mastercard - A MasterCard scheme.\n* cartes_bancaires - A Cartes Bancaires card scheme.\n* visa - A Visa card scheme.\n", "enum" : [ "cartes_bancaires", "mastercard", "visa" ], "example" : null }, "billing_addr1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2, as available in card billing address.\n", "maxLength" : 150, "example" : null }, "billing_city" : { "type" : "string", "deprecated" : false, "description" : "City, as available in card billing address.\n", "maxLength" : 50, "example" : null }, "billing_state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `billing_state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "billing_state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `billing_state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "billing_zip" : { "type" : "string", "deprecated" : false, "description" : "Postal or Zip code, as available in card billing address.\n", "maxLength" : 20, "example" : null }, "billing_country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n\n.\n", "maxLength" : 50, "example" : null } }, "required" : [ "expiry_month", "expiry_year", "number" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "card" : { "$ref" : "#/components/schemas/Card", "description" : "Resource object representing card
" } }, "required" : [ "card", "customer" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/promotional_credits/{account-credit-id}" : { "get" : { "summary" : "Retrieve a promotional credit", "description" : "This endpoint retrieves the promotional credit based on the promotional credit id\n", "operationId" : "retrieve_a_promotional_credit", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})(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))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "account-credit-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/account-credit-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "Resource object representing promotional_credit
" } }, "required" : [ "promotional_credit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/promotional_credits" : { "get" : { "summary" : "List promotional credits", "description" : "This endpoint lists the promotional credits set for a customer\n", "operationId" : "list_promotional_credits", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])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[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUnique reference ID provided for promotional credits.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*id\\[is\\] = \"1bkfc8dw2o\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1bkfc8dw2o", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this promotional credit resource is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nType of promotional credits. Possible values are : increment, decrement.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is\\] = \"increment\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "increment", "properties" : { "is" : { "type" : "string", "description" : "* `increment` - Increment\n* `decrement` - Decrement", "enum" : [ "increment", "decrement" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `increment` - Increment\n* `decrement` - Decrement", "enum" : [ "increment", "decrement" ], "example" : null }, "in" : { "type" : "string", "description" : "* `increment` - Increment\n* `decrement` - Decrement", "enum" : [ "increment", "decrement" ], "pattern" : "^\\[(increment|decrement)(,(increment|decrement))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `increment` - Increment\n* `decrement` - Decrement", "enum" : [ "increment", "decrement" ], "pattern" : "^\\[(increment|decrement)(,(increment|decrement))*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*customer_id\\[is\\] = \"4gkYnd21ouvW\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gkYnd21ouvW", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "Resource object representing promotional_credit" } }, "required" : [ "promotional_credit" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing customer
" }, "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "Resource object representing promotional_credit
" } }, "required" : [ "customer", "promotional_credit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/promotional_credits/set" : { "post" : { "summary" : "Set promotional credits", "description" : "This API call can be used to set the promotional credits balance of a customer. [Learn more about Promotional Credits](https://www.chargebee.com/docs/2.0/credit-notes.html#creating-promotional-credits).\n\nFor example,\n\n* If a customer has a credit balance of $10 and if you would like to set the balance to $100, you could pass the **amount** as $100.\n* If a customer has a credit balance of $10 and if you would like to set the balance to $5, you could pass the **amount** as $5.\n* If a customer has a credit balance of $10 and if you would like to clear the balance, you could pass the **amount** as $0.\n", "operationId" : "set_promotional_credits", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Promotional credits amount.\n", "minimum" : 0, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "Amount in decimal.\n", "maxLength" : 33, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for promotional credit.\n", "maxLength" : 3, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description of this promotional credits.\n", "maxLength" : 250, "example" : null }, "credit_type" : { "type" : "string", "default" : "general", "deprecated" : false, "description" : "Type of promotional credits provided to customer.\n\n* general - General\n* referral_rewards - Referral\n* loyalty_credits - Loyalty Credits\n", "enum" : [ "loyalty_credits", "referral_rewards", "general" ], "example" : null }, "reference" : { "type" : "string", "deprecated" : false, "description" : "Describes why promotional credits were provided.\n", "maxLength" : 500, "example" : null } }, "required" : [ "customer_id", "description" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "Resource object representing promotional_credit
" } }, "required" : [ "customer", "promotional_credit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/promotional_credits/add" : { "post" : { "summary" : "Add promotional credits", "description" : "This API call can be used to add promotional credits to a customer. [Learn more about Promotional Credits](https://www.chargebee.com/docs/2.0/credit-notes.html#creating-promotional-credits).\n\nFor example, if a customer has credits of $10, if you pass the **amount** as $10, then the customer's credit balance would become $20.\n", "operationId" : "add_promotional_credits", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]))\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|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Promotional credits amount.\n", "minimum" : 0, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "Amount in decimal.\n", "maxLength" : 33, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for promotional credit.\n", "maxLength" : 3, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description of this promotional credits.\n", "maxLength" : 250, "example" : null }, "credit_type" : { "type" : "string", "default" : "general", "deprecated" : false, "description" : "Type of promotional credits provided to customer.\n\n* general - General\n* referral_rewards - Referral\n* loyalty_credits - Loyalty Credits\n", "enum" : [ "loyalty_credits", "referral_rewards", "general" ], "example" : null }, "reference" : { "type" : "string", "deprecated" : false, "description" : "Describes why promotional credits were provided.\n", "maxLength" : 500, "example" : null } }, "required" : [ "customer_id", "description" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "promotional_credit" : { "$ref" : "#/components/schemas/PromotionalCredit", "description" : "Resource object representing promotional_credit
" } }, "required" : [ "customer", "promotional_credit" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/delete_line_items" : { "post" : { "summary" : "Delete line items", "description" : "This endpoint is used to delete line items from \"Pending\" invoice.\n", "operationId" : "delete_line_items", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))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:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "line_items" : { "type" : "object", "deprecated" : false, "description" : "The list of line items which have to be deleted.\n", "properties" : { "id" : { "type" : "array", "description" : "Uniquely identifies a line_item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "line_items" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/charge_addon" : { "post" : { "summary" : "Create invoice for a non-recurring addon", "description" : "Generate invoices for a non-recurring addon using this API.\n", "operationId" : "create_invoice_for_a_non-recurring_addon", "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])\\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(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for which this invoice needs to be created. Should be specified if 'subscription_id' is not specified.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this invoice(not applicable for consolidated invoice) needs to be created. Should be specified if 'customer_id' is not specified.\n", "maxLength" : 50, "example" : null }, "addon_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the non-recurring addon to be charged.\n", "maxLength" : 100, "example" : null }, "addon_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of addon units to be charged. Mandatory for quantity based addons.\n", "minimum" : 1, "example" : null }, "addon_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "addon_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The number of addon units to be charged in decimal.\n", "maxLength" : 33, "example" : null }, "addon_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "Addon Amount in Decimal.\n", "maxLength" : 39, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the addon starts.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the addon ends.\n", "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date.\n`taxes`\nand\n`line_item_taxes`\nare computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n", "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source to be used for this payment.\n", "maxLength" : 40, "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\n* merchant - Pass this value to indicate that the request is initiated by the merchant\n* customer - Pass this value to indicate that the request is initiated by the customer\n", "enum" : [ "customer", "merchant" ], "example" : null } }, "required" : [ "addon_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/remove_credit_note" : { "post" : { "summary" : "Remove credit note from an invoice", "description" : "This API removes a credit note attached to an invoice. When you remove a credit note from an invoice, the invoice status returns to `not_paid`. \n**Note:**\nYou cannot remove a credit note from an invoice if it has already been refunded.\n", "operationId" : "remove_credit_note_from_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Credit-note id.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note", "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/remove_payment" : { "post" : { "summary" : "Remove payment from an invoice", "description" : "This API [removes payments](https://www.chargebee.com/docs/2.0/invoice-operations.html#actions-for-paid-invoices_remove-payment) applied to an invoice. Once the applied payment is removed, the invoice status returns to `not_paid` or `payment_due`. The removed payment is then added to the customer's excess payment balance.\n", "operationId" : "remove_payment_from_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-f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:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the transaction.\n", "maxLength" : 40, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "invoice", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/stop_dunning" : { "post" : { "summary" : "Stop dunning for invoice", "description" : "This API is used to stop dunning for \"Payment Due\" invoices that have been enabled for Auto Collection. When dunning is stopped, the status of the invoice will be changed to \"Not Paid\".\n", "operationId" : "stop_dunning_for_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]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)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/apply_payments" : { "post" : { "summary" : "Apply payments for an invoice", "description" : "The API applies [excess payments](/docs/api/customers/customer-object#excess_payments) to an invoice. Once an excess payment is applied, the [invoice.amount_due](/docs/api/invoices/invoice-object#amount_due) is recalculated. The invoice `status` changes to either `paid` or `payment_due` depending on how much excess payment is applied to the invoice amount.\n\nFor example, if you have an excess payment of $25.00, and the invoice to which you want to apply this excess payment has a balance of $50. Once you apply this excess payment, the invoice status changes to `paid`, and [invoice.amount_due](/docs/api/invoices/invoice-object#amount_due) is adjusted to $25.00.\n", "operationId" : "apply_payments_for_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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.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(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "transactions" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transactions\n", "properties" : { "id" : { "type" : "array", "description" : "Uniquely identifies the transaction. Excess payments available with the customer will be applied against this invoice if this parameter is not passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Specifies the amount from the transaction to apply as a payment towards the invoice. The amount applied is the smallest of the following values: the amount you specify for this parameter, [transactions.unused_amount](/docs/api/invoices/invoice-object#amount_due)\n, or [invoice.amount_due](/docs/api/invoices/invoice-object#amount_due)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "transactions" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/add_addon_charge" : { "post" : { "summary" : "Add non-recurring addon to a pending invoice", "description" : "Add non-recurring addon to a pending invoice.\n", "operationId" : "add_non-recurring_addon_to_a_pending_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "addon_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the non-recurring addon to be charged.\n", "maxLength" : 100, "example" : null }, "addon_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of addon units to be charged. Mandatory for quantity based addons.\n", "minimum" : 1, "example" : null }, "addon_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "addon_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the [non-recurring addon](https://www.chargebee.com/docs/charges.html#non-recurring-addon ).\nProvide the value in major units of the currency. Must be provided when the addon is quantity-based. This parameter can only be passed when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "addon_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the [non-recurring addon](https://www.chargebee.com/docs/charges.html#non-recurring-addon )\ncan be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. This parameter can only be passed when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this addon needs to be created. Applicable for consolidated invoice.\n", "maxLength" : 50, "example" : null }, "line_item" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_item\n", "properties" : { "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the addon starts.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the addon ends.\n", "example" : null } }, "example" : null } }, "required" : [ "addon_id" ], "example" : null }, "encoding" : { "line_item" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/void" : { "post" : { "summary" : "Void an invoice", "description" : "Voids the specified invoice. Any payments must be [removed](/docs/api/invoices/remove-payment-from-an-invoice) from the invoice before voiding it.\n\n* Any [promotional credits](/docs/api/promotional_credits) or [credit notes](/docs/api/credit_notes) applied to the invoice are removed.\n* If an invoice for the current term of a subscription is voided and the subscription is changed later with `proration` enabled, no prorated credits are issued.\n", "operationId" : "void_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])$|^(?:(?:(?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[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "void_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for voiding the invoice. Select from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Invoices \\> Void invoice**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/add_charge" : { "post" : { "summary" : "Add one-time charge to a pending invoice", "description" : "Adds a one-time charge to a [pending](/docs/api/invoices/invoice-object#status) invoice. A one-time charge is a charge that is added ad hoc to the invoice and does not represent a predefined [plan](/docs/api/v2/pcv-1/plans) or [addon](/docs/api/v2/pcv-1/addons). It appears in the invoice as a [line_item](/docs/api/invoices/invoice-object#line_items) of [entity_type](/docs/api/invoices/invoice-object#line_items_entity_type) `adhoc`.\n", "operationId" : "add_one-time_charge_to_a_pending_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})):(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1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 1, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Detailed description about this lineitem.\n", "maxLength" : 250, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* retail - Transaction is a sale to an end user\n* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer\n* vendor_use - Transaction is for an item that is subject to vendor use tax\n* consumed - Transaction is for an item that is consumed directly\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "avalara_tax_code" : { "type" : "string", "deprecated" : false, "description" : "This represents the Avalara tax code to which the one-time charge is mapped. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avatax-for-sales.html)\n.\n", "maxLength" : 50, "example" : null }, "hsn_code" : { "type" : "string", "deprecated" : false, "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the one-time charge is mapped for calculating the customer's tax in India. Applicable when both the conditions are true:\n\n* [**India**](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst) has been enabled as a **Tax Region**. (An error is returned when this condition is not true.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee. .\n", "maxLength" : 50, "example" : null }, "taxjar_product_code" : { "type" : "string", "deprecated" : false, "description" : "This represents the TaxJar product code to which the one-time charge is mapped. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html)\n.\n", "maxLength" : 50, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this charge needs to be created. Applicable for consolidated invoice.\n", "maxLength" : 50, "example" : null }, "line_item" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_item\n", "properties" : { "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge starts.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge ends.\n", "example" : null } }, "example" : null } }, "required" : [ "amount", "description" ], "example" : null }, "encoding" : { "line_item" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/send_einvoice" : { "post" : { "summary" : "Send an einvoice for invoices", "description" : "This endpoint is used to send an e-invoice for invoice.\nTo support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually.\nThis endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches:\n\n* If e-invoicing is not enabled at the site and customer level.\n\n* If there is an e-invoice generated already for the invoice.\n\n* If the **Use automatic e-invoicing** option is selected.\n\n* If there are no generated e-invoices with the `failed` or `skipped` status.\n\n* If the invoice status is `voided` or `pending`.\n\n", "operationId" : "send_an_einvoice_for_invoices", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))?::(?:(?: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1,4})):){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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/write_off" : { "post" : { "summary" : "Write off an invoice", "description" : "This API writes off an Invoice.\n", "operationId" : "write_off_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})(?:(?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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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note", "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/pause_dunning" : { "post" : { "summary" : "Pause dunning for invoice", "description" : "Pause [dunning](https://www.chargebee.com/docs/payments/1.0/dunning-v2.html) for the specified invoice until `expected_payment_date`. Chargebee cancels all configured payment collection [retry attempts](https://www.chargebee.com/docs/payments/1.0/dunning-v2.html) and dunning [email notifications](https://www.chargebee.com/docs/payments/1.0/dunning-v2.html#dunning-email-notifications) for the invoice until `expected_payment_date`.\n\n#### Prerequisites\n\nThis operation is only permitted for an invoice that meets *all* the following conditions:\n\n* The [status](/docs/api/v2/pcv-1/invoices/invoice-object#status) of the invoice is `payment_due`.\n* The invoice belongs to a [subscription](/docs/api/v2/pcv-1/subscriptions) or [customer](/docs/api/v2/pcv-1/customers) with [`auto_collection`](/docs/api/v2/pcv-1/subscriptions/subscription-object#auto_collection) set to `on`.\n* The invoice does not have dunning paused currently.\n\n#### Automatic dunning resumption {#dunning_resume_process}\n\nUnless you [resume dunning](/docs/api/v2/pcv-1/invoices/resume-dunning-for-invoice) for the invoice, Chargebee attempts to collect payment on the `expected_payment_date`. If payment collection fails, the next action is taken as follows:\n\n* If the `expected_payment_date` is within the dunning period for the invoice, Chargebee resumes any dunning retries and email notifications that remain after the pause period, and not attempt the retries or notifications that were canceled during the pause period.\n* If the `expected_payment_date` is after the dunning period for the invoice, the [final action](https://www.chargebee.com/docs/payments/1.0/dunning-v2.html) configured in Billing is initiated for the invoice and, if applicable, for the subscription.\n", "operationId" : "pause_dunning_for_invoice", "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\\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):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "expected_payment_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date and time at which dunning should resume.\n**See also** : [Dunning resumption process](/docs/api/v2/pcv-1/invoices/resume-dunning-for-invoice).\n", "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments) to add to the invoice for this operation. This comment is displayed on the Chargebee Billing UI.\n**Note** : This comment does not appear on any customer-facing [hosted pages](/docs/api/hosted_pages) or documents, such as the [invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf).\n", "maxLength" : 300, "example" : null } }, "required" : [ "expected_payment_date" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices" : { "get" : { "summary" : "List invoices", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nLists all the Invoices.\n", "operationId" : "list_invoices", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "If set to true, includes the deleted resources in the response. For the deleted resources in the response, the '**deleted**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nThe invoice number. Acts as a identifier for invoice and typically generated sequentially.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"INVOICE_654\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "INVOICE_654", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on subscription_id.\nNOTE: Not to be used if *consolidated invoicing*\nis enabled.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is\\] = \"3bdjnDnsdQn\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nThe identifier of the customer this invoice belongs to.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is_not\\] = \"3bdjnDnsdQn\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3bdjnDnsdQn", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "recurring", "in" : "query", "description" : "optional, boolean filter\n\nBoolean indicating whether this invoice belongs to a subscription. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*recurring\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent status of this invoice. Possible values are : paid, posted, payment_due, not_paid, voided, pending.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is_not\\] = \"paid\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "paid", "properties" : { "is" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -\n The [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status) is yet to be closed (sent for payment collection). An invoice is generated with this `status` when it has line items that belong to items that are `metered` or when the `subscription.create_pending_invoices`attribute is set to `true`. \n The [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status) is yet to be closed (sent for payment collection). All invoices are generated with this `status` when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html) is enabled for the site.\n", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -\n The [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status) is yet to be closed (sent for payment collection). An invoice is generated with this `status` when it has line items that belong to items that are `metered` or when the `subscription.create_pending_invoices`attribute is set to `true`. \n The [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status) is yet to be closed (sent for payment collection). All invoices are generated with this `status` when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html) is enabled for the site.\n", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -\n The [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status) is yet to be closed (sent for payment collection). An invoice is generated with this `status` when it has line items that belong to items that are `metered` or when the `subscription.create_pending_invoices`attribute is set to `true`. \n The [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status) is yet to be closed (sent for payment collection). All invoices are generated with this `status` when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html) is enabled for the site.\n", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `paid` - Indicates a paid invoice.\n* `posted` - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* `payment_due` - Indicates the payment is not yet collected and is being retried as per retry settings.\n* `not_paid` - Indicates the payment is not made and all attempts to collect is failed.\n* `voided` - Indicates a voided invoice.\n* `pending` -\n The [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status) is yet to be closed (sent for payment collection). An invoice is generated with this `status` when it has line items that belong to items that are `metered` or when the `subscription.create_pending_invoices`attribute is set to `true`. \n The [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status) is yet to be closed (sent for payment collection). All invoices are generated with this `status` when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html) is enabled for the site.\n", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "pattern" : "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\]$", "example" : null } } } }, { "name" : "price_type", "in" : "query", "description" : "optional, enumerated string filter\n\nThe price type of the invoice. Possible values are : tax_exclusive, tax_inclusive.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*price_type\\[is\\] = \"tax_exclusive\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "tax_exclusive", "properties" : { "is" : { "type" : "string", "description" : "* `tax_exclusive` - All amounts in the document are exclusive of tax.\n* `tax_inclusive` - All amounts in the document are inclusive of tax.", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `tax_exclusive` - All amounts in the document are exclusive of tax.\n* `tax_inclusive` - All amounts in the document are inclusive of tax.", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "in" : { "type" : "string", "description" : "* `tax_exclusive` - All amounts in the document are exclusive of tax.\n* `tax_inclusive` - All amounts in the document are inclusive of tax.", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `tax_exclusive` - All amounts in the document are exclusive of tax.\n* `tax_inclusive` - All amounts in the document are inclusive of tax.", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null } } } }, { "name" : "date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe document date displayed on the invoice PDF.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*date\\[after\\] = \"1394532759\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "paid_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating the date \\& time this invoice got paid.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*paid_at\\[before\\] = \"1394532759\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "total", "in" : "query", "description" : "optional, in cents filter\n\nInvoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*total\\[is\\] = \"1000\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1000", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_paid", "in" : "query", "description" : "optional, in cents filter\n\nPayments collected successfully for the invoice. This is the sum of [linked_payments[]](/docs/api/invoices/invoice-object#linked_payments)`.txn_amount`\nfor all `linked_payments[]`\nthat have `txn_status`\nas `success`.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_paid\\[is\\] = \"800\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "800", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_adjusted", "in" : "query", "description" : "optional, in cents filter\n\nTotal adjustments made against this invoice.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_adjusted\\[is\\] = \"100\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "100", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "credits_applied", "in" : "query", "description" : "optional, in cents filter\n\nTotal credits applied against this invoice.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*credits_applied\\[is\\] = \"100\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "100", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_due", "in" : "query", "description" : "optional, in cents filter\n\nThe unpaid amount that is due on the invoice. This is calculated as: [total](/docs/api/invoices/invoice-object#total)\n\n* [amount_paid](/docs/api/invoices/invoice-object#amount_paid)\n* sum of [applied_credits](/docs/api/invoices/invoice-object#applied_credits)`.applied_amount`\n* sum of [adjustment_credit_notes](/docs/api/invoices/invoice-object#adjustment_credit_notes)`.cn_total`\n* sum of [linked_taxes_withheld](/docs/api/invoices/invoice-object#linked_taxes_withheld)`.amount`. **Supported operators :** is, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_due\\[is_not\\] = \"200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "dunning_status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent dunning status of the invoice. Possible values are : in_progress, exhausted, stopped, success.\n\n**Supported operators :**\nis, is_not, in, not_in, is_present\n\n**Example →**\n*dunning_status\\[is\\] = \"in_progress\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "in_progress", "properties" : { "is" : { "type" : "string", "description" : "* `in_progress` - Dunning is still in progress.\n* `exhausted` - Maximum number of attempts have been made.\n* `stopped` - Dunning has stopped for this invoice.\n* `success` - Payment successfully collected during dunning process.", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `in_progress` - Dunning is still in progress.\n* `exhausted` - Maximum number of attempts have been made.\n* `stopped` - Dunning has stopped for this invoice.\n* `success` - Payment successfully collected during dunning process.", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "example" : null }, "in" : { "type" : "string", "description" : "* `in_progress` - Dunning is still in progress.\n* `exhausted` - Maximum number of attempts have been made.\n* `stopped` - Dunning has stopped for this invoice.\n* `success` - Payment successfully collected during dunning process.", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `in_progress` - Dunning is still in progress.\n* `exhausted` - Maximum number of attempts have been made.\n* `stopped` - Dunning has stopped for this invoice.\n* `success` - Payment successfully collected during dunning process.", "enum" : [ "in_progress", "exhausted", "stopped", "success" ], "pattern" : "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "payment_owner", "in" : "query", "description" : "optional, string filter\n\nPayment owner of an invoice.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*payment_owner\\[is\\] = \"payment_customer\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "payment_customer", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on `updated_at`.\nThis attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the `sort_by`\ninput parameter as `updated_at`\nfor a faster response.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "properties" : { "is" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "voided_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating the date \\& time this invoice got voided.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*voided_at\\[before\\] = \"1394532759\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1394532759", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "void_reason_code", "in" : "query", "description" : "optional, string filter\n\nReason code for voiding the invoice. Select from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Invoices \\> Void invoice** .\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*void_reason_code\\[is\\] = \"Other\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Other", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null } }, "example" : null } }, { "name" : "exclude", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "line_items", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "einvoice", "in" : "query", "description" : "Parameters for einvoice\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "status" : { "type" : "object", "deprecated" : false, "description" : "The status of processing the e-invoice. To obtain detailed information about the current `status`\n, see `message`\n.\n", "example" : "failed", "properties" : { "is" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `skipped` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.\n", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `skipped` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.\n", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "in" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `skipped` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.\n", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "pattern" : "^\\[(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid)(,(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `skipped` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.\n", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "pattern" : "^\\[(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid)(,(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid))*\\]$", "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice" } }, "required" : [ "invoice" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/void_before_capture" : { "post" : { "summary" : "Void authorizations before capture", "operationId" : "void_authorizations_before_capture", "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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "maxLength" : 300, "example" : null }, "void_reason_code" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "invoice_action" : { "type" : "string", "deprecated" : false, "enum" : [ "void", "write_off" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/close" : { "post" : { "summary" : "Close a pending invoice", "description" : "Finalizes a `pending` invoice. Invoices are created with a `pending` `status` when [Metered Billing](https://www.chargebee.com/docs/metered_billing.html) is enabled. Ensure that usage charges are added before invoking this API as an invoice without any `line_items` cannot be closed. Any `refundable_credits` and `excess_payments` for the customer are applied to the invoice, and any payment due is collected automatically if `auto_collection` is `on` for the customer.\n\n#### Related Tutorial\n\n* [Check out the tutorial on how to use metered / usage based billing.](https://www.chargebee.com/tutorials/usage-based-billing-example.html)\n", "operationId" : "close_a_pending_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "invoice_note" : { "type" : "string", "deprecated" : false, "description" : "A note for this particular invoice. This, and [all other notes](/docs/api/invoices/invoice-object#notes)\nfor the invoice are displayed on the PDF invoice sent to the customer.\n", "maxLength" : 2000, "example" : null }, "remove_general_note" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Set as `true`\nto remove the [**general note**](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes)\nfrom this invoice.\n", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Set the [invoice date](/docs/api/invoices/invoice-object#date).\nMust lie between the date when the invoice was generated and current date. Can only be passed when the site setting to allow overriding is enabled. If not passed, then the default value [set at the site level](https://www.chargebee.com/docs/metered_billing.html#overview)\nis used.\n", "example" : null }, "notes_to_remove" : { "type" : "object", "deprecated" : false, "description" : "Parameters for notes_to_remove\n", "properties" : { "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Type of entity to which the [note](/docs/api/invoices/invoice-object#notes)\nbelongs. To remove the general note, use the `remove_general_note`\nparameter.\n\n* customer - Entity that represents a customer.\n* plan - Entity that represents a plan.\n* coupon - Entity that represents a coupon.\n* addon - Entity that represents an addon.\n* subscription - Entity that represents a subscription of customer.\n", "enum" : [ "plan", "addon", "customer", "subscription", "coupon" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "Unique identifier of the [note](/docs/api/invoices/invoice-object#notes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "notes_to_remove" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/apply_credits" : { "post" : { "summary" : "Apply credits for an invoice", "description" : "This API applies [available credits](/docs/api/customers/customer-object#balances) to an invoice. After credits are applied, [invoice.amount_due](/docs/api/invoices/invoice-object#amount_due) is recalculated. The invoice status changes to either `paid` or `payment_due` depending on how much credit is applied to the invoice amount.\n", "operationId" : "apply_credits_for_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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[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|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "credit_notes" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_notes\n", "properties" : { "id" : { "type" : "array", "description" : "The Credit Note number acts as an identifier for Credit Notes and is typically generated sequentially. Available refundable credits with the customer will be applied against this invoice if this paramenter is not passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "credit_notes" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}" : { "get" : { "summary" : "Retrieve an invoice", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nRetrieve the invoice for the specified invoice ID.\n", "operationId" : "retrieve_an_invoice", "parameters" : [ { "name" : "line_items_limit", "in" : "query", "description" : "Specify the maximum number of line items to include in the response. \n**Note:**\n\n* Applicable only when Enterprise-scale Invoicing is enabled.\n* Enterprise-scale Invoicing is currently in **Private Beta** . Please reach out to [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 100, "deprecated" : false, "maximum" : 300, "minimum" : 1, "example" : null } }, { "name" : "line_items_offset", "in" : "query", "description" : "Specify the starting point for retrieving line items. Use the value from the `line_items_next_offset` attribute of the previous retrieve API response. \n**Note:**\n\n* Applicable only when Enterprise-scale Invoicing is enabled.\n* Enterprise-scale Invoicing is currently in **Private Beta** . Please reach out to [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 1000, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))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?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/charge" : { "post" : { "summary" : "Create invoice for a one-time charge", "description" : "Generate invoices for a one-time charge using this API.\n", "operationId" : "create_invoice_for_a_one-time_charge", "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})(?:(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{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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for which this invoice needs to be created. Should be specified if 'subscription_id' is not specified.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer_id' is not specified.(not applicable for consolidated invoice).\n", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the invoice amount. Applicable only while creating an invoice for a customer (by specifying *customer_id*\n).\n", "maxLength" : 3, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 1, "example" : null }, "amount_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ).\nProvide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description for this charge.\n", "maxLength" : 250, "example" : null }, "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge starts.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time when the service period for the charge ends.\n", "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* retail - Transaction is a sale to an end user\n* vendor_use - Transaction is for an item that is subject to vendor use tax\n* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer\n* consumed - Transaction is for an item that is consumed directly\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date.\n`taxes`\nand\n`line_item_taxes`\nare computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n", "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source to be used for this payment.\n", "maxLength" : 40, "example" : null }, "payment_initiator" : { "type" : "string", "deprecated" : false, "description" : "The type of initiator to be used for the payment request triggered by this operation.\n\n* customer - Pass this value to indicate that the request is initiated by the customer\n* merchant - Pass this value to indicate that the request is initiated by the merchant\n", "enum" : [ "customer", "merchant" ], "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider currently supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "description" ], "example" : null }, "encoding" : { "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/update_details" : { "post" : { "summary" : "Update invoice details", "description" : "This API allows you to update the invoice Billing/Shipping address, VAT, custom fields, and PO number. During this operation if Billing Info (Billing Address, vat_number), Shipping info and PO number are not already present in the system the data will be added. If data is already present, the existing values will be replaced. If info is present in the system, but not passed as part of the request, the info will not be removed from the system. \n**Note:**\nIncase, tax is already applied will now vary due to address change, you cannot update the address. You cannot update the VAT Number if the billing address is not present in the API request.This will update the invoice only, it won't change the corresponding customer/subscription details.\n", "operationId" : "update_invoice_details", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})(?:(?:(?:(?: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:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "VAT/ Tax registration number of the customer. [Learn more](https://www.chargebee.com/docs/tax.html#capture-tax-registration-number)\n.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Invoice PDF](/docs/api/invoices/retrieve-invoice-as-pdf)\n.\n", "maxLength" : 300, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* invalid - Address is invalid.\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "statement_descriptor" : { "type" : "object", "deprecated" : false, "description" : "", "properties" : { "descriptor" : { "type" : "string", "deprecated" : false, "description" : "Describes the transaction to help your customer easily recognize it.\n", "maxLength" : 65000, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "statement_descriptor" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/record_payment" : { "post" : { "summary" : "Record an invoice payment", "description" : "To record a [offline payment](https://www.chargebee.com/docs/offline_payments.html) for an invoice.\n\nThe invoice status will be marked as 'paid' if its amount due becomes 0 because of this recorded payment.\n\n**Note:** If the payment transaction amount is more than the invoice due amount, the remaining transaction amount will be added to the customer's Excess Payments balance to be used against other invoices.\n", "operationId" : "record_an_invoice_payment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})):){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,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the payment.\n", "maxLength" : 300, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The payment transaction amount. If not specified, this value will be the invoice's due amount.\n", "minimum" : 0, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method of this transaction\n\n* cash - Cash\n* other - Payment Methods other than the above types\n* custom - Custom\n* check - Check\n* bank_transfer - Bank Transfer\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "The reference number for this transaction. e.g check number in case of 'check' payments.\n", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the custom payment method of this transaction.\n", "maxLength" : 50, "example" : null }, "id_at_gateway" : { "type" : "string", "deprecated" : false, "description" : "The id with which this transaction is referred in gateway.\n", "maxLength" : 100, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The status of this transaction.\n\n* late_failure - Indicates that a successful payment transaction has failed now due to a late failure notification from the payment gateway, typically caused by issues like insufficient funds or a closed bank account.\n* failure - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure\n* success - The transaction is successful.\n", "enum" : [ "success", "failure", "late_failure" ], "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null }, "error_code" : { "type" : "string", "deprecated" : false, "description" : "Error code received from the payment gateway on failure.\n", "maxLength" : 100, "example" : null }, "error_text" : { "type" : "string", "deprecated" : false, "description" : "Error message received from the payment gateway on failure.\n", "maxLength" : 65000, "example" : null } }, "required" : [ "payment_method" ], "example" : null } }, "example" : null }, "encoding" : { "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "invoice", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/delete" : { "post" : { "summary" : "Delete an invoice", "description" : "Deletes the specified invoice. Any payments must be [removed](/docs/api/invoices/remove-payment-from-an-invoice) from the invoice before deleting it.\n\n* Any [promotional credits](/docs/api/promotional_credits) or [credit notes](/docs/api/credit_notes) applied to the invoice are removed.\n* If an invoice for the current term of a subscription is deleted and the subscription is changed later with `proration` enabled, no prorated credits are issued.\n", "operationId" : "delete_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(?:(?:(?:(?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25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting the invoice. This comment will be added to the subscription entity if the invoice belongs to a subscription. It is added to the customer entity if the invoice is associated only with a customer.\n", "maxLength" : 300, "example" : null }, "claim_credits" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Indicates whether to put prorated credits back to the subscription or ignore while deleting the invoice.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/import_invoice" : { "post" : { "summary" : "Import invoice", "description" : "Imports an invoice into Chargebee Billing. This endpoint allows you to import an invoice from external systems, such as accounting software, into Chargebee. \n**Caution: Importing Current-Term Invoices**\nTo ensure accurate [proration](https://www.chargebee.com/docs/1.0/proration.html#introduction_proration) for any changes to the subscription in the current term, only import one current term invoice. Chargebee considers only the first imported invoice for the current term when calculating proration. If there are multiple invoices for the current term in the source system, consolidate them into a single invoice before importing it into Chargebee.\n", "operationId" : "import_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Invoice Number.\n", "maxLength" : 50, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the invoice.\n", "maxLength" : 3, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for which this invoice needs to be created.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "If recurring items are present in line items then subscription id is required.\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null }, "price_type" : { "type" : "string", "default" : "tax_exclusive", "deprecated" : false, "description" : "The price type of the invoice.\n\n* tax_inclusive - All amounts in the document are inclusive of tax.\n* tax_exclusive - All amounts in the document are exclusive of tax.\n", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "tax_override_reason" : { "type" : "string", "deprecated" : false, "description" : "The reason for exempting the invoice from tax. (Applicable only for exempted invoices.).\n\n* zero_rated - If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item\n* export - The customer is from a non-taxable region or the billing address and shipping address are unavailable.\n* customer_exempt -\n The customer is [exempted](/docs/api/customers/customer-object#taxability)\n from tax.\n* tax_not_configured_external_provider - If the tax is not configured for the country in 3rd party tax provider.\n* id_exempt -\n The customer is from a different country than your business and they have a valid VAT number or, the customer is a business entity. (This reason is only applicable when [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\n or [UK VAT](https://www.chargebee.com/docs/uk-vat.html)\n is enabled.)\n* high_value_physical_goods - If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied\n* product_exempt - If the Plan or Addon is marked as Tax exempt\n* region_non_taxable - If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction\n* zero_value_item - If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.\n", "enum" : [ "zero_rated", "id_exempt", "customer_exempt", "region_non_taxable", "product_exempt", "export", "high_value_physical_goods", "zero_value_item", "tax_not_configured_external_provider" ], "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "Vat Number. Required if this invoice is VAT exempted.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date when invoice raised.\n", "example" : null }, "total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Invoice total amount.\n", "minimum" : 0, "example" : null }, "round_off" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Round off amount.\n", "maximum" : 99, "minimum" : -99, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "Current status of this invoice.\n\n* not_paid - Indicates the payment is not made and all attempts to collect is failed.\n* voided - Indicates a voided invoice.\n* paid - Indicates a paid invoice.\n* posted - Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period\n* pending -\n The [invoice](/docs/api/invoices/invoice-object#status) is yet to be closed (sent for payment collection). An invoice is generated with this `status` when it has line items that belong to items that are `metered` or when the `subscription.create_pending_invoices`attribute is set to `true`.\n The [invoice](/docs/api/v2/pcv-1/invoices/invoice-object#status) is yet to be closed (sent for payment collection). All invoices are generated with this `status` when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html) is enabled for the site.\n* payment_due - Indicates the payment is not yet collected and is being retried as per retry settings.\n", "enum" : [ "paid", "posted", "payment_due", "not_paid", "voided", "pending" ], "example" : null }, "voided_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating the date \\& time this invoice got voided.\n", "example" : null }, "void_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for voiding the invoice. Select from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Invoices \\> Void invoice**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "is_written_off" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If is_written_off is true then the invoice is written off.\n", "example" : null }, "write_off_amount" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Amount written off against this invoice.\nIf this value is not present then the due amount of the invoice will be written off.\n", "minimum" : 0, "example" : null }, "write_off_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which the write_off invoice has occurred.\nThis is a mandatory field if is_written_off is true. The same date reflects on the created credit note.\n", "example" : null }, "due_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Invoice Due Date.\n", "example" : null }, "net_term_days" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "Invoice net term days.\n", "example" : null }, "has_advance_charges" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Boolean indicating any advance charge is present in this invoice.\n", "example" : null }, "use_for_proration" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If the invoice falls within the subscription current term will be used for proration.\n", "example" : null }, "paid_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp when the invoice was paid. Applicable only when `status` is `paid`.\n", "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique identifier for the credit note.\n\nThis is a mandatory field if is_written_off is true.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "line_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_items\n", "properties" : { "id" : { "type" : "array", "description" : "Uniquely identifies a line_item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "Start date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "End date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "subscription_id" : { "type" : "array", "description" : "A unique identifier for the subscription this line item belongs to.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this line item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "Unit amount of the line item.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "[Quantity of the recurring item](/docs/api/invoices/invoice-object#line_items_quantity) which is represented by this line item. For `metered` line items, this value is updated from [usages](/docs/api/usages) once when the invoice is generated as `pending` and finally when the invoice is [closed](/docs/api/invoices/close-a-pending-invoice).\n[Quantity of the recurring item](/docs/api/v2/pcv-1/invoices/invoice-object#line_items_quantity) which is represented by this line item.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Total amount of this lineitem. Not required if the line_items\\[unit_amount\\] param is passed\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the unit amount of the `line_item`.\nThe value is in major units of the currency. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of this line_item. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the amount for the `line_item`\n, in major units of the currency. Typically equals to `unit_amount_in_decimal`\nx `quantity_in_decimal`.\nReturned when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\n* addon -\n Indicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/v2/pcv-1/addons/addon-object)\n id\n* plan -\n Indicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the [plan](/docs/api/v2/pcv-1/plans/plan-object)\n id\n* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n* plan_setup -\n Indicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the [plan](/docs/api/v2/pcv-1/plans/plan-object)\n id\n", "enum" : [ "plan_setup", "plan", "addon", "adhoc" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount1_entity_id" : { "type" : "array", "description" : "First item level discount entity id\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount1_amount" : { "type" : "array", "description" : "First item level discount amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "item_level_discount2_entity_id" : { "type" : "array", "description" : "Second item level discount entity id\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount2_amount" : { "type" : "array", "description" : "Second item level discount amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax1_name" : { "type" : "array", "description" : "First tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax1_amount" : { "type" : "array", "description" : "First tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax2_name" : { "type" : "array", "description" : "Second tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax2_amount" : { "type" : "array", "description" : "Second tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax3_name" : { "type" : "array", "description" : "Third tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax3_amount" : { "type" : "array", "description" : "Third tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax4_name" : { "type" : "array", "description" : "Fourth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax4_amount" : { "type" : "array", "description" : "Fourth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax5_name" : { "type" : "array", "description" : "Fifth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax5_amount" : { "type" : "array", "description" : "Fifth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax6_name" : { "type" : "array", "description" : "Sixth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax6_amount" : { "type" : "array", "description" : "Sixth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax7_name" : { "type" : "array", "description" : "Seventh tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax7_amount" : { "type" : "array", "description" : "Seventh tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax8_name" : { "type" : "array", "description" : "Eighth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax8_amount" : { "type" : "array", "description" : "Eighth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax9_name" : { "type" : "array", "description" : "Ninth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax9_amount" : { "type" : "array", "description" : "Ninth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax10_name" : { "type" : "array", "description" : "Tenth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax10_amount" : { "type" : "array", "description" : "Tenth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "proration_mode" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null }, "example" : null }, "created_at" : { "type" : "array", "description" : "", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "description" ], "example" : null }, "payment_reference_numbers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_reference_numbers\n", "properties" : { "id" : { "type" : "array", "description" : "If `id`\nis not provided then our system will automatically generate a unique id.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "This attribute helps `type`\nfield in the API, specifies how to reconcile offline payments, and generate `payment_reference_number`\non invoices based on country-specific rules. Setting the `type`\nfield generates `payment_reference_number`\nfor the respective country and includes them on the invoice for correct reconciliation.\n\n* swiss_reference - Switzerland based number calculated using MOD 10 and Mod 95 algorithm based on reference type.\n* kid - The KID number (kundeidentifikasjon) in Norway is an abbreviation for \"Customer identification\". It is used to associate payments with the customer and invoice.\n* fik - Denmark based number calculated using recursive MOD 10 algorithm.\n* frn - The reference number printed on invoices in Finland is utilized by buyers for payment via bank transfer, facilitating the association of payments with invoices.\n* ocr - A OCR-based payment, contains an OCR reference, which is used to identify the vendor and the purchase document in connection with a payment. Swedish reference number can contain customer ID and/or invoice number to identify customer and invoice.\n", "enum" : [ "kid", "ocr", "frn", "fik", "swiss_reference" ], "example" : null }, "example" : null }, "number" : { "type" : "array", "description" : "If you have already generated a `payment_reference_number`\nin another system, you can provide it in this field. This number will then be made available to you both in PDF format and via the `/api/v2/invoices/payment_reference_numbers`\nAPI.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "required" : [ "number", "type" ], "example" : null }, "line_item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_item_tiers\n", "properties" : { "line_item_id" : { "type" : "array", "description" : "Uniquely identifies a line_item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "quantity_used" : { "type" : "array", "description" : "The number of units purchased in a range.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "The price of the tier if the charge model is a `stairtstep`\npricing , or the price of each unit in the tier if the charge model is `tiered`\n/`volume`\npricing.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "starting_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal`\nof the next lower tier. Returned only when the `line_items.pricing_model`\nis `tiered`\n, `volume`\nor `stairstep`\nand [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "ending_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal`\nof the next higher tier. Returned only when the `line_items.pricing_model`\nis `tiered`\n, `volume`\nor stairstep and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "quantity_used_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity purchased from this tier. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the per-unit price for the tier when the `pricing_model`\nis `tiered`\nor `volume`.\nWhen the `pricing_model`\nis `stairstep`\n, it is the decimal representation of the total price for `line_item`.\nThe value is in major units of the currency. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null } }, "required" : [ "line_item_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "line_item_id" : { "type" : "array", "description" : "The unique id of the line item that this deduction is for. Is required when `discounts[entity_type]`\nis `item_level_coupon`\nor `document_level_coupon`\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "The type of deduction and the amount to which it is applied.\n\n* item_level_coupon -\n The deduction is due to a coupon applied to line item. The coupon `id`\n is passed as `entity_id`\n .\n* document_level_coupon -\n The deduction is due to a coupon applied to the invoice `sub_total`.\n The coupon id is passed as `entity_id`\n .\n* promotional_credits -\n The deduction is due to a [promotional credit](/docs/api/promotional_credits)\n applied to the invoice.\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "When the deduction is due to a `coupon`\n, then this is the `id`\nof the coupon. Is required when `discounts[entity_type]`\nis `item_level_coupon`\nor `document_level_coupon`\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this deduction.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "taxes" : { "type" : "object", "deprecated" : false, "description" : "Parameters for taxes\n", "properties" : { "name" : { "type" : "array", "description" : "The name of the tax applied\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "rate" : { "type" : "array", "description" : "The rate of tax used to calculate tax amount\n", "items" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Total tax amount charged for this invoice\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description of tax\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "juris_type" : { "type" : "array", "items" : { "type" : "string", "default" : "other", "deprecated" : false, "description" : "The type of tax jurisdiction\n\n* country - The tax jurisdiction is a country\n* special - Special tax jurisdiction.\n* state - The tax jurisdiction is a state\n* city - The tax jurisdiction is a city\n* other - Jurisdictions other than the ones listed above.\n* unincorporated - Combined tax of state and county.\n* federal - The tax jurisdiction is a federal\n* county - The tax jurisdiction is a county\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "example" : null }, "juris_name" : { "type" : "array", "description" : "The name of the tax jurisdiction\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "juris_code" : { "type" : "array", "description" : "The tax jurisdiction code\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null } }, "required" : [ "name", "rate" ], "example" : null }, "payments" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payments\n", "properties" : { "id" : { "type" : "array", "description" : "", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Payment made for this invoice\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "payment_method" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Mode of payment\n\n* check - Check\n* bank_transfer - Bank Transfer\n* custom - Custom\n* other - Payment Methods other than the above types\n* cash - Cash\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "example" : null }, "date" : { "type" : "array", "description" : "Payment date\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "reference_number" : { "type" : "array", "description" : "Reference number for this payment\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "minLength" : 1, "example" : null }, "example" : null } }, "required" : [ "amount", "payment_method" ], "example" : null }, "notes" : { "type" : "object", "deprecated" : false, "description" : "Parameters for notes\n", "properties" : { "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Type of entity to which the note belongs.\n\n* plan_item_price - Indicates that this line item is based on plan Item Price\n* plan - Entity that represents a plan.\n* coupon - Entity that represents a coupon.\n* addon_item_price - Indicates that this line item is based on addon Item Price\n* charge_item_price - Indicates that this line item is based on charge Item Price\n* addon - Entity that represents an addon.\n", "enum" : [ "plan", "addon", "coupon", "plan_item_price", "addon_item_price", "charge_item_price" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "Id of the mentioned entity type\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "note" : { "type" : "array", "description" : "Actual note.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 65000, "example" : null }, "example" : null } }, "example" : null }, "line_item_addresses" : { "type" : "object", "deprecated" : false, "description" : "The list of addresses used for tax calculation on line items.\n", "properties" : { "line_item_id" : { "type" : "array", "description" : "Line item reference\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "first_name" : { "type" : "array", "description" : "First name of the customer\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "last_name" : { "type" : "array", "description" : "Last name of the customer\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "email" : { "type" : "array", "description" : "Email address of the customer\n", "items" : { "type" : "string", "format" : "email", "deprecated" : false, "maxLength" : 70, "example" : null }, "example" : null }, "company" : { "type" : "array", "description" : "Name of the company\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "phone" : { "type" : "array", "description" : "Phone number of the customer\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "line1" : { "type" : "array", "description" : "Address line 1\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "line2" : { "type" : "array", "description" : "Address line 2\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "line3" : { "type" : "array", "description" : "Address line 3\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 150, "example" : null }, "example" : null }, "city" : { "type" : "array", "description" : "Name of the city\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "state_code" : { "type" : "array", "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "state" : { "type" : "array", "description" : "State or Province\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "zip" : { "type" : "array", "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 20, "example" : null }, "example" : null }, "country" : { "type" : "array", "description" : "The billing address of the customer, specified as an [ISO 3166 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html).\nEntering an invalid code will return an error. \nIf [EU VAT](https://www.chargebee.com/docs/eu-vat.html) (2021 or later) or [Brexit configuration](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) is enabled, 'United Kingdom-Northern Ireland' is a valid option.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "validation_status" : { "type" : "array", "items" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "date", "id", "total" ], "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "credit_note" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "line_item_addresses" : { "style" : "deepObject", "explode" : true }, "line_item_tiers" : { "style" : "deepObject", "explode" : true }, "line_items" : { "style" : "deepObject", "explode" : true }, "notes" : { "style" : "deepObject", "explode" : true }, "payment_reference_numbers" : { "style" : "deepObject", "explode" : true }, "payments" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "taxes" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/resume_dunning" : { "post" : { "summary" : "Resume dunning for invoice", "description" : "Immediately resumes [dunning](https://www.chargebee.com/docs/payments/1.0/dunning-v2.html) for the specified invoice.\n\n* If the current time is within the dunning period for the invoice, Chargebee resumes any dunning [retries](https://www.chargebee.com/docs/payments/1.0/dunning-v2.html) and [email notifications](https://www.chargebee.com/docs/payments/1.0/dunning-v2.html#dunning-email-notifications) that remain after the pause period, and not attempt the retries or notifications that were canceled during the pause period.\n* If the current time is after the dunning period for the invoice, the [final action](https://www.chargebee.com/docs/payments/1.0/dunning-v2.html) configured in Billing is initiated for the invoice and, if applicable, for the subscription.\n\n#### Prerequisites\n\nThis operation is only permitted for an invoice with a [status](/docs/api/v2/pcv-1/invoices/invoice-object#status) of `payment_due` and for which dunning was previously [paused](/docs/api/v2/pcv-1/invoices/pause-dunning-for-invoice).\n", "operationId" : "resume_dunning_for_invoice", "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]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4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/record_tax_withheld" : { "post" : { "summary" : "Record tax withheld for an invoice", "description" : "Records [tax_withheld](/docs/api/tax_withheld) by the customer against the invoice specified. This operation is allowed only when all of the following conditions are true:\n\n* Tax Amount Withheld is enabled.\n* The `invoice` does not have a `linked_taxes_withheld` record associated with it already.\n* `invoice.amount_due` is greater than zero.\n* `invoice.status` is one of the following: `payment_due`, `not_paid`, or `posted`.\n", "operationId" : "record_tax_withheld_for_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?: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3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "tax_withheld" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_withheld\n", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount withheld by the customer as tax from the invoice. This must not exceed [invoice.amount_due](/docs/api/invoices/invoice-object#amount_due).\nThe unit depends on the [type of currency](/docs/api/getting-started).\n", "minimum" : 1, "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "A unique external reference number for the tax withheld. Typically, this is the reference number used by the system you are integrating the API with. Depending on your integration, this could be the reference number issued by the taxation authority to identify the customer or the specific tax transaction.\n", "maxLength" : 100, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date or time associated with this tax amount withheld. The default value is the time of invoking this operation.\n", "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "The description for this tax withheld.\n", "maxLength" : 65000, "example" : null } }, "required" : [ "amount" ], "example" : null } }, "example" : null }, "encoding" : { "tax_withheld" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/resend_einvoice" : { "post" : { "summary" : "Resend failed einvoice in invoices", "description" : "Resend failed einvoice of an invoice to the customer using this API.\n", "operationId" : "resend_failed_einvoice_in_invoices", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/remove_tax_withheld" : { "post" : { "summary" : "Remove tax withheld for an invoice", "description" : "Removes a [linked_taxes_withheld](/docs/api/invoices/invoice-object#linked_taxes_withheld) record from the `invoice` specified. This operation is allowed only when all of the following conditions are true:\n\n* [invoice.status](/docs/api/invoices/invoice-object#status) is one of the following: `payment_due`, `not_paid`, or `posted`.\n* There are no [adjustment_credit_notes](/docs/api/invoices/invoice-object#adjustment_credit_notes) associated with the invoice.\n* There are no [issued_credit_notes](/docs/api/invoices/invoice-object#issued_credit_notes) associated with the invoice.\n", "operationId" : "remove_tax_withheld_for_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])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:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "tax_withheld" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_withheld\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An auto-generated unique identifier for the tax withheld. The value starts with the prefix `tax_wh_`.\nFor example, `tax_wh_16BdDXSlbu4uV1Ee6`\n.\n", "maxLength" : 40, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "tax_withheld" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/payment_reference_numbers" : { "get" : { "summary" : "List payment reference numbers", "description" : "This API endpoint allows users to retrieve the payment reference numbers (PRNs) associated with an invoice. Only one PRN is allowed per payment type. You can use the `invoice_id`\nor the `payment_reference_number[number]`\nto retrieve the PRN.\n", "operationId" : "list_payment_reference_numbers", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]))\\.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?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nAn unique identifier for the invoice serves that links the invoice to the corresponding payment reference number (PRN).\n**Note** :\nTo retrieve the PRN, the API requires either the invoice ID or the payment reference number to be provided by the user. If both values are missing, an error will be returned by the API.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"old_inv_001\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "old_inv_001", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "payment_reference_number", "in" : "query", "description" : "Parameters for payment_reference_number\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "number" : { "type" : "object", "deprecated" : false, "description" : "This parameter is used to identify the PRN in the system and retrieve its corresponding payment information.\n**Note**:\nTo retrieve the PRN, the API requires either the invoice ID or the payment reference number to be provided by the user. If both values are missing, an error will be returned by the API.\n", "example" : "001234", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "payment_reference_number" : { "$ref" : "#/components/schemas/PaymentReferenceNumber", "description" : "Resource object representing payment_reference_number" } }, "required" : [ "payment_reference_number" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing invoice
" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "invoice", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/sync_usages" : { "post" : { "summary" : "Sync usages", "description" : "Updates the [`quantity`](/docs/api/invoices/invoice-object#line_items_quantity) for `metered` [`line_items`](/docs/api/invoices/invoice-object#line_items) of an invoice to reflect the latest [usage](/docs/api/usages) data.\n**Note:** This operation is done automatically while [closing](/docs/api/invoices/close-a-pending-invoice) the invoice.\n", "operationId" : "sync_usages", "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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/refund" : { "post" : { "summary" : "Refund an invoice", "description" : "Refunds the invoice. The [refund](https://www.chargebee.com/docs/refunds.html) request is processed via the payment gateway originally used to charge the customer. You can choose to either make a full refund for the entire amount or make many partial refunds until you reach the total amount charged for the invoice. The API returns an error if an attempt is made to:\n\n* Refund an offline invoice. For such invoices, use the [Record refund API](/docs/api/v2/pcv-1/invoices/record-refund-for-an-invoice).\n* Refund a fully refunded invoice.\n\nIf the refund transaction succeeds, a `credit_note` capturing this refund detail is created for the invoice.\n", "operationId" : "refund_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|(?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-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "refund_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be refunded. If not specified, the entire refundable amount for this invoice is refunded. The refundable amount is the total amount paid via online `transaction`\ns, and not already refunded.\n\n**Note:**\nAny [linked_taxes_withheld](/docs/api/invoices/invoice-object#linked_taxes_withheld)\nassociated with the invoice cannot be refunded via this operation.\n", "minimum" : 1, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Comment, if any, on the refund.\n", "maxLength" : 300, "example" : null }, "customer_notes" : { "type" : "string", "deprecated" : false, "description" : "The Customer Notes to be filled in the Credit Notes created to capture this refund detail.\n", "maxLength" : 2000, "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "reason_code" : { "type" : "string", "deprecated" : false, "description" : "The reason for issuing this Credit Note. The following reason codes are supported now\\[Deprecated; use the [create_reason_code](/docs/api/credit_notes/credit_note-object#create_reason_code)\nparameter instead\\]\n\n* product_unsatisfactory - Product Unsatisfactory\n* other - Can be set when none of the above reason codes are applicable\n* waiver - Waiver\n* order_cancellation - Order Cancellation\n* order_change - Order Change\n* service_unsatisfactory - Service Unsatisfactory\n", "enum" : [ "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other" ], "example" : null }, "create_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in Settings \\> Configure Chargebee \\> Reason Codes \\> Credit Notes \\> Create Credit Note. The codes are case-sensitive\n", "maxLength" : 100, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "invoice", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/record_refund" : { "post" : { "summary" : "Record refund for an invoice", "description" : "Refunds the invoice. The refund is provided against the following in order of precedence:\n\n* Offline [linked_payments](/docs/api/invoices/invoice-object#linked_payments)\n* Any [linked_taxes_withheld](/docs/api/invoices/invoice-object#linked_taxes_withheld)\n* Online [linked_payments](/docs/api/invoices/invoice-object#linked_payments)\n\n**Example**\n\nConsider an invoice with the following payments and tax withheld.\n\n* Offline payments: $30\n* Online payments: $20\n* Tax withheld: $5\n\nWhen recording a refund worth $40, the refund amount is split as follows:\n\n* Refund against offline payments: $30\n* Refund against tax withheld: $5\n* Refund against online payments: $5\n\nFor payments made via online transactions, the [refund](https://www.chargebee.com/docs/refunds.html) request is processed via the payment gateway originally used to charge the customer. \n**Tip**\n\nIf the order of precendence described above does not work for your use case, and you want to provide a refund against online `linked_payments` first, use the [Refund an invoice API](/docs/api/invoices/refund-an-invoice).\n", "operationId" : "record_refund_for_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the refund.\n", "maxLength" : 65000, "example" : null }, "customer_notes" : { "type" : "string", "deprecated" : false, "description" : "The Customer Notes to be filled in the Credit Notes created to capture this refund detail.\n", "maxLength" : 2000, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be refunded (for online payments) or recorded as refunded (for offline payments). If not specified, the entire refundable amount for this invoice is refunded. The refundable amount is the total amount paid (and not already refunded) for the invoice.\n\n**Note:**\nAny [linked_taxes_withheld](/docs/api/invoices/invoice-object#linked_taxes_withheld)\nassociated with the invoice can also be recorded as refunded via this operation.\n", "minimum" : 0, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method of this transaction\n\n* cash - Cash\n* other - Payment Methods other than the above types\n* custom - Custom\n* check - Check\n* bank_transfer - Bank Transfer\n* chargeback -\n Only applicable for a transaction of [type](/docs/api/transactions/transaction-object#type)\n = `refund`.\n This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process)\n occurs. You can also set this explicitly when [recording a refund](/docs/api/transactions/record-an-offline-refund)\n .\n", "enum" : [ "cash", "check", "chargeback", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "The reference number for this transaction. For example, the check number when [payment_method](/docs/api/transactions/transaction-object#payment_method)\n= `check`\n.\n", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the custom payment method of this transaction.\n", "maxLength" : 50, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null } }, "required" : [ "date", "payment_method" ], "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "reason_code" : { "type" : "string", "deprecated" : false, "description" : "The reason for issuing this Credit Note. The following reason codes are supported now\\[Deprecated; use the [create_reason_code](/docs/api/credit_notes/credit_note-object#create_reason_code)\nparameter instead\\]\n\n* product_unsatisfactory - Product Unsatisfactory\n* chargeback - Can be set when you are recording your customer Chargebacks\n* service_unsatisfactory - Service Unsatisfactory\n* other - Can be set when none of the above reason codes are applicable\n* waiver - Waiver\n* order_cancellation - Order Cancellation\n* order_change - Order Change\n", "enum" : [ "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other" ], "example" : null }, "create_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in Settings \\> Configure Chargebee \\> Reason Codes \\> Credit Notes \\> Create Credit Note. The codes are case-sensitive\n", "maxLength" : 100, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true }, "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "invoice" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/pdf" : { "post" : { "summary" : "Retrieve invoice as PDF", "description" : "Gets the invoice as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes.\n\n#### Related Tutorial\n\n* [Check out customer portal tutorial on how to download invoice as PDF.](https://www.chargebee.com/tutorials/customer-portal-sample.html#downloading_invoices_as_pdf)\n", "operationId" : "retrieve_invoice_as_pdf", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "disposition_type" : { "type" : "string", "default" : "attachment", "deprecated" : false, "description" : "Determines the pdf should be rendered as inline or attachment in the browser.\n\n* attachment - PDF is rendered as attachment in the browser\n* inline - PDF is rendered as inline in the browser\n", "enum" : [ "attachment", "inline" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "download" : { "$ref" : "#/components/schemas/Download", "description" : "Resource object representing download
" } }, "required" : [ "download" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/download_einvoice" : { "get" : { "summary" : "Download e-invoice", "description" : "Download the e-invoice in both XML and PDF formats. The response consists of a `download` object for each format. The XML format follows the [structure as per Peppol BIS Billing v3.0](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/tree/). \n**Note**\n\n* You can only download e-invoices when their `status` is `success`.\n* There are some cases in which the PDF is not available for download. In such cases, you can obtain it from the XML by decoding the value for [cbc:EmbeddedDocumentBinaryObject](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-AdditionalDocumentReference/cac-Attachment/cbc-EmbeddedDocumentBinaryObject/), which is the Base64-encoded version of the PDF.\n", "operationId" : "download_e-invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "downloads" : { "type" : "array", "description" : "Resource object representing download
", "items" : { "$ref" : "#/components/schemas/Download", "description" : "Resource object representing download" }, "example" : null } }, "required" : [ "downloads" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/record_refund" : { "post" : { "summary" : "Record refund for a credit note", "description" : "Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note. The refund is provided against `linked_payments` first and then against any `linked_taxes_withheld` for the [invoice](/docs/api/credit_notes/credit_note-object#reference_invoice_id) associated with the `credit_note`. For payments made via online transactions, the refund request is processed via the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions).\n", "operationId" : "record_refund_for_a_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]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4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "refund_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Credit Notes \\> Refund Credit Note**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the refund.\n", "maxLength" : 300, "example" : null }, "transaction" : { "type" : "object", "deprecated" : false, "description" : "Parameters for transaction\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The payment transaction ID\n", "maxLength" : 40, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be refunded (for online payments) or recorded as refunded (for offline payments). If not specified, the entire [refundable amount](/docs/api/credit_notes/credit_note-object#amount_available)\nfor this `credit_note`\nis refunded.\n\nNote: Any [linked_tax_withheld_refunds](/docs/api/credit_notes/credit_note-object#linked_tax_withheld_refunds)\nassociated with the `credit_note`\ncan also be recorded as refunded via this operation.\n", "minimum" : 0, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method of this transaction\n\n* cash - Cash\n* other - Payment Methods other than the above types\n* custom - Custom\n* check - Check\n* bank_transfer - Bank Transfer\n* chargeback -\n Only applicable for a transaction of [type](/docs/api/transactions/transaction-object#type)\n = `refund`.\n This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process)\n occurs. You can also set this explicitly when [recording a refund](/docs/api/transactions/record-an-offline-refund)\n .\n", "enum" : [ "cash", "check", "chargeback", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "The reference number for this transaction. For example, the check number when [payment_method](/docs/api/transactions/transaction-object#payment_method)\n= `check`\n.\n", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the custom payment method of this transaction.\n", "maxLength" : 50, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates when this transaction occurred.\n", "example" : null } }, "required" : [ "date", "payment_method" ], "example" : null } }, "example" : null }, "encoding" : { "transaction" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/import_credit_note" : { "post" : { "summary" : "Import credit note", "description" : "Use this api to import credit notes into your Chargebee site. Billing address, Shipping Address, Vat number will be copied from the reference invoice.\n", "operationId" : "import_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))?::(?: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-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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", "additionalProperties" : true, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Credit Note Number.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "This identifies the customer for whom the credit note needs to be created.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the subscription for which this credit note needs to be created.\n", "maxLength" : 50, "example" : null }, "reference_invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The identifier of the invoice against which this Credit Note is issued.\n", "maxLength" : 50, "example" : null }, "type" : { "type" : "string", "deprecated" : false, "description" : "The credit note type. [Learn more](/docs/api/v2/pcv-1/credit_notes/credit-note-object)\nabout credit note types.\n\n* refundable - Refundable Credit Note\n* store - Store Credit Note\n* adjustment - Adjustment Credit Note\n", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) for the credit note.\n", "maxLength" : 3, "example" : null }, "create_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Credit Notes \\> Create Credit Note**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date the Credit Note is issued.\n", "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The credit note status.\n\n* refund_due - When the credits are yet to be used, or have been partially used.\n* refunded - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n* voided - When the Credit Note has been cancelled.\n* adjusted - When the Credit Note has been adjusted against an invoice.\n", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Credit Note amount in cents.\n", "minimum" : 0, "example" : null }, "refunded_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time this Credit Note gets fully used. Please note that this field is not present when partial refunds are issued.\n", "example" : null }, "voided_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating the date and time this Credit Note gets voided.\n", "example" : null }, "sub_total" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The Credit Note sub-total.\n", "minimum" : 0, "example" : null }, "round_off_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the rounded-off amount. For example, if your invoice amount is $99.99, and the amount is rounded off to $100.00, in this case, $100.00 is your invoice amount, $0.01 is the `round_off_amount`.\nIf there is no `round-off amount`\n, it will display `0`\n.\n", "maximum" : 99, "minimum" : -99, "example" : null }, "fractional_correction" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Indicates the fractional correction amount.\n", "maximum" : 50000, "minimum" : -50000, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null }, "line_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_items\n", "properties" : { "reference_line_item_id" : { "type" : "array", "description" : "Uniquely identifies a line_item of invoice for which this reversal represents.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "id" : { "type" : "array", "description" : "Uniquely identifies a line_item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "Start date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "End date of this line item.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "subscription_id" : { "type" : "array", "description" : "A unique identifier for the subscription this line item belongs to.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this line item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "Unit amount of the line item.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "[Quantity of the recurring item](/docs/api/invoices/invoice-object#line_items_quantity) which is represented by this line item. For `metered` line items, this value is updated from [usages](/docs/api/usages) once when the invoice is generated as `pending` and finally when the invoice is [closed](/docs/api/invoices/close-a-pending-invoice).\n[Quantity of the recurring item](/docs/api/v2/pcv-1/invoices/invoice-object#line_items_quantity) which is represented by this line item.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Total amount of this lineitem. Not required if the line_items\\[unit_amount\\] param is passed\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the unit amount of the `line_item`.\nThe value is in major units of the currency. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of this line_item. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the amount for the `line_item`\n, in major units of the currency. Typically equals to `unit_amount_in_decimal`\nx `quantity_in_decimal`.\nReturned when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies the modelled entity this line item is based on.\n\n* addon -\n Indicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/v2/pcv-1/addons/addon-object)\n id\n* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case\n* plan_setup -\n Indicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the [plan](/docs/api/v2/pcv-1/plans/plan-object)\n id\n* plan -\n Indicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the [plan](/docs/api/v2/pcv-1/plans/plan-object)\n id\n", "enum" : [ "plan_setup", "plan", "addon", "adhoc" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount1_entity_id" : { "type" : "array", "description" : "First item level discount entity id\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount1_amount" : { "type" : "array", "description" : "First item level discount amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "item_level_discount2_entity_id" : { "type" : "array", "description" : "Second item level discount entity id\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "item_level_discount2_amount" : { "type" : "array", "description" : "Second item level discount amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax1_name" : { "type" : "array", "description" : "First tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax1_amount" : { "type" : "array", "description" : "First tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax2_name" : { "type" : "array", "description" : "Second tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax2_amount" : { "type" : "array", "description" : "Second tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax3_name" : { "type" : "array", "description" : "Third tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax3_amount" : { "type" : "array", "description" : "Third tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax4_name" : { "type" : "array", "description" : "Fourth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax4_amount" : { "type" : "array", "description" : "Fourth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax5_name" : { "type" : "array", "description" : "Fifth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax5_amount" : { "type" : "array", "description" : "Fifth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax6_name" : { "type" : "array", "description" : "Sixth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax6_amount" : { "type" : "array", "description" : "Sixth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax7_name" : { "type" : "array", "description" : "Seventh tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax7_amount" : { "type" : "array", "description" : "Seventh tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax8_name" : { "type" : "array", "description" : "Eighth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax8_amount" : { "type" : "array", "description" : "Eighth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax9_name" : { "type" : "array", "description" : "Ninth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax9_amount" : { "type" : "array", "description" : "Ninth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "tax10_name" : { "type" : "array", "description" : "Tenth tax name\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "tax10_amount" : { "type" : "array", "description" : "Tenth tax amount\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "proration_mode" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Proration mode for the line item.\n", "enum" : [ "reset", "delta", "service_period_revision", "adjusted_term" ], "example" : null }, "example" : null } }, "required" : [ "description" ], "example" : null }, "line_item_tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for line_item_tiers\n", "properties" : { "line_item_id" : { "type" : "array", "description" : "Uniquely identifies a line_item\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "quantity_used" : { "type" : "array", "description" : "The number of units purchased in a range.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_amount" : { "type" : "array", "description" : "The price of the tier if the charge model is a `stairtstep`\npricing , or the price of each unit in the tier if the charge model is `tiered`\n/`volume`\npricing.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "starting_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal`\nof the next lower tier. Returned only when the `line_items.pricing_model`\nis `tiered`\n, `volume`\nor `stairstep`\nand [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "ending_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal`\nof the next higher tier. Returned only when the `line_items.pricing_model`\nis `tiered`\n, `volume`\nor stairstep and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "quantity_used_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity purchased from this tier. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the per-unit price for the tier when the `pricing_model`\nis `tiered`\nor `volume`.\nWhen the `pricing_model`\nis `stairstep`\n, it is the decimal representation of the total price for `line_item`.\nThe value is in major units of the currency. Returned when the `line_item`\nis quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null } }, "required" : [ "line_item_id" ], "example" : null }, "discounts" : { "type" : "object", "deprecated" : false, "description" : "Parameters for discounts\n", "properties" : { "line_item_id" : { "type" : "array", "description" : "The unique id of the line item that this deduction is for. Is required when `discounts[entity_type]`\nis `item_level_coupon`\nor `document_level_coupon`\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "The type of deduction and the amount to which it is applied.\n\n* document_level_coupon -\n The deduction is due to a coupon applied to the invoice `sub_total`.\n The coupon id is passed as `entity_id`\n .\n* item_level_coupon -\n The deduction is due to a coupon applied to line item. The coupon `id`\n is passed as `entity_id`\n .\n* promotional_credits -\n The deduction is due to a [promotional credit](/docs/api/promotional_credits)\n applied to the invoice.\n", "enum" : [ "item_level_coupon", "document_level_coupon", "promotional_credits" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "When the deduction is due to a `coupon`\n, then this is the `id`\nof the coupon. Is required when `discounts[entity_type]`\nis `item_level_coupon`\nor `document_level_coupon`\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this deduction.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "required" : [ "amount", "entity_type" ], "example" : null }, "taxes" : { "type" : "object", "deprecated" : false, "description" : "Parameters for taxes\n", "properties" : { "name" : { "type" : "array", "description" : "The name of the tax applied\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "rate" : { "type" : "array", "description" : "The rate of tax used to calculate tax amount\n", "items" : { "type" : "number", "format" : "double", "default" : 0, "deprecated" : false, "maximum" : 100, "minimum" : 0, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Total tax amount charged for this invoice\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description of tax\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "juris_type" : { "type" : "array", "items" : { "type" : "string", "default" : "other", "deprecated" : false, "description" : "The type of tax jurisdiction\n\n* country - The tax jurisdiction is a country\n* special - Special tax jurisdiction.\n* county - The tax jurisdiction is a county\n* state - The tax jurisdiction is a state\n* city - The tax jurisdiction is a city\n* other - Jurisdictions other than the ones listed above.\n* unincorporated - Combined tax of state and county.\n* federal - The tax jurisdiction is a federal\n", "enum" : [ "country", "federal", "state", "county", "city", "special", "unincorporated", "other" ], "example" : null }, "example" : null }, "juris_name" : { "type" : "array", "description" : "The name of the tax jurisdiction\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "juris_code" : { "type" : "array", "description" : "The tax jurisdiction code\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null } }, "required" : [ "name", "rate" ], "example" : null }, "allocations" : { "type" : "object", "deprecated" : false, "description" : "Parameters for allocations\n", "properties" : { "invoice_id" : { "type" : "array", "description" : "The unique invoice ID for the allocation\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "allocated_amount" : { "type" : "array", "description" : "The allocated amount for the credit note\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "allocated_at" : { "type" : "array", "description" : "Time when the allocation was occurred\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "required" : [ "allocated_amount", "allocated_at", "invoice_id" ], "example" : null }, "linked_refunds" : { "type" : "object", "deprecated" : false, "description" : "Parameters for linked_refunds\n", "properties" : { "id" : { "type" : "array", "description" : "", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "amount" : { "type" : "array", "description" : "Amount of this refund transaction.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "payment_method" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Mode of refund.\n\n* other - Payment Methods other than the above types\n* cash - Cash\n* custom - Custom\n* bank_transfer - Bank Transfer\n* check - Check\n", "enum" : [ "cash", "check", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "example" : null }, "date" : { "type" : "array", "description" : "The date of refund.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "reference_number" : { "type" : "array", "description" : "Reference number for this refund.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "minLength" : 1, "example" : null }, "example" : null } }, "required" : [ "amount", "date", "payment_method" ], "example" : null } }, "required" : [ "create_reason_code", "date", "id", "reference_invoice_id", "type" ], "example" : null }, "encoding" : { "allocations" : { "style" : "deepObject", "explode" : true }, "discounts" : { "style" : "deepObject", "explode" : true }, "line_item_tiers" : { "style" : "deepObject", "explode" : true }, "line_items" : { "style" : "deepObject", "explode" : true }, "linked_refunds" : { "style" : "deepObject", "explode" : true }, "taxes" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/delete" : { "post" : { "summary" : "Delete a credit note", "description" : "This API [deletes a credit note.](https://www.chargebee.com/docs/credit-notes.html#voiding-or-deleting-a-credit-note) A credit note once deleted, is deleted permanently. You cannot delete a credit which has already been deleted or refunded. If you try to delete a refunded or deleted credit note, an error message will be displayed.\n", "operationId" : "delete_a_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))?::(?: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F]{1,4})):){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" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/pdf" : { "post" : { "summary" : "Retrieve credit note as PDF", "description" : "Gets the credit note as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes.\n", "operationId" : "retrieve_credit_note_as_pdf", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|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-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "disposition_type" : { "type" : "string", "default" : "attachment", "deprecated" : false, "description" : "Determines the pdf should be rendered as inline or attachment in the browser.\n\n* attachment - PDF is rendered as attachment in the browser\n* inline - PDF is rendered as inline in the browser\n", "enum" : [ "attachment", "inline" ], "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "download" : { "$ref" : "#/components/schemas/Download", "description" : "Resource object representing download
" } }, "required" : [ "download" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/send_einvoice" : { "post" : { "summary" : "Send an einvoice for credit notes", "description" : "This endpoint is used to send an e-invoice for invoice.\nTo support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually.\nThis endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches:\n\n* If e-invoicing is not enabled at the site and customer level.\n\n* If there is an e-invoice generated already for the invoice.\n\n* If the **Use automatic e-invoicing** option is selected.\n\n* If there are no generated e-invoices with the `failed` or `skipped` status.\n\n* If the invoice status is `voided` or `pending`.\n\n", "operationId" : "send_an_einvoice_for_credit_notes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/void" : { "post" : { "summary" : "Void a credit note", "description" : "Use this API to [void a credit note.](https://www.chargebee.com/docs/credit-notes.html#voiding-or-deleting-a-credit-note) A voided credit is a null entity and cannot be used again. A credit note which has already been voided or refunded cannot be voided. An error message will be displayed when you render such credit notes void. \n**Note:**\nWhen adjustment credit notes are voided, the associated invoice will reflect as NOT PAID, and the amount in the invoice will be recalculated to reflect the amount after considering the voided credit note.\n", "operationId" : "void_a_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|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{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/refund" : { "post" : { "summary" : "Refund a credit note", "description" : "Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note to the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions). Any [linked_tax_withheld_refunds](/docs/api/credit_notes/credit_note-object#linked_tax_withheld_refunds) recorded against the credit note are not refunded.\n", "operationId" : "refund_a_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "refund_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be refunded. If not specified, the entire [refundable amount](/docs/api/credit_notes/credit_note-object#amount_available)\nfor this `credit_note`\nis refunded.\n\n**Note:**\nAny [linked_tax_withheld_refunds](/docs/api/credit_notes/credit_note-object#linked_tax_withheld_refunds)\nassociated with the `credit_note`\ncannot be refunded via this operation.\n", "minimum" : 1, "example" : null }, "customer_notes" : { "type" : "string", "deprecated" : false, "description" : "A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the [Credit Note PDF](/docs/api/credit_notes/retrieve-credit-note-as-pdf)\n.\n", "maxLength" : 2000, "example" : null }, "refund_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Credit Notes \\> Refund Credit Note**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" }, "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "credit_note", "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes" : { "get" : { "summary" : "List credit notes", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nLists all the Credit Notes.\n", "operationId" : "list_credit_notes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(?:(?:(?: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[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "If set to true, includes the deleted resources in the response. For the deleted resources in the response, the '**deleted**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nCredit-note id.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"CN_123\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "CN_123", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nThe identifier of the customer this Credit Note belongs to.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"4gmiXbsjdm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on subscription_id.\nNOTE: Not to be used if *consolidated invoicing*\nfeature is enabled.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is\\] = \"4gmiXbsjdm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "reference_invoice_id", "in" : "query", "description" : "optional, string filter\n\nThe identifier of the invoice against which this Credit Note is issued.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*reference_invoice_id\\[is\\] = \"INVOICE_876\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "INVOICE_876", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nThe credit note type. Possible values are : adjustment, refundable.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is\\] = \"adjustment\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "adjustment", "properties" : { "is" : { "type" : "string", "description" : "* `adjustment` - Adjustment Credit Note\n* `refundable` - Refundable Credit Note\n* `store` - Store Credit Note", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `adjustment` - Adjustment Credit Note\n* `refundable` - Refundable Credit Note\n* `store` - Store Credit Note", "enum" : [ "adjustment", "refundable", "store" ], "example" : null }, "in" : { "type" : "string", "description" : "* `adjustment` - Adjustment Credit Note\n* `refundable` - Refundable Credit Note\n* `store` - Store Credit Note", "enum" : [ "adjustment", "refundable", "store" ], "pattern" : "^\\[(adjustment|refundable|store)(,(adjustment|refundable|store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `adjustment` - Adjustment Credit Note\n* `refundable` - Refundable Credit Note\n* `store` - Store Credit Note", "enum" : [ "adjustment", "refundable", "store" ], "pattern" : "^\\[(adjustment|refundable|store)(,(adjustment|refundable|store))*\\]$", "example" : null } } } }, { "name" : "reason_code", "in" : "query", "description" : "optional, enumerated string filter\n\nThe reason for issuing this Credit Note. The following reason codes are supported now\\[Deprecated; use the [create_reason_code](/docs/api/credit_notes/credit_note-object#create_reason_code)\nparameter instead\\]. Possible values are : write_off, subscription_change, subscription_cancellation, subscription_pause, chargeback, product_unsatisfactory, service_unsatisfactory, order_change, order_cancellation, waiver, other, fraudulent.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*reason_code\\[is\\] = \"waiver\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "waiver", "properties" : { "is" : { "type" : "string", "description" : "* `write_off` - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation.\n* `subscription_change` - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled\n* `subscription_cancellation` - This reason will be set automatically for Credit Notes created during cancel subscription operation\n* `subscription_pause` - This reason will be automatically set to credit notes created during pause/resume subscription operation.\n* `chargeback` - Can be set when you are recording your customer Chargebacks\n* `product_unsatisfactory` - Product Unsatisfactory\n* `service_unsatisfactory` - Service Unsatisfactory\n* `order_change` - Order Change\n* `order_cancellation` - Order Cancellation\n* `waiver` - Waiver\n* `other` - Can be set when none of the above reason codes are applicable\n* `fraudulent` - FRAUDULENT\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `write_off` - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation.\n* `subscription_change` - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled\n* `subscription_cancellation` - This reason will be set automatically for Credit Notes created during cancel subscription operation\n* `subscription_pause` - This reason will be automatically set to credit notes created during pause/resume subscription operation.\n* `chargeback` - Can be set when you are recording your customer Chargebacks\n* `product_unsatisfactory` - Product Unsatisfactory\n* `service_unsatisfactory` - Service Unsatisfactory\n* `order_change` - Order Change\n* `order_cancellation` - Order Cancellation\n* `waiver` - Waiver\n* `other` - Can be set when none of the above reason codes are applicable\n* `fraudulent` - FRAUDULENT\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "in" : { "type" : "string", "description" : "* `write_off` - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation.\n* `subscription_change` - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled\n* `subscription_cancellation` - This reason will be set automatically for Credit Notes created during cancel subscription operation\n* `subscription_pause` - This reason will be automatically set to credit notes created during pause/resume subscription operation.\n* `chargeback` - Can be set when you are recording your customer Chargebacks\n* `product_unsatisfactory` - Product Unsatisfactory\n* `service_unsatisfactory` - Service Unsatisfactory\n* `order_change` - Order Change\n* `order_cancellation` - Order Cancellation\n* `waiver` - Waiver\n* `other` - Can be set when none of the above reason codes are applicable\n* `fraudulent` - FRAUDULENT\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "pattern" : "^\\[(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent)(,(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `write_off` - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation.\n* `subscription_change` - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled\n* `subscription_cancellation` - This reason will be set automatically for Credit Notes created during cancel subscription operation\n* `subscription_pause` - This reason will be automatically set to credit notes created during pause/resume subscription operation.\n* `chargeback` - Can be set when you are recording your customer Chargebacks\n* `product_unsatisfactory` - Product Unsatisfactory\n* `service_unsatisfactory` - Service Unsatisfactory\n* `order_change` - Order Change\n* `order_cancellation` - Order Cancellation\n* `waiver` - Waiver\n* `other` - Can be set when none of the above reason codes are applicable\n* `fraudulent` - FRAUDULENT\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "pattern" : "^\\[(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent)(,(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent))*\\]$", "example" : null } } } }, { "name" : "create_reason_code", "in" : "query", "description" : "optional, string filter\n\nReason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Credit Notes \\> Create Credit Note** .\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*create_reason_code\\[is\\] = \"Other\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Other", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nThe credit note status. Possible values are : adjusted, refunded, refund_due, voided.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"adjusted\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "adjusted", "properties" : { "is" : { "type" : "string", "description" : "* `adjusted` - When the Credit Note has been adjusted against an invoice.\n* `refunded` - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n* `refund_due` - When the credits are yet to be used, or have been partially used.\n* `voided` - When the Credit Note has been cancelled.", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `adjusted` - When the Credit Note has been adjusted against an invoice.\n* `refunded` - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n* `refund_due` - When the credits are yet to be used, or have been partially used.\n* `voided` - When the Credit Note has been cancelled.", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "example" : null }, "in" : { "type" : "string", "description" : "* `adjusted` - When the Credit Note has been adjusted against an invoice.\n* `refunded` - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n* `refund_due` - When the credits are yet to be used, or have been partially used.\n* `voided` - When the Credit Note has been cancelled.", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "pattern" : "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `adjusted` - When the Credit Note has been adjusted against an invoice.\n* `refunded` - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).\n* `refund_due` - When the credits are yet to be used, or have been partially used.\n* `voided` - When the Credit Note has been cancelled.", "enum" : [ "adjusted", "refunded", "refund_due", "voided" ], "pattern" : "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\]$", "example" : null } } } }, { "name" : "date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe date the Credit Note is issued.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*date\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "total", "in" : "query", "description" : "optional, in cents filter\n\nCredit Note amount in cents.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*total\\[lte\\] = \"1200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "price_type", "in" : "query", "description" : "optional, enumerated string filter\n\nThe price type of the Credit Note. Possible values are : tax_exclusive, tax_inclusive.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*price_type\\[is\\] = \"tax_exclusive\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "tax_exclusive", "properties" : { "is" : { "type" : "string", "description" : "* `tax_exclusive` - All amounts in the document are exclusive of tax.\n* `tax_inclusive` - All amounts in the document are inclusive of tax.", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `tax_exclusive` - All amounts in the document are exclusive of tax.\n* `tax_inclusive` - All amounts in the document are inclusive of tax.", "enum" : [ "tax_exclusive", "tax_inclusive" ], "example" : null }, "in" : { "type" : "string", "description" : "* `tax_exclusive` - All amounts in the document are exclusive of tax.\n* `tax_inclusive` - All amounts in the document are inclusive of tax.", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `tax_exclusive` - All amounts in the document are exclusive of tax.\n* `tax_inclusive` - All amounts in the document are inclusive of tax.", "enum" : [ "tax_exclusive", "tax_inclusive" ], "pattern" : "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\]$", "example" : null } } } }, { "name" : "amount_allocated", "in" : "query", "description" : "optional, in cents filter\n\nThe amount allocated to the invoices.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_allocated\\[gt\\] = \"1200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_refunded", "in" : "query", "description" : "optional, in cents filter\n\nThe refunds issued from this Credit Note.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_refunded\\[is\\] = \"130\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "130", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_available", "in" : "query", "description" : "optional, in cents filter\n\nThe yet to be used credits of this Credit Note.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_available\\[gt\\] = \"1400\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1400", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "voided_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating the date and time this Credit Note gets voided.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*voided_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date" ], "example" : null } }, "example" : null } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "properties" : { "is" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "einvoice", "in" : "query", "description" : "Parameters for einvoice\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "status" : { "type" : "object", "deprecated" : false, "description" : "The status of processing the e-invoice. To obtain detailed information about the current `status`\n, see `message`\n.\n", "example" : "failed", "properties" : { "is" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `skipped` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.\n", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `skipped` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.\n", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "example" : null }, "in" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `skipped` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.\n", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "pattern" : "^\\[(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid)(,(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `scheduled` - Sending the e-invoice to the customer has been scheduled.\n* `skipped` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network.\n* `in_progress` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity.\n* `success` - The e-invoice has been successfully delivered to the customer.\n* `failed` - The e-invoice was sent and there was an error due to which it was not delivered.\n* `registered` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP.\n* `accepted` - The e-invoice was sent and it was accepted by the receiving entity. The sending entity shall also accept the e-invoice.\n* `rejected` - The e-invoice was sent and it was rejected by the receiving entity due to some reason. The sending entity shall also reject the e-invoice.\n* `message_acknowledgement` - An acknowledgment confirming that the application response was successfully received by the receiving entity.\n* `in_process` - The e-invoice is currently being processed by the receiving entity.\n* `under_query` - The receiving entity has raised a query regarding the e-invoice. Additional information or clarification is required before proceeding.\n* `conditionally_accepted` - The e-invoice has been accepted with conditions.\n* `paid` - The receiving entity has confirmed that the e-invoice has been paid.\n", "enum" : [ "scheduled", "skipped", "in_progress", "success", "failed", "registered", "accepted", "rejected", "message_acknowledgement", "in_process", "under_query", "conditionally_accepted", "paid" ], "pattern" : "^\\[(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid)(,(scheduled|skipped|in_progress|success|failed|registered|accepted|rejected|message_acknowledgement|in_process|under_query|conditionally_accepted|paid))*\\]$", "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note" } }, "required" : [ "credit_note" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing credit_note
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/update" : { "post" : { "summary" : "Update Credit Note Details", "description" : "Updates the [custom fields](/docs/api/v2/pcv-1/advanced-features#custom-fields) and comment of a [credit note](/docs/api/v2/pcv-1/credit_notes).\n\nUse this operation to add or change custom field values, or to attach an internal comment, without modifying other credit note attributes. Pass at least one credit note custom field or `comment`; otherwise the credit note is returned unchanged. \n\n### Impacts\n\n**Credit note** \n* Updates any credit note [custom fields](/docs/api/v2/pcv-1/advanced-features#custom-fields) included in the request. Existing custom field values that you omit from the request are left unchanged.\n* Adds an internal [comment](/docs/api/v2/pcv-1/comments) when you pass `comment`.\n", "operationId" : "update_credit_note_details", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the credit note. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Credit Note PDF](/docs/api/credit_notes/retrieve-credit-note-as-pdf)\n.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/download_einvoice" : { "get" : { "summary" : "Download e-invoice for credit note", "description" : "Download the e-invoice for the credit note in both XML and PDF formats. The response consists of a `download` object for each format. The XML format follows the [structure as per Peppol BIS Billing v3.0](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/tree/). \n**Note**\n\n* You can only download e-invoices when their `status` is `success` or `registered`.\n* There are some cases in which the PDF is not available for download. In such cases, you can obtain it from the XML by decoding the value for [cbc:EmbeddedDocumentBinaryObject](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/cac-AdditionalDocumentReference/cac-Attachment/cbc-EmbeddedDocumentBinaryObject/), which is the Base64-encoded version of the PDF.\n", "operationId" : "download_e-invoice_for_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])\\.)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:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "downloads" : { "type" : "array", "description" : "Resource object representing download
", "items" : { "$ref" : "#/components/schemas/Download", "description" : "Resource object representing download" }, "example" : null } }, "required" : [ "downloads" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/resend_einvoice" : { "post" : { "summary" : "Resend failed einvoice in credit notes", "description" : "Resend failed einvoice in credit notes.\n", "operationId" : "resend_failed_einvoice_in_credit_notes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}/remove_tax_withheld_refund" : { "post" : { "summary" : "Remove tax withheld refunds from a credit note", "description" : "Removes a [linked_tax_withheld_refunds](/docs/api/credit_notes/credit_note-object#linked_tax_withheld_refunds)\nrecord from the `credit_note`\n.\n", "operationId" : "remove_tax_withheld_refunds_from_a_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]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(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "tax_withheld" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_withheld\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "An auto-generated unique identifier for the tax withheld. The value starts with the prefix `tax_wh_`.\nFor example, `tax_wh_16BdDXSlbu4uV1Ee6`\n.\n", "maxLength" : 40, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "tax_withheld" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/credit_notes/{credit-note-id}" : { "get" : { "summary" : "Retrieve a credit note", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nRetrieves the Credit Note identified by the specified Credit Note number.\n", "operationId" : "retrieve_a_credit_note", "parameters" : [ { "name" : "line_items_limit", "in" : "query", "description" : "Specify the maximum number of line items to include in the response. \n**Note:**\n\n* Applicable only when Enterprise-scale Invoicing is enabled.\n* Enterprise-scale Invoicing is currently in **Private Beta** . Please reach out to [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 100, "deprecated" : false, "maximum" : 300, "minimum" : 1, "example" : null } }, { "name" : "line_items_offset", "in" : "query", "description" : "Specify the starting point for retrieving line items. Use the value from the `line_items_next_offset` attribute of the previous retrieve API response. \n**Note:**\n\n* Applicable only when Enterprise-scale Invoicing is enabled.\n* Enterprise-scale Invoicing is currently in **Private Beta** . Please reach out to [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this feature.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 1000, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]{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9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "credit-note-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/credit-note-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" } }, "required" : [ "credit_note" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/unbilled_charges/{unbilled-charge-id}/delete" : { "post" : { "summary" : "Delete an unbilled charge", "description" : "Use this API to delete an unbilled charge by specifying the id of the charge.\n", "operationId" : "delete_an_unbilled_charge", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "unbilled-charge-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/unbilled-charge-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "unbilled_charge" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge
" } }, "required" : [ "unbilled_charge" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/unbilled_charges/invoice_now_estimate" : { "post" : { "summary" : "Create an estimate for unbilled charges", "description" : "This is similar to the \"Create an invoice for unbilled charges\" API but no invoice will be created, only an estimate for this operation is created.\n\nIn the estimate response,\n\n* **estimate.invoice_estimates** is an array of **estimate.invoice_estimate**. This has the details of the invoices that will be generated now.\n\n**Note:**\n\n* This API when invoked does not perform the actual operation. It just generates an estimate.\n* Both *subscription_id* and *customer_id* parameters should not be given at the same time.\n", "operationId" : "create_an_estimate_for_unbilled_charges", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "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-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this estimate needs to be created. Should be given if 'customer_id' is not specified.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for whom this estimate is created. Is given if 'subscription_id' is not specified. Applicable only if the 'Consolidated Invoicing' is enabled. If 'Consolidated Invoicing' is not enabled, an invoice will be generated for every subscription.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/unbilled_charges/invoice_unbilled_charges" : { "post" : { "summary" : "Create an invoice for unbilled charges", "description" : "Use this API to bill the [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). Available Credits and Excess Payments will automatically be applied while creating the invoice.\n\nIf the *Auto Collection* is turned on for the particular customer, the invoice will be created in payment_due state and the payment collection will be scheduled immediately.\n\nDuring invoice creation, the PO number for the line items will be filled from the subscription's current PO number, if available.\n\nIf no recurring item is present in the created invoice, the invoice will be marked as recurring=false.\n\nIf consolidated invoicing is enabled and the parameter 'customer_id' is passed, multiple invoices can be created based on the following factors.\n\n* Currency\n* PO number if 'Group by PO number' is enabled\n* Shipping address\n* Auto Collection\n* Payment method\n", "operationId" : "create_an_invoice_for_unbilled_charges", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer_id' is not specified.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for whom this invoice needs to be created. Should be specified if 'subscription_id' is not specified. Applicable only if the consolidated invoicing is enabled. .\n", "maxLength" : 50, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "invoices" : { "type" : "array", "description" : "Resource object representing invoice
", "items" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "example" : null } }, "required" : [ "invoices" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/unbilled_charges" : { "get" : { "summary" : "List unbilled charges", "description" : "This endpoint lists all the unbilled charges.\n", "operationId" : "list_unbilled_charges", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(?:(?:(?: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[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "If set to true, includes the deleted resources in the response. For the deleted resources in the response, the '**deleted**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "is_voided", "in" : "query", "description" : "Will be true if the charge has been voided. Usually the unbilled charge will be voided and revised to different charges(s) during proration.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nA unique identifier for the subscription this charge belongs to.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is\\] = \"5hjdk8nOpd0b12\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5hjdk8nOpd0b12", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nA unique identifier for the customer being charged.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"5hjdk8nOpd0b12\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5hjdk8nOpd0b12", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "unbilled_charge" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" } }, "required" : [ "unbilled_charge" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "unbilled_charges" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/orders" : { "get" : { "summary" : "List orders", "description" : "This API is used to retrieve a list of all the available orders.\n", "operationId" : "list_orders", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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}(?: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?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "If set to true, includes the deleted resources in the response. For the deleted resources in the response, the '**deleted**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "exclude_deleted_credit_notes", "in" : "query", "description" : "Flag to indicate whether deleted credit notes should be passed or not.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "deprecated" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUniquely identifies the order. It is the api identifier for the order.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is_not\\] = \"890\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "890", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "invoice_id", "in" : "query", "description" : "optional, string filter\n\nThe invoice number which acts as an identifier for invoice and is generated sequentially.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*invoice_id\\[is\\] = \"INVOICE_982\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "INVOICE_982", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nThe subscription for which the order is created.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*subscription_id\\[is_not\\] = \"null\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nThe status of this order. Possible values are : new, processing, complete, cancelled, voided, queued, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"queued\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "queued", "properties" : { "is" : { "type" : "string", "description" : "* `new` - Order has been created. Applicable only if you are using Chargebee's legacy order management system.\n* `processing` - Order is being processed. Applicable only if you are using Chargebee's legacy order management system\n* `complete` - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system\n* `cancelled` - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n* `voided` - Order has been voided. Applicable only if you are using Chargebee's legacy order management system\n* `queued` - Order is yet to be processed by any system, these are scheduled orders created by Chargebee\n* `awaiting_shipment` - The order has been picked up by an integration system, and synced to a shipping management platform\n* `on_hold` - The order is paused from being processed.\n* `delivered` - The order has been delivered to the customer.\n* `shipped` - The order has moved from order management system to a shipping system.\n* `partially_delivered` - The order has been partially delivered to the customer.\n* `returned` - The order has been returned after delivery.", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `new` - Order has been created. Applicable only if you are using Chargebee's legacy order management system.\n* `processing` - Order is being processed. Applicable only if you are using Chargebee's legacy order management system\n* `complete` - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system\n* `cancelled` - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n* `voided` - Order has been voided. Applicable only if you are using Chargebee's legacy order management system\n* `queued` - Order is yet to be processed by any system, these are scheduled orders created by Chargebee\n* `awaiting_shipment` - The order has been picked up by an integration system, and synced to a shipping management platform\n* `on_hold` - The order is paused from being processed.\n* `delivered` - The order has been delivered to the customer.\n* `shipped` - The order has moved from order management system to a shipping system.\n* `partially_delivered` - The order has been partially delivered to the customer.\n* `returned` - The order has been returned after delivery.", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "in" : { "type" : "string", "description" : "* `new` - Order has been created. Applicable only if you are using Chargebee's legacy order management system.\n* `processing` - Order is being processed. Applicable only if you are using Chargebee's legacy order management system\n* `complete` - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system\n* `cancelled` - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n* `voided` - Order has been voided. Applicable only if you are using Chargebee's legacy order management system\n* `queued` - Order is yet to be processed by any system, these are scheduled orders created by Chargebee\n* `awaiting_shipment` - The order has been picked up by an integration system, and synced to a shipping management platform\n* `on_hold` - The order is paused from being processed.\n* `delivered` - The order has been delivered to the customer.\n* `shipped` - The order has moved from order management system to a shipping system.\n* `partially_delivered` - The order has been partially delivered to the customer.\n* `returned` - The order has been returned after delivery.", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "pattern" : "^\\[(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned)(,(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `new` - Order has been created. Applicable only if you are using Chargebee's legacy order management system.\n* `processing` - Order is being processed. Applicable only if you are using Chargebee's legacy order management system\n* `complete` - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system\n* `cancelled` - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n* `voided` - Order has been voided. Applicable only if you are using Chargebee's legacy order management system\n* `queued` - Order is yet to be processed by any system, these are scheduled orders created by Chargebee\n* `awaiting_shipment` - The order has been picked up by an integration system, and synced to a shipping management platform\n* `on_hold` - The order is paused from being processed.\n* `delivered` - The order has been delivered to the customer.\n* `shipped` - The order has moved from order management system to a shipping system.\n* `partially_delivered` - The order has been partially delivered to the customer.\n* `returned` - The order has been returned after delivery.", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "pattern" : "^\\[(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned)(,(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned))*\\]$", "example" : null } } } }, { "name" : "shipping_date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThis is the date on which the order will be delivered to the customer.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*shipping_date\\[on\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "shipped_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe time at which the order was shipped.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*shipped_at\\[before\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "order_type", "in" : "query", "description" : "optional, enumerated string filter\n\nOrder type. Possible values are : manual, system_generated.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*order_type\\[is_not\\] = \"system_generated\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "system_generated", "properties" : { "is" : { "type" : "string", "description" : "* `manual` - The order has been created by the the user using Chargebee's legacy order management system.\n* `system_generated` - The order has been created by Chargebee automatically based on the preferences set by the user.", "enum" : [ "manual", "system_generated" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `manual` - The order has been created by the the user using Chargebee's legacy order management system.\n* `system_generated` - The order has been created by Chargebee automatically based on the preferences set by the user.", "enum" : [ "manual", "system_generated" ], "example" : null }, "in" : { "type" : "string", "description" : "* `manual` - The order has been created by the the user using Chargebee's legacy order management system.\n* `system_generated` - The order has been created by Chargebee automatically based on the preferences set by the user.", "enum" : [ "manual", "system_generated" ], "pattern" : "^\\[(manual|system_generated)(,(manual|system_generated))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `manual` - The order has been created by the the user using Chargebee's legacy order management system.\n* `system_generated` - The order has been created by Chargebee automatically based on the preferences set by the user.", "enum" : [ "manual", "system_generated" ], "pattern" : "^\\[(manual|system_generated)(,(manual|system_generated))*\\]$", "example" : null } } } }, { "name" : "order_date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe date on which the order will start getting processed.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*order_date\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "paid_on", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe timestamp indicating the date \\& time the order's invoice got paid.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*paid_on\\[before\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at .\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nThe time at which the order was created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "resent_status", "in" : "query", "description" : "optional, enumerated string filter\n\nResent order status. Possible values are : fully_resent, partially_resent.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*resent_status\\[is\\] = \"fully_resent\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "fully_resent", "properties" : { "is" : { "type" : "string", "description" : "* `fully_resent` - Order is Fully resent\n* `partially_resent` - Order is Partially resent", "enum" : [ "fully_resent", "partially_resent" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `fully_resent` - Order is Fully resent\n* `partially_resent` - Order is Partially resent", "enum" : [ "fully_resent", "partially_resent" ], "example" : null }, "in" : { "type" : "string", "description" : "* `fully_resent` - Order is Fully resent\n* `partially_resent` - Order is Partially resent", "enum" : [ "fully_resent", "partially_resent" ], "pattern" : "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `fully_resent` - Order is Fully resent\n* `partially_resent` - Order is Partially resent", "enum" : [ "fully_resent", "partially_resent" ], "pattern" : "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\]$", "example" : null } } } }, { "name" : "is_resent", "in" : "query", "description" : "optional, boolean filter\n\nOrder is resent order or not. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*is_resent\\[is\\] = \"false\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "false", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "original_order_id", "in" : "query", "description" : "optional, string filter\n\nIf resent order what is the parent order id.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*original_order_id\\[is\\] = \"1xRt6ifdr\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1xRt6ifdr", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order" } }, "required" : [ "order" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/orders/import_order" : { "post" : { "summary" : "Import an order", "description" : "Import an order for an invoice with one or more line items.\n", "operationId" : "import_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies the order. It is the api identifier for the order.\n\n\\*Order id will always be assigned incrementally from the last generated Order ID.\n\nIf Orders imported has an Order ID which is a string, Chargebee will just validate if the Order ID is unique\n\nRecommendation: For orders being imported, set the same prefix and the serial number that is used for the Document number, which will make this into a string. This will ensure that imported orders don't conflict with orders created by Chargebee. Chargebee will ensure there aren't orders with duplicate Order IDs.\\*\n.\n", "maxLength" : 40, "example" : null }, "document_number" : { "type" : "string", "deprecated" : false, "description" : "The order's serial number.\n\n*Document number passed cannot be greater than the series mentioned in the configuration. For instance, if you have set Document number series in Order Configurations with a Prefix as 'ORDER' and Starting number as '1000', orders up to the sequence number 'ORDER999' can be imported into Chargebee*\n\n*Recommendation: Set a different prefix at the Order Configuration, than the ones that are imported. If your Order Configuration has a Prefix of 'NEW', with Starting number as '1', i.e. 'NEW1', then, set Prefix for imported orders to be as 'OLD', with Starting number as '1', i.e, 'OLD1'*\n.\n", "maxLength" : 50, "example" : null }, "invoice_id" : { "type" : "string", "deprecated" : false, "description" : "The invoice number which acts as an identifier for invoice and is generated sequentially.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "deprecated" : false, "description" : "The status of this order.\n\n* shipped - The order has moved from order management system to a shipping system.\n* queued - Order is yet to be processed by any system, these are scheduled orders created by Chargebee\n* on_hold - The order is paused from being processed.\n* returned - The order has been returned after delivery.\n* delivered - The order has been delivered to the customer.\n* awaiting_shipment - The order has been picked up by an integration system, and synced to a shipping management platform\n* cancelled - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n* partially_delivered - The order has been partially delivered to the customer.\n", "enum" : [ "cancelled", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "The subscription for which the order is created.\n", "maxLength" : 50, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "The customer for which the order is created.\n", "maxLength" : 50, "example" : null }, "created_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was created.\n", "example" : null }, "order_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which the order will start getting processed.\n", "example" : null }, "shipping_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "This is the date on which the order has to be shipped to the customer.\n", "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is the same as the order id in the third party application.\n\n*Recommendation:\nIf this order is in any of these statuses, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned, and has already been processed, through a 3rd party system, and you have a reference id of the entity in the 3rd party tool, pass in the entity id to this field. If not, set the same prefix and the serial number that is used for the Document number, which will make this into a string.*\n\n*If this order hasn't been processed and is in 'queued' status, do not pass any value to this field. Chargebee, when it syncs your Orders through the fulfilment integrations such as Shipstation or Shopify, would auto assign the reference id from the connected system.*\n.\n", "maxLength" : 50, "example" : null }, "fulfillment_status" : { "type" : "string", "deprecated" : false, "description" : "The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.\n\n\\*If this order is in any of these statuses, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned, and has already been processed, through a 3rd party system, and you have a corresponding status from the 3rd party tool, pass in the status to this field.\n\nIf this order hasn't been processed and is in 'queued' status, do not pass any value to this field. Chargebee, when it syncs your Orders through the fulfilment integrations such as Shipstation or Shopify, would auto assign the fulfilment status from the connected system.\\*\n.\n", "maxLength" : 50, "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "The custom note for the order.\n", "maxLength" : 600, "example" : null }, "tracking_id" : { "type" : "string", "deprecated" : false, "description" : "The tracking id of the order.\n", "maxLength" : 50, "example" : null }, "tracking_url" : { "type" : "string", "deprecated" : false, "description" : "The tracking url of the order.\n", "maxLength" : 255, "example" : null }, "batch_id" : { "type" : "string", "deprecated" : false, "description" : "Unique id to identify a group of orders.\n", "maxLength" : 50, "example" : null }, "shipment_carrier" : { "type" : "string", "deprecated" : false, "description" : "Shipment carrier.\n", "maxLength" : 50, "example" : null }, "shipping_cut_off_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time after which an order becomes unservicable.\n", "example" : null }, "delivered_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was delivered.\n", "example" : null }, "shipped_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was shipped.\n", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was cancelled.\n", "example" : null }, "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "Cancellation reason.\n\n* shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice.\n* invoice_voided - The invoice for which the order was createed has been voided.\n* alternative_found - Alternative found.\n* others - Other reason\n* order_resent - Order resent\n* product_unsatisfactory - Product unsatisfactory.\n* delivery_date_missed - Delivery date missed.\n* subscription_cancelled - The subsctiption for which the order was created has been cancelled.\n* fraudulent_transaction - Fraudulent transaction.\n* invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state.\n* product_not_required - Product not required.\n* payment_declined - Payment declined.\n* product_not_available - Product not available.\n* third_party_cancellation - Third party cancellation.\n", "enum" : [ "shipping_cut_off_passed", "product_unsatisfactory", "third_party_cancellation", "product_not_required", "delivery_date_missed", "alternative_found", "invoice_written_off", "invoice_voided", "fraudulent_transaction", "payment_declined", "subscription_cancelled", "product_not_available", "others", "order_resent" ], "example" : null }, "refundable_credits_issued" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "If there are any credits that were issued at the order level, you can make use of the field, refundable_credits_issued. This will lead to Chargebee creating a Refundable Credit note against the order. When the next invoice is raised against the customer, this credit note will be utilised.\n", "minimum" : 0, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null } }, "required" : [ "created_at", "invoice_id", "order_date", "shipping_date", "status" ], "example" : null }, "encoding" : { "billing_address" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/orders/{order-id}/assign_order_number" : { "post" : { "summary" : "Assign order number", "description" : "Assigns order number to the order based on the settings, if not already assigned\n", "operationId" : "assign_order_number", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/orders/{order-id}/resend" : { "post" : { "summary" : "Resend an order", "description" : "Resend an existing order. This will help in resending an existing order in full or partial. Upto 5 resend operations are allowed per . When resent fully, the original order is canceled.\n", "operationId" : "resend_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-f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0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "shipping_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which the order should be shipped to the customer.\n", "example" : null }, "resend_reason" : { "type" : "string", "deprecated" : false, "description" : "Reason code for resending the order. Must be one from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Orders \\> Order Resend**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "order_line_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for order_line_items\n", "properties" : { "id" : { "type" : "array", "description" : "The identifier for the order line item.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "fulfillment_quantity" : { "type" : "array", "description" : "The quantity that is going to get fulfilled for this order\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "order_line_items" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/orders/{order-id}/reopen" : { "post" : { "summary" : "Reopen a cancelled order", "description" : "This API is used to re-open a cancelled order\n", "operationId" : "reopen_a_cancelled_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "void_cancellation_credit_notes" : { "type" : "boolean", "deprecated" : false, "description" : "Flag to void credit notes created for cancellation if they are unused.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/orders/{order-id}/cancel" : { "post" : { "summary" : "Cancel an order", "description" : "Cancel order and create a refundable credit note for the order\n", "operationId" : "cancel_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "Cancellation reason.\n\n* shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice.\n* alternative_found - Alternative found.\n* others - Other reason\n* product_unsatisfactory - Product unsatisfactory.\n* product_not_required - Product not required.\n* delivery_date_missed - Delivery date missed.\n* invoice_voided - The invoice for which the order was createed has been voided.\n* payment_declined - Payment declined.\n* product_not_available - Product not available.\n* subscription_cancelled - The subsctiption for which the order was created has been cancelled.\n* third_party_cancellation - Third party cancellation.\n* fraudulent_transaction - Fraudulent transaction.\n* order_resent - Order resent\n* invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state.\n", "enum" : [ "shipping_cut_off_passed", "product_unsatisfactory", "third_party_cancellation", "product_not_required", "delivery_date_missed", "alternative_found", "invoice_written_off", "invoice_voided", "fraudulent_transaction", "payment_declined", "subscription_cancelled", "product_not_available", "others", "order_resent" ], "example" : null }, "customer_notes" : { "type" : "string", "deprecated" : false, "description" : "The Customer Notes to be filled in the Credit Notes created to capture this refund detail.\n", "maxLength" : 2000, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Comment, if any, on the refund.\n", "maxLength" : 300, "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was cancelled.\n", "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Credit Note amount in cents.\n", "minimum" : 0, "example" : null } }, "example" : null } }, "required" : [ "cancellation_reason" ], "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/orders/{order-id}" : { "get" : { "summary" : "Retrieve an order", "description" : "Retrieves an order corresponding to the order id passed.\n", "operationId" : "retrieve_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|[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{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] }, "post" : { "summary" : "Update an order", "description" : "Updates an order. If the status of an order is changed while updating the order, the status_update_at attribute is set with the current time.\n", "operationId" : "update_an_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-f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2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Reference id is the unique identifier of the order in the shipping/order management application.\n", "maxLength" : 50, "example" : null }, "batch_id" : { "type" : "string", "deprecated" : false, "description" : "Unique id to identify a group of orders.\n", "maxLength" : 50, "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "The custom note for the order.\n", "maxLength" : 600, "example" : null }, "shipping_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date on which the order should be shipped to the customer.\n", "example" : null }, "order_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The order date.\n", "example" : null }, "cancelled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was cancelled.\n", "example" : null }, "cancellation_reason" : { "type" : "string", "deprecated" : false, "description" : "Cancellation reason.\n\n* shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice.\n* invoice_voided - The invoice for which the order was createed has been voided.\n* alternative_found - Alternative found.\n* others - Other reason\n* order_resent - Order resent\n* product_unsatisfactory - Product unsatisfactory.\n* delivery_date_missed - Delivery date missed.\n* subscription_cancelled - The subsctiption for which the order was created has been cancelled.\n* fraudulent_transaction - Fraudulent transaction.\n* invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state.\n* product_not_required - Product not required.\n* payment_declined - Payment declined.\n* product_not_available - Product not available.\n* third_party_cancellation - Third party cancellation.\n", "enum" : [ "shipping_cut_off_passed", "product_unsatisfactory", "third_party_cancellation", "product_not_required", "delivery_date_missed", "alternative_found", "invoice_written_off", "invoice_voided", "fraudulent_transaction", "payment_declined", "subscription_cancelled", "product_not_available", "others", "order_resent" ], "example" : null }, "shipped_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was shipped.\n", "example" : null }, "delivered_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the order was delivered.\n", "example" : null }, "tracking_url" : { "type" : "string", "deprecated" : false, "description" : "The tracking url of the order.\n", "maxLength" : 255, "example" : null }, "tracking_id" : { "type" : "string", "deprecated" : false, "description" : "The tracking id of the order.\n", "maxLength" : 50, "example" : null }, "shipment_carrier" : { "type" : "string", "deprecated" : false, "description" : "The carrier used to ship the goods to the customer. Ex:- FedEx.\n", "maxLength" : 50, "example" : null }, "fulfillment_status" : { "type" : "string", "deprecated" : false, "description" : "The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.\n", "maxLength" : 50, "example" : null }, "status" : { "type" : "string", "default" : "new", "deprecated" : false, "description" : "The order status.\n\n* voided - Order has been voided. Applicable only if you are using Chargebee's legacy order management system\n* complete - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system\n* shipped - The order has moved from order management system to a shipping system.\n* processing - Order is being processed. Applicable only if you are using Chargebee's legacy order management system\n* queued - Order is yet to be processed by any system, these are scheduled orders created by Chargebee\n* on_hold - The order is paused from being processed.\n* new - Order has been created. Applicable only if you are using Chargebee's legacy order management system.\n* returned - The order has been returned after delivery.\n* delivered - The order has been delivered to the customer.\n* awaiting_shipment - The order has been picked up by an integration system, and synced to a shipping management platform\n* cancelled - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system\n* partially_delivered - The order has been partially delivered to the customer.\n", "enum" : [ "new", "processing", "complete", "cancelled", "voided", "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned" ], "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "order_line_items" : { "type" : "object", "deprecated" : false, "description" : "Parameters for order_line_items\n", "properties" : { "id" : { "type" : "array", "description" : "The identifier for the order line item.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 40, "example" : null }, "example" : null }, "status" : { "type" : "array", "items" : { "type" : "string", "default" : "queued", "deprecated" : false, "description" : "The order line item's delivery status\n\n* shipped - The order line item has been shipped.\n* returned - The order has been returned after delivery.\n* queued - Not processed for shipping yet.\n* awaiting_shipment - Moved to shipping platform.\n* on_hold - The delivery has been moved to \"On hold\" status.\n* partially_delivered - The order has been partially delivered to the customer.\n* cancelled - The order has been returned after delivery.\n* delivered - The order line item has been delivered.\n", "enum" : [ "queued", "awaiting_shipment", "on_hold", "delivered", "shipped", "partially_delivered", "returned", "cancelled" ], "example" : null }, "example" : null }, "sku" : { "type" : "array", "description" : "The SKU code for the order line item product\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "order_line_items" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/orders/{order-id}/delete" : { "post" : { "summary" : "Delete an imported order", "description" : "Deletes only [Imported Order](/docs/api/v2/pcv-1/orders/import-an-order)\n.Delete does not happen if the order was refunded. It goes through if order refund was initiated and is in \"refund_due\" state.\n", "operationId" : "delete_an_imported_order", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/orders/{order-id}/create_refundable_credit_note" : { "post" : { "summary" : "Create a refundable credit note", "description" : "This API is used to create a refundable credit note for the order\n", "operationId" : "create_a_refundable_credit_note", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "order-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/order-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "customer_notes" : { "type" : "string", "deprecated" : false, "description" : "The Customer Notes to be filled in the Credit Notes created to capture this refund detail.\n", "maxLength" : 2000, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Comment, if any, on the refund.\n", "maxLength" : 300, "example" : null }, "credit_note" : { "type" : "object", "deprecated" : false, "description" : "Parameters for credit_note\n", "properties" : { "reason_code" : { "type" : "string", "deprecated" : false, "description" : "The reason for issuing this Credit Note. The following reason codes are supported now\\[Deprecated; use the [create_reason_code](/docs/api/credit_notes/credit_note-object#create_reason_code)\nparameter instead\\]\n\n* product_unsatisfactory - Product Unsatisfactory\n* chargeback - Can be set when you are recording your customer Chargebacks\n* service_unsatisfactory - Service Unsatisfactory\n* write_off -\n This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off)\n operation.\n* subscription_change -\n This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html)\n is enabled\n* fraudulent - FRAUDULENT\n* other - Can be set when none of the above reason codes are applicable\n* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation.\n* waiver - Waiver\n* order_cancellation - Order Cancellation\n* order_change - Order Change\n* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation\n", "enum" : [ "write_off", "subscription_change", "subscription_cancellation", "subscription_pause", "chargeback", "product_unsatisfactory", "service_unsatisfactory", "order_change", "order_cancellation", "waiver", "other", "fraudulent" ], "example" : null }, "total" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "description" : "Credit Note amount in cents.\n", "minimum" : 0, "example" : null } }, "required" : [ "reason_code", "total" ], "example" : null } }, "example" : null }, "encoding" : { "credit_note" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "order" : { "$ref" : "#/components/schemas/Order", "description" : "Resource object representing order
" } }, "required" : [ "order" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/gifts/{gift-id}/cancel" : { "post" : { "summary" : "Cancel a gift", "description" : "This API allows to cancel gifts. Only gift in 'scheduled' and 'unclaimed' states can be cancelled.\n", "operationId" : "cancel_a_gift", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "gift-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/gift-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "Resource object representing gift
" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/gifts/{gift-id}/update_gift" : { "post" : { "summary" : "Update a gift", "description" : "Updates the attributes of a gift. \n\n### Prerequisites \\& Constraints\n\n* The gift must be in the `scheduled` [status](/docs/api/gifts/gift-object#status).\n", "operationId" : "update_a_gift", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-9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])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "gift-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/gift-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The new date/time at which the gift notification email is to be sent. The value must be greater than the current time. If [`no_expiry`](/docs/api/gifts/gift-object#no_expiry) is false, the value must also be less than [`claim_expiry_date`](/docs/api/gifts/gift-object#claim_expiry_date).\n", "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal comment. The comments are not retrievable via API and are only available on request via [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).\n", "maxLength" : 250, "example" : null }, "gift_receiver" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gift_receiver.\n", "properties" : { "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address of the gift recipient. Must be a valid email address.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the recipient.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the recipient.\n", "maxLength" : 150, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "gift_receiver" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "Resource object representing gift
" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/gifts" : { "get" : { "summary" : "List gifts", "description" : "Retrieves the list of gifts.\n", "operationId" : "list_gifts", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(?:(?:(?:(?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25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nStatus of the gift. Possible values are : scheduled, unclaimed, claimed, cancelled, expired.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"claimed\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "claimed", "properties" : { "is" : { "type" : "string", "description" : "* `scheduled` - Gift has been scheduled.\n* `unclaimed` - Gift is not yet claimed and is ready to be claimed.\n* `claimed` - Gift is claimed.\n* `cancelled` - Gift is cancelled.\n* `expired` - Gift is expired.", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `scheduled` - Gift has been scheduled.\n* `unclaimed` - Gift is not yet claimed and is ready to be claimed.\n* `claimed` - Gift is claimed.\n* `cancelled` - Gift is cancelled.\n* `expired` - Gift is expired.", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "example" : null }, "in" : { "type" : "string", "description" : "* `scheduled` - Gift has been scheduled.\n* `unclaimed` - Gift is not yet claimed and is ready to be claimed.\n* `claimed` - Gift is claimed.\n* `cancelled` - Gift is cancelled.\n* `expired` - Gift is expired.", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "pattern" : "^\\[(scheduled|unclaimed|claimed|cancelled|expired)(,(scheduled|unclaimed|claimed|cancelled|expired))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `scheduled` - Gift has been scheduled.\n* `unclaimed` - Gift is not yet claimed and is ready to be claimed.\n* `claimed` - Gift is claimed.\n* `cancelled` - Gift is cancelled.\n* `expired` - Gift is expired.", "enum" : [ "scheduled", "unclaimed", "claimed", "cancelled", "expired" ], "pattern" : "^\\[(scheduled|unclaimed|claimed|cancelled|expired)(,(scheduled|unclaimed|claimed|cancelled|expired))*\\]$", "example" : null } } } }, { "name" : "gift_receiver", "in" : "query", "description" : "Parameters for gift_receiver\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "email" : { "type" : "object", "deprecated" : false, "description" : "Email of the receiver. All gift related emails are sent to this email.\n", "example" : "john@test.com", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } }, "customer_id" : { "type" : "object", "deprecated" : false, "description" : "Receiver customer id.\n", "example" : "1xRt6ifdr", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } }, { "name" : "gifter", "in" : "query", "description" : "Parameters for gifter\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "customer_id" : { "type" : "object", "deprecated" : false, "description" : "Gifter customer id.\n", "example" : "1xRt6ifdr", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "Resource object representing gift" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription" } }, "required" : [ "gift", "subscription" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing gift
" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/gifts/{gift-id}" : { "get" : { "summary" : "Retrieve a gift", "description" : "Retrieves a gift subscription. This API accepts the gift 'id' and returns the gift along with the subscription.\n", "operationId" : "retrieve_a_gift", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])\\.)*([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0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "gift-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/gift-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "Resource object representing gift
" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/gifts/{gift-id}/claim" : { "post" : { "summary" : "Claim a gift", "description" : "Claiming a gift will move the status to 'claimed'. Only gifts in 'unclaimed' state can be claimed.\n", "operationId" : "claim_a_gift", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|(?:(?:(?:(?:(?:[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:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "gift-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/gift-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "gift" : { "$ref" : "#/components/schemas/Gift", "description" : "Resource object representing gift
" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" } }, "required" : [ "gift", "subscription" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/transactions" : { "get" : { "summary" : "List transactions", "description" : "Lists all the transactions. \n**Note:**\n\nFor better query performance, we recommend using a `date` filter (for example, `date[after]` or `date[between]`) when listing transactions. If you are already filtering by `updated_at`, you do not need to also filter by `date`.\n", "operationId" : "list_transactions", "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])))))))|(?:(?:(?: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})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "If set to true, includes the deleted resources in the response. For the deleted resources in the response, the '**deleted**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUniquely identifies the transaction.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"txn_88ybdbsnvf2\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "txn_88ybdbsnvf2", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the customer for which this transaction is made.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"5hjdk8nOpd\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5hjdk8nOpd", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nIdentifier of the subscription for which this transaction is made.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is\\] = \"5hjdk8nOpd\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5hjdk8nOpd", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "payment_source_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on Transaction payment source id.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*payment_source_id\\[is\\] = \"pm_3Nl8XXUQUXDVFa2\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "pm_3Nl8XXUQUXDVFa2", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "payment_method", "in" : "query", "description" : "optional, enumerated string filter\n\nThe payment method of this transaction. Possible values are : card, cash, check, chargeback, bank_transfer, amazon_payments, paypal_express_checkout, direct_debit, alipay, alipay_hk, gcash, dana, touch_n_go, tamara, qpay, unionpay, apple_pay, wechat_pay, ach_credit, sepa_credit, ideal, google_pay, sofort, bancontact, giropay, dotpay, other, upi, netbanking_emandates.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*payment_method\\[is\\] = \"card\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "card", "properties" : { "is" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund).\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay\n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo\n* `pay_to` - PayTo\n* `faster_payments` - Faster Payments\n* `sepa_instant_transfer` - Sepa Instant Transfer\n* `automated_bank_transfer` - Automated Bank Transfer\n* `klarna_pay_now` - Klarna Pay Now\n* `online_banking_poland` - Online Banking Poland\n* `payconiq_by_bancontact` - Payconiq by Bancontact\n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin\n* `kakao_pay` - Kakao Pay\n* `naver_pay` - Naver Pay\n* `revolut_pay` - Revolut Pay\n* `cash_app_pay` - Cash App Pay\n* `pix` - Payments made via Pix\n* `twint` - Twint\n* `go_pay` - Go Pay\n* `grab_pay` - Grab Pay\n* `pay_co` - Pay Co\n* `after_pay` - After Pay\n* `swish` - Swish\n* `payme` - PayMe\n* `klarna` - Payments made via Klarna\n* `alipay_hk` - Alipay HK\n* `paypay` - PayPay\n* `gcash` - GCash\n* `south_korean_cards` - Payments made via South Korean Cards\n* `paynow` - Payments made via PayNow\n* `bizum` - Payments made via Bizum\n* `promptpay` - Payments made via PromptPay\n* `dana` - Dana\n* `touch_n_go` - Touch 'n Go\n* `tamara` - Tamara\n* `qpay` - Qpay\n", "enum" : [ "card", "cash", "check", "chargeback", "bank_transfer", "amazon_payments", "paypal_express_checkout", "direct_debit", "alipay", "unionpay", "apple_pay", "wechat_pay", "ach_credit", "sepa_credit", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "other", "upi", "netbanking_emandates", "custom", "boleto", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund).\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay\n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo\n* `pay_to` - PayTo\n* `faster_payments` - Faster Payments\n* `sepa_instant_transfer` - Sepa Instant Transfer\n* `automated_bank_transfer` - Automated Bank Transfer\n* `klarna_pay_now` - Klarna Pay Now\n* `online_banking_poland` - Online Banking Poland\n* `payconiq_by_bancontact` - Payconiq by Bancontact\n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin\n* `kakao_pay` - Kakao Pay\n* `naver_pay` - Naver Pay\n* `revolut_pay` - Revolut Pay\n* `cash_app_pay` - Cash App Pay\n* `pix` - Payments made via Pix\n* `twint` - Twint\n* `go_pay` - Go Pay\n* `grab_pay` - Grab Pay\n* `pay_co` - Pay Co\n* `after_pay` - After Pay\n* `swish` - Swish\n* `payme` - PayMe\n* `klarna` - Payments made via Klarna\n* `alipay_hk` - Alipay HK\n* `paypay` - PayPay\n* `gcash` - GCash\n* `south_korean_cards` - Payments made via South Korean Cards\n* `paynow` - Payments made via PayNow\n* `bizum` - Payments made via Bizum\n* `promptpay` - Payments made via PromptPay\n* `dana` - Dana\n* `touch_n_go` - Touch 'n Go\n* `tamara` - Tamara\n* `qpay` - Qpay\n", "enum" : [ "card", "cash", "check", "chargeback", "bank_transfer", "amazon_payments", "paypal_express_checkout", "direct_debit", "alipay", "unionpay", "apple_pay", "wechat_pay", "ach_credit", "sepa_credit", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "other", "upi", "netbanking_emandates", "custom", "boleto", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "in" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund).\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay\n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo\n* `pay_to` - PayTo\n* `faster_payments` - Faster Payments\n* `sepa_instant_transfer` - Sepa Instant Transfer\n* `automated_bank_transfer` - Automated Bank Transfer\n* `klarna_pay_now` - Klarna Pay Now\n* `online_banking_poland` - Online Banking Poland\n* `payconiq_by_bancontact` - Payconiq by Bancontact\n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin\n* `kakao_pay` - Kakao Pay\n* `naver_pay` - Naver Pay\n* `revolut_pay` - Revolut Pay\n* `cash_app_pay` - Cash App Pay\n* `pix` - Payments made via Pix\n* `twint` - Twint\n* `go_pay` - Go Pay\n* `grab_pay` - Grab Pay\n* `pay_co` - Pay Co\n* `after_pay` - After Pay\n* `swish` - Swish\n* `payme` - PayMe\n* `klarna` - Payments made via Klarna\n* `alipay_hk` - Alipay HK\n* `paypay` - PayPay\n* `gcash` - GCash\n* `south_korean_cards` - Payments made via South Korean Cards\n* `paynow` - Payments made via PayNow\n* `bizum` - Payments made via Bizum\n* `promptpay` - Payments made via PromptPay\n* `dana` - Dana\n* `touch_n_go` - Touch 'n Go\n* `tamara` - Tamara\n* `qpay` - Qpay\n", "enum" : [ "card", "cash", "check", "chargeback", "bank_transfer", "amazon_payments", "paypal_express_checkout", "direct_debit", "alipay", "unionpay", "apple_pay", "wechat_pay", "ach_credit", "sepa_credit", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "other", "upi", "netbanking_emandates", "custom", "boleto", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "pattern" : "^\\[(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `card` - Card\n* `cash` - Cash\n* `check` - Check\n* `chargeback` - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund).\n* `bank_transfer` - Bank Transfer\n* `amazon_payments` - Amazon Payments\n* `paypal_express_checkout` - Paypal Express Checkout\n* `direct_debit` - Direct Debit\n* `alipay` - Alipay\n* `unionpay` - Unionpay\n* `apple_pay` - Apple Pay\n* `wechat_pay` - WeChat Pay\n* `ach_credit` - ACH Credit\n* `sepa_credit` - SEPA Credit\n* `ideal` - IDEAL\n* `google_pay` - Google Pay\n* `sofort` - Sofort\n* `bancontact` - Bancontact\n* `giropay` - giropay\n* `dotpay` - Dotpay\n* `other` - Payment Methods other than the above types\n* `app_store` - **(Deprecated)** App Store\n* `upi` - upi\n* `netbanking_emandates` - netbanking_emandates\n* `play_store` - **(Deprecated)** Play Store\n* `custom` - Custom\n* `boleto` - boleto\n* `venmo` - Venmo\n* `pay_to` - PayTo\n* `faster_payments` - Faster Payments\n* `sepa_instant_transfer` - Sepa Instant Transfer\n* `automated_bank_transfer` - Automated Bank Transfer\n* `klarna_pay_now` - Klarna Pay Now\n* `online_banking_poland` - Online Banking Poland\n* `payconiq_by_bancontact` - Payconiq by Bancontact\n* `electronic_payment_standard` - Payments made via Electronic Payment Standard.\n* `kbc_payment_button` - Payments made via KBC Payment Button.\n* `pay_by_bank` - Payments made via Pay By Bank.\n* `trustly` - Payments made via Trustly.\n* `stablecoin` - Stablecoin\n* `kakao_pay` - Kakao Pay\n* `naver_pay` - Naver Pay\n* `revolut_pay` - Revolut Pay\n* `cash_app_pay` - Cash App Pay\n* `pix` - Payments made via Pix\n* `twint` - Twint\n* `go_pay` - Go Pay\n* `grab_pay` - Grab Pay\n* `pay_co` - Pay Co\n* `after_pay` - After Pay\n* `swish` - Swish\n* `payme` - PayMe\n* `klarna` - Payments made via Klarna\n* `alipay_hk` - Alipay HK\n* `paypay` - PayPay\n* `gcash` - GCash\n* `south_korean_cards` - Payments made via South Korean Cards\n* `paynow` - Payments made via PayNow\n* `bizum` - Payments made via Bizum\n* `promptpay` - Payments made via PromptPay\n* `dana` - Dana\n* `touch_n_go` - Touch 'n Go\n* `tamara` - Tamara\n* `qpay` - Qpay\n", "enum" : [ "card", "cash", "check", "chargeback", "bank_transfer", "amazon_payments", "paypal_express_checkout", "direct_debit", "alipay", "unionpay", "apple_pay", "wechat_pay", "ach_credit", "sepa_credit", "ideal", "google_pay", "sofort", "bancontact", "giropay", "dotpay", "other", "upi", "netbanking_emandates", "custom", "boleto", "venmo", "pay_to", "faster_payments", "sepa_instant_transfer", "automated_bank_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "pix", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "pattern" : "^\\[(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay)(,(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now|online_banking_poland|payconiq_by_bancontact|electronic_payment_standard|kbc_payment_button|pay_by_bank|trustly|stablecoin|kakao_pay|naver_pay|revolut_pay|cash_app_pay|pix|twint|go_pay|grab_pay|pay_co|after_pay|swish|payme|klarna|alipay_hk|paypay|gcash|south_korean_cards|paynow|bizum|promptpay|dana|touch_n_go|tamara|qpay))*\\]$", "example" : null } } } }, { "name" : "gateway", "in" : "query", "description" : "optional, enumerated string filter\n\nGateway through which this transaction was done. Applicable only for 'Card' Payment Method. Possible values are : chargebee, chargebee_payments, stripe, wepay, braintree, authorize_net, paypal_pro, pin, eway, eway_rapid, worldpay, balanced_payments, beanstream, bluepay, elavon, first_data_global, hdfc, migs, nmi, ogone, paymill, paypal_payflow_pro, sage_pay, tco, wirecard, amazon_payments, paypal_express_checkout, gocardless, adyen, orbital, moneris_us, moneris, bluesnap, cybersource, vantiv, checkout_com, paypal, ingenico_direct, exact, mollie, quickbooks, razorpay, not_applicable.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*gateway\\[is_not\\] = \"stripe\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "stripe", "properties" : { "is" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `razorpay` - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `nuvei` - Nuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses.\n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses.\n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline.\n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different `payment_source_type`.\n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network.\n* `ezidebit` -\n Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. \n Ezidebit is in beta.\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "stripe", "wepay", "braintree", "authorize_net", "paypal_pro", "pin", "eway", "eway_rapid", "worldpay", "balanced_payments", "beanstream", "bluepay", "elavon", "first_data_global", "hdfc", "migs", "nmi", "ogone", "paymill", "paypal_payflow_pro", "sage_pay", "tco", "wirecard", "amazon_payments", "paypal_express_checkout", "gocardless", "orbital", "moneris_us", "moneris", "bluesnap", "cybersource", "vantiv", "checkout_com", "paypal", "ingenico_direct", "exact", "mollie", "quickbooks", "razorpay", "global_payments", "bank_of_america", "ecentric", "metrics_global", "windcave", "pay_com", "ebanx", "dlocal", "nuvei", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `razorpay` - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `nuvei` - Nuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses.\n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses.\n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline.\n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different `payment_source_type`.\n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network.\n* `ezidebit` -\n Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. \n Ezidebit is in beta.\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "stripe", "wepay", "braintree", "authorize_net", "paypal_pro", "pin", "eway", "eway_rapid", "worldpay", "balanced_payments", "beanstream", "bluepay", "elavon", "first_data_global", "hdfc", "migs", "nmi", "ogone", "paymill", "paypal_payflow_pro", "sage_pay", "tco", "wirecard", "amazon_payments", "paypal_express_checkout", "gocardless", "orbital", "moneris_us", "moneris", "bluesnap", "cybersource", "vantiv", "checkout_com", "paypal", "ingenico_direct", "exact", "mollie", "quickbooks", "razorpay", "global_payments", "bank_of_america", "ecentric", "metrics_global", "windcave", "pay_com", "ebanx", "dlocal", "nuvei", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "example" : null }, "in" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `razorpay` - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `nuvei` - Nuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses.\n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses.\n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline.\n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different `payment_source_type`.\n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network.\n* `ezidebit` -\n Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. \n Ezidebit is in beta.\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "stripe", "wepay", "braintree", "authorize_net", "paypal_pro", "pin", "eway", "eway_rapid", "worldpay", "balanced_payments", "beanstream", "bluepay", "elavon", "first_data_global", "hdfc", "migs", "nmi", "ogone", "paymill", "paypal_payflow_pro", "sage_pay", "tco", "wirecard", "amazon_payments", "paypal_express_checkout", "gocardless", "orbital", "moneris_us", "moneris", "bluesnap", "cybersource", "vantiv", "checkout_com", "paypal", "ingenico_direct", "exact", "mollie", "quickbooks", "razorpay", "global_payments", "bank_of_america", "ecentric", "metrics_global", "windcave", "pay_com", "ebanx", "dlocal", "nuvei", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "pattern" : "^\\[(chargebee|chargebee_payments|adyen|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable)(,(chargebee|chargebee_payments|adyen|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `chargebee` - Chargebee test gateway.\n* `chargebee_payments` - Chargebee Pay gateway\n* `adyen` - Adyen is a payment gateway.\n* `stripe` - Stripe is a payment gateway.\n* `wepay` - WePay is a payment gateway.\n* `braintree` - Braintree is a payment gateway.\n* `authorize_net` - Authorize.net is a payment gateway\n* `paypal_pro` - PayPal Pro Account is a payment gateway.\n* `pin` - Pin is a payment gateway\n* `eway` - eWAY Account is a payment gateway.\n* `eway_rapid` - eWAY Rapid is a payment gateway.\n* `worldpay` - WorldPay is a payment gateway\n* `balanced_payments` - Balanced is a payment gateway\n* `beanstream` - Bambora(formerly known as Beanstream) is a payment gateway.\n* `bluepay` - BluePay is a payment gateway.\n* `elavon` - Elavon Virtual Merchant is a payment solution.\n* `first_data_global` - First Data Global Gateway Virtual Terminal Account\n* `hdfc` - HDFC Account is a payment gateway.\n* `migs` - MasterCard Internet Gateway Service payment gateway.\n* `nmi` - NMI is a payment gateway.\n* `ogone` - Ingenico ePayments (formerly known as Ogone) is a payment gateway.\n* `paymill` - PAYMILL is a payment gateway.\n* `paypal_payflow_pro` - PayPal Payflow Pro is a payment gateway.\n* `sage_pay` - Sage Pay is a payment gateway.\n* `tco` - 2Checkout is a payment gateway.\n* `wirecard` - WireCard Account is a payment service provider.\n* `amazon_payments` - Amazon Payments is a payment service provider.\n* `paypal_express_checkout` - PayPal Express Checkout is a payment gateway.\n* `gocardless` - GoCardless is a payment service provider.\n* `orbital` - Chase Paymentech(Orbital) is a payment gateway.\n* `moneris_us` - Moneris USA is a payment gateway.\n* `moneris` - Moneris is a payment gateway.\n* `bluesnap` - BlueSnap is a payment gateway.\n* `cybersource` - CyberSource is a payment gateway.\n* `vantiv` - Vantiv is a payment gateway.\n* `checkout_com` - Checkout.com is a payment gateway.\n* `paypal` - PayPal Commerce is a payment gateway.\n* `ingenico_direct` - Worldline Online Payments is a payment gateway.\n* `exact` - Exact Payments is a payment gateway.\n* `mollie` - Mollie is a payment gateway.\n* `quickbooks` - Intuit QuickBooks Payments gateway\n* `razorpay` - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc.\n* `global_payments` - Global Payments is a payment service provider.\n* `bank_of_america` - Bank of America Gateway\n* `ecentric` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities.\n* `metrics_global` - Metrics global is a leading payment service provider providing unified payment services in the US.\n* `windcave` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets.\n* `pay_com` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes.\n* `ebanx` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.\n* `dlocal` - Dlocal provides payment solutions for global commerce by accepting local payment methods.\n* `nuvei` - Nuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses.\n* `solidgate` - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses.\n* `paystack` - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline.\n* `jp_morgan` - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different `payment_source_type`.\n* `deutsche_bank` - Deutsche Bank is the leading German bank with strong European roots and a global network.\n* `ezidebit` -\n Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. \n Ezidebit is in beta.\n* `twikey` - Twikey is a payment gateway that provides automated payment collection and mandate management solutions.\n* `tempus` - Tempus Technologies is a payment gateway and payments technology provider offering secure payment processing with end-to-end encryption (P2PE) and tokenization.\n* `moyasar` - Moyasar is a fully integrated online payment services that makes accepting payments simple and secure\n* `payway` - Payway is a payment gateway that enables secure card and payment acceptance.\n* `not_applicable` - Indicates that payment gateway is not applicable for this resource.\n", "enum" : [ "chargebee", "chargebee_payments", "adyen", "stripe", "wepay", "braintree", "authorize_net", "paypal_pro", "pin", "eway", "eway_rapid", "worldpay", "balanced_payments", "beanstream", "bluepay", "elavon", "first_data_global", "hdfc", "migs", "nmi", "ogone", "paymill", "paypal_payflow_pro", "sage_pay", "tco", "wirecard", "amazon_payments", "paypal_express_checkout", "gocardless", "orbital", "moneris_us", "moneris", "bluesnap", "cybersource", "vantiv", "checkout_com", "paypal", "ingenico_direct", "exact", "mollie", "quickbooks", "razorpay", "global_payments", "bank_of_america", "ecentric", "metrics_global", "windcave", "pay_com", "ebanx", "dlocal", "nuvei", "solidgate", "paystack", "jp_morgan", "deutsche_bank", "ezidebit", "twikey", "tempus", "moyasar", "payway", "not_applicable" ], "pattern" : "^\\[(chargebee|chargebee_payments|adyen|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable)(,(chargebee|chargebee_payments|adyen|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|solidgate|paystack|jp_morgan|deutsche_bank|ezidebit|twikey|tempus|moyasar|payway|not_applicable))*\\]$", "example" : null } } } }, { "name" : "gateway_account_id", "in" : "query", "description" : "optional, string filter\n\nThe gateway account used for this transaction.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*gateway_account_id\\[is\\] = \"gw_3Nl9BNeQ7438Ks1\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "gw_3Nl9BNeQ7438Ks1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "id_at_gateway", "in" : "query", "description" : "optional, string filter\n\nThe id with which this transaction is referred in gateway.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*id_at_gateway\\[is_not\\] = \"txn_5678HJS89900\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "txn_5678HJS89900", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "reference_number", "in" : "query", "description" : "optional, string filter\n\nThe reference number for this transaction. For example, the check number when [payment_method](/docs/api/transactions/transaction-object#payment_method)\n= `check`\n.\n**Supported operators :**\nis, is_not, starts_with, is_present\n\n**Example →**\n*reference_number\\[is\\] = \"cus_u239732\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "cus_u239732", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nType of the transaction. Possible values are : authorization, payment, refund, payment_reversal.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is\\] = \"payment\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "payment", "properties" : { "is" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources).\n* `payment` - The transaction represents capture of [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources).\n* `refund` - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer's [payment_source](payment_sources).\n* `payment_reversal` - Indicates a reversal transaction.\n", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources).\n* `payment` - The transaction represents capture of [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources).\n* `refund` - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer's [payment_source](payment_sources).\n* `payment_reversal` - Indicates a reversal transaction.\n", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "example" : null }, "in" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources).\n* `payment` - The transaction represents capture of [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources).\n* `refund` - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer's [payment_source](payment_sources).\n* `payment_reversal` - Indicates a reversal transaction.\n", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "pattern" : "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `authorization` - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources).\n* `payment` - The transaction represents capture of [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources).\n* `refund` - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer's [payment_source](payment_sources).\n* `payment_reversal` - Indicates a reversal transaction.\n", "enum" : [ "authorization", "payment", "refund", "payment_reversal" ], "pattern" : "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\]$", "example" : null } } } }, { "name" : "date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nIndicates when this transaction occurred.\nWe recommend using this filter when listing transactions for better query performance. It is advisable when using this filter, to pass the `sort_by`\ninput parameter as `date`\nfor a faster response.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*date\\[before\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "amount", "in" : "query", "description" : "optional, in cents filter\n\nAmount for this transaction.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount\\[is\\] = \"1200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "amount_capturable", "in" : "query", "description" : "optional, in cents filter\n\nTo filter based on transaction's unused authorized/blocked amount.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*amount_capturable\\[gte\\] = \"1200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nThe status of this transaction. Possible values are : in_progress, success, voided, failure, timeout, needs_attention.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is_not\\] = \"success\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "success", "properties" : { "is" : { "type" : "string", "description" : "* `in_progress` - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.\n* `success` - The transaction is successful.\n* `voided` - The transaction got voided or authorization expired at gateway.\n* `failure` - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure\n* `timeout` - Transaction failed because of Gateway not accepting the connection.\n* `needs_attention` - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually\n* `late_failure` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `in_progress` - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.\n* `success` - The transaction is successful.\n* `voided` - The transaction got voided or authorization expired at gateway.\n* `failure` - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure\n* `timeout` - Transaction failed because of Gateway not accepting the connection.\n* `needs_attention` - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually\n* `late_failure` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "example" : null }, "in" : { "type" : "string", "description" : "* `in_progress` - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.\n* `success` - The transaction is successful.\n* `voided` - The transaction got voided or authorization expired at gateway.\n* `failure` - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure\n* `timeout` - Transaction failed because of Gateway not accepting the connection.\n* `needs_attention` - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually\n* `late_failure` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "pattern" : "^\\[(in_progress|success|voided|failure|timeout|needs_attention|late_failure)(,(in_progress|success|voided|failure|timeout|needs_attention|late_failure))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `in_progress` - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method.\n* `success` - The transaction is successful.\n* `voided` - The transaction got voided or authorization expired at gateway.\n* `failure` - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure\n* `timeout` - Transaction failed because of Gateway not accepting the connection.\n* `needs_attention` - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually\n* `late_failure` - This status indicates that late failure has been recorded for the transaction that has encountered success state in the previous stage.\n", "enum" : [ "in_progress", "success", "voided", "failure", "timeout", "needs_attention", "late_failure" ], "pattern" : "^\\[(in_progress|success|voided|failure|timeout|needs_attention|late_failure)(,(in_progress|success|voided|failure|timeout|needs_attention|late_failure))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on `updated_at`.\nThis attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the `sort_by`\ninput parameter as `updated_at`\nfor a faster response.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[before\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate, updated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date", "updated_at" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "transaction" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing transaction
" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/transactions/{transaction-id}" : { "get" : { "summary" : "Retrieve a transaction", "description" : "Retrieve a transaction identified by its unique id.\n", "operationId" : "retrieve_a_transaction", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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"name" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/transactions/{transaction-id}/refund" : { "post" : { "summary" : "Refund a payment", "description" : "Refunds an online payment. Applicable only for `transaction`s of [type](/docs/api/transactions/transaction-object#type) = `payment`. You can only refund a `transaction` whose [status](/docs/api/transactions/transaction-object#status) is `success`. \n* Not supported for ach_credit, sepa_credit, cash, check, bank_transfer, other.\n* Contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this endpoint.\n", "operationId" : "refund_a_payment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be refunded. Must not exceed [amount_unused](/docs/api/transactions/transaction-object#amount_unused).\nIf not passed then all of [amount_unused](/docs/api/transactions/transaction-object#amount_unused)\nis refunded.\n", "minimum" : 1, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the refund.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/transactions/{transaction-id}/record_refund" : { "post" : { "summary" : "Record an offline refund", "description" : "Records a refund made offline. Applicable only for `transaction`s of [type](/docs/api/transactions/transaction-object#type) = `payment`.\n", "operationId" : "record_an_offline_refund", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be recorded as refunded. Must not exceed [amount_unused](/docs/api/transactions/transaction-object#amount_unused).\nIf not passed then all of [amount_unused](/docs/api/transactions/transaction-object#amount_unused)\nis recorded as refunded.\n", "minimum" : 1, "example" : null }, "payment_method" : { "type" : "string", "deprecated" : false, "description" : "The payment method used to make the refund.\n\n* check - Check\n* cash - Cash\n* custom - Custom\n* chargeback -\n Only applicable for a transaction of [type](/docs/api/transactions/transaction-object#type)\n = `refund`.\n This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process)\n occurs. You can also set this explicitly when [recording a refund](/docs/api/transactions/record-an-offline-refund)\n .\n* other - Payment Methods other than the above types\n* bank_transfer - Bank Transfer\n", "enum" : [ "cash", "check", "chargeback", "bank_transfer", "other", "custom", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the refund was made.\n", "example" : null }, "reference_number" : { "type" : "string", "deprecated" : false, "description" : "The reference number for this transaction. For example, the check number when `payment_method`\n= `check`\n.\n", "maxLength" : 100, "example" : null }, "custom_payment_method_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the custom payment method of this transaction.\n", "maxLength" : 50, "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "Remarks, if any, on the refund.\n", "maxLength" : 300, "example" : null } }, "required" : [ "date", "payment_method" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/transactions/{transaction-id}/void" : { "post" : { "summary" : "Void an authorization transaction", "description" : "This API voids the specific authorization transaction in order to release the blocked funds from the customer's card. Voiding an already captured or voided transaction is not possible.\n", "operationId" : "void_an_authorization_transaction", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "transaction-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/transaction-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/transactions/create_authorization" : { "post" : { "summary" : "Create an authorization payment", "description" : "Authorizes a specific amount in customer's Credit card, which can be collected within a span of time. Read more on authorization and capture [here](https://www.chargebee.com/docs/payments/1.0/payment-gateways-and-configuration/stripe#auth-and-capture). \n* Supported only for Card payments.\n* Currently supported only for **Stripe**.\n", "operationId" : "create_an_authorization_payment", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source to be used for authorizing the transaction.\n", "maxLength" : 40, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the transaction amount.\n", "maxLength" : 3, "example" : null }, "amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The amount to be blocked.\n", "minimum" : 1, "example" : null } }, "required" : [ "amount", "customer_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/invoices/{invoice-id}/payments" : { "get" : { "summary" : "List payments for an invoice", "description" : "Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \\& automatic) made for this invoice.\n", "operationId" : "list_payments_for_an_invoice", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "invoice-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/invoice-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "transaction" : { "$ref" : "#/components/schemas/Transaction", "description" : "Resource object representing transaction
" } }, "required" : [ "transaction" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing transaction
" } }, "required" : [ "transaction" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/extend_subscription" : { "post" : { "summary" : "Extend subscription", "description" : "This API generates a hosted page URL to extend the billing cycle of a subscription.\n\nUse one of the following methods to open the hosted page:\n\n* **In-app modal** : Use Chargebee.js [`openCheckout()`](https://www.chargebee.com/checkout-portal-docs/cbinstanceobj-api-ref.html#opencheckout-options) to open the hosted page in a modal popup in your website or application.\n* **Standalone page** : Redirect the customer to the hosted page `url`.\n\nDo not embed the hosted page in your own [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/iframe).\n", "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 } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "expiry" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Expiry (in days) for the link generated. No expiry will be set if this is not specified.\n", "maximum" : 500, "minimum" : 1, "example" : null }, "billing_cycle" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles to extend. If not specified, plan's billing cycle will be used.\n", "minimum" : 1, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/events" : { "post" : { "summary" : "Notify an event", "description" : "Use this API to notify Chargebee about important events that occur on your web pages, such as subscription cancellations. An event contains data about affected resources and additional details such as when the change occurred.\n", "operationId" : "notify_an_event", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "event_name" : { "type" : "string", "deprecated" : false, "description" : "The event that need to passed to a different system.\n\n* cancellation_page_loaded - Indicates native cancellation flow provided by the merchant is loaded rather than the retention flow.\n", "enum" : [ "cancellation_page_loaded" ], "example" : null }, "occurred_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Timestamp indicating when this event had occurred.\n.\n", "example" : null }, "event_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "The meta data description of the event in key-value pair. The value is a JSON object with the following keys and their values.\n\n* `subscription_id`: A unique and immutable identifier for the subscription. .\n", "example" : null } }, "required" : [ "event_data", "event_name" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "success" : { "type" : "boolean", "deprecated" : false, "description" : "Event was processed successfully
", "example" : null } }, "required" : [ "success" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages" : { "get" : { "summary" : "List hosted pages", "description" : "This API retrieves the list of hosted page resources.\n", "operationId" : "list_hosted_pages", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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}(?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(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUnique identifier generated for each hosted page requested.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"Edi69nxpu6BeGBd9Fjcd0tqCSwb0sRcuKa\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Edi69nxpu6BeGBd9Fjcd0tqCSwb0sRcuKa", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "type", "in" : "query", "description" : "optional, enumerated string filter\n\nType of the requested hosted page. Possible values are : checkout_new, checkout_existing, update_payment_method, manage_payment_sources, collect_now, extend_subscription, checkout_gift, claim_gift, checkout_one_time, pre_cancel.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*type\\[is_not\\] = \"checkout_new\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "checkout_new", "properties" : { "is" : { "type" : "string", "description" : "* `checkout_new` - Checkout new Subscription\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_gift` - Checkout a gift subscription\n* `claim_gift` - Claim a gift subscription\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", "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\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_gift` - Checkout a gift subscription\n* `claim_gift` - Claim a gift subscription\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", "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\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_gift` - Checkout a gift subscription\n* `claim_gift` - Claim a gift subscription\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", "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\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_gift` - Checkout a gift subscription\n* `claim_gift` - Claim a gift subscription\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", "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 } } } }, { "name" : "state", "in" : "query", "description" : "optional, enumerated string filter\n\nIndicating the current state of the hosted page resource. Possible values are : created, requested, succeeded, cancelled, acknowledged.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*state\\[is_not\\] = \"succeeded\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "succeeded", "properties" : { "is" : { "type" : "string", "description" : "* `created` - Indicates the hosted page is just created.\n* `requested` - Indicates the hosted page is requested by the website\n* `succeeded` - Indicates the hosted page is successfully submitted by the user and response is sent to the return url.\n* `cancelled` - Indicates the page is cancelled by the end user after requesting it.\n* `failed` - **(Deprecated)** Indicates the page submition is failed and response is sent to the return url.\n* `acknowledged` - Indicates the succeeded hosted page is acknowledged.", "enum" : [ "created", "requested", "succeeded", "cancelled", "acknowledged" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `created` - Indicates the hosted page is just created.\n* `requested` - Indicates the hosted page is requested by the website\n* `succeeded` - Indicates the hosted page is successfully submitted by the user and response is sent to the return url.\n* `cancelled` - Indicates the page is cancelled by the end user after requesting it.\n* `failed` - **(Deprecated)** Indicates the page submition is failed and response is sent to the return url.\n* `acknowledged` - Indicates the succeeded hosted page is acknowledged.", "enum" : [ "created", "requested", "succeeded", "cancelled", "acknowledged" ], "example" : null }, "in" : { "type" : "string", "description" : "* `created` - Indicates the hosted page is just created.\n* `requested` - Indicates the hosted page is requested by the website\n* `succeeded` - Indicates the hosted page is successfully submitted by the user and response is sent to the return url.\n* `cancelled` - Indicates the page is cancelled by the end user after requesting it.\n* `failed` - **(Deprecated)** Indicates the page submition is failed and response is sent to the return url.\n* `acknowledged` - Indicates the succeeded hosted page is acknowledged.", "enum" : [ "created", "requested", "succeeded", "cancelled", "acknowledged" ], "pattern" : "^\\[(created|requested|succeeded|cancelled|failed|acknowledged)(,(created|requested|succeeded|cancelled|failed|acknowledged))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `created` - Indicates the hosted page is just created.\n* `requested` - Indicates the hosted page is requested by the website\n* `succeeded` - Indicates the hosted page is successfully submitted by the user and response is sent to the return url.\n* `cancelled` - Indicates the page is cancelled by the end user after requesting it.\n* `failed` - **(Deprecated)** Indicates the page submition is failed and response is sent to the return url.\n* `acknowledged` - Indicates the succeeded hosted page is acknowledged.", "enum" : [ "created", "requested", "succeeded", "cancelled", "acknowledged" ], "pattern" : "^\\[(created|requested|succeeded|cancelled|failed|acknowledged)(,(created|requested|succeeded|cancelled|failed|acknowledged))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this hosted page was last updated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1490784813\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1490784813", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page" } }, "required" : [ "hosted_page" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
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/view_voucher" : { "post" : { "summary" : "Create a hosted page to view Boleto vouchers", "description" : "Creates a `hosted_page`\nresource of type, `view_voucher`\n. When your end customers choose the Boleto payment method, you can generate a voucher for their pending invoice. Using this API, you can create a voucher_detail hosted page for your customers and email them a link to this hosted page. Your customers can review the voucher details on the page by clicking the link in the email.\n", "operationId" : "create_a_hosted_page_to_view_boleto_vouchers", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "payment_voucher" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_voucher\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique [ID of the voucher](/docs/api/payment_vouchers/payment_voucher-object#id)\nwhich the customer wants to view.\n", "maxLength" : 40, "example" : null } }, "required" : [ "id" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "locale" : { "type" : "string", "deprecated" : false, "description" : "Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.\n", "maxLength" : 50, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "payment_voucher" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/checkout_new" : { "post" : { "summary" : "Checkout new subscription", "description" : "Hosted page to accept card details from the subscriber and create a new subscription. This is similar to our server to server API [Create a Subscription](/docs/api/v2/pcv-1/subscriptions/create-a-subscription).\n\nWhen the redirect URL is notified of the result, we would advise you to [retrieve the subscription](/docs/api/subscriptions/retrieve-a-subscription) and verify the details.\n\n#### Related Tutorials\n\n* [Create a subscription using Chargebee's hosted page](https://www.chargebee.com/checkout-portal-docs/checkout-new-tutorial.html)\n\nAs mentioned before this behavior is very similar to the create subscription API call. All the web hook events will be fired only after the submission of payment details by the customer and successful creation of subscription.\nAny errors related to the payment form that is submitted is handled as a response within the form so that the user is kept informed about the reason for failure to take corrective action.\n", "operationId" : "checkout_new_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})))|(?:(?:(?:(?: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?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.\n", "minimum" : 0, "example" : null }, "mandatory_addons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of addons IDs that are mandatory to the plan and has to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.\n\n**Note** :\n\n* Although the customer will be redirected to the `redirect_url` after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [`subscription_created`](/docs/api/events) or [`invoice_generated`](/docs/api/events) 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\n*Eg : http://yoursite.com?id=\\&state=cancelled*\n\n* This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.\n", "maxLength" : 250, "example" : null }, "pass_thru_content" : { "type" : "string", "deprecated" : false, "description" : "This attribute allows you to store custom information with the `hosted_page` object. You can use it to associate specific data with a hosted page session.\nFor example, you can store the ID of the marketing campaign that initiated the user session. After a successful checkout, when the customer is redirected, you can retrieve the hosted page ID from the [redirect URL](/docs/api/v2/pcv-1/hosted_pages/checkout-new-subscription#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.\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 }, "allow_offline_payment_methods" : { "type" : "boolean", "deprecated" : false, "description" : "Allow the customer to select an offline payment method during checkout. The choice of payment methods can be configured via the Chargebee UI.\n", "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial ends for this subscription. Can be specified to override the default trial period.If **'0'**\nis passed, the subscription will be activated immediately. This parameter overrides the Plan's [`trial_period`](/docs/api/v2/pcv-1/plans)\ndirectly.\n", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription is to start. If not provided, the subscription starts immediately. You can provide a value in the past as well. This is called backdating the subscription creation and is done when the subscription has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating is enabled for subscription creation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.\n* The date is not more than duration X into the past, where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `start_date` cannot be earlier than 14th February.\n", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* bank_transfer - Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* boleto - Boleto\n* no_preference - No Preference\n* sepa_credit - SEPA Credit\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* ach_credit - ACH Credit\n* custom - Custom\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* cash - Cash\n* check - Check\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "affiliate_token" : { "type" : "string", "deprecated" : false, "description" : "A unique tracking token\n", "maxLength" : 250, "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, "required" : [ "plan_id" ], "example" : null }, "customer" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the customer for which this `hosted_page` should be created.\n\n* When not provided, a new customer is created with the ID set to the value provided for `subscription[id]`. If `subscription[id]` is unavailable, then the customer ID is autogenerated.\n* To prevent duplicate subscriptions, pass `customer[id]` while generating the checkout URL. This enables Chargebee to validate against existing subscriptions for the customer. Without it, the validation is skipped.\n", "maxLength" : 50, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the customer. Configured email notifications will be sent to this email.\n", "maxLength" : 70, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the customer. If not provided it will be got from contact information entered in the hosted page\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the customer. If not provided it will be got from contact information entered in the hosted page\n", "maxLength" : 150, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name of the customer.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number of the customer\n", "maxLength" : 50, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "description" : "Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.\n", "maxLength" : 50, "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "Specifies if the customer is liable for tax\n\n* exempt -\n * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.\n * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address.\n* taxable -\n Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html).\n In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero.\n", "enum" : [ "taxable", "exempt" ], "example" : null }, "vat_number" : { "type" : "string", "deprecated" : false, "description" : "The VAT/tax registration number for the customer. For customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas\n`XI`\n(which is **United Kingdom - Northern Ireland**\n), the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number)\ncan be overridden by setting\n[vat_number_prefix](/docs/api/customers/customer-object#vat_number_prefix)\n.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null }, "consolidated_invoicing" : { "type" : "boolean", "deprecated" : false, "description" : "Indicates whether invoices raised on the same day for the `customer` are consolidated. When provided, this overrides the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing). This parameter can be provided only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html) is enabled. \n**Note:**\n\nAny invoices raised when a subscription activates from `in_trial` or `future` `status`, are not consolidated by default. [Contact Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable consolidation for such invoices.\n", "example" : null } }, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n* cancel - Contract term completes and subscription is canceled.\n", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* plan_activation - Addon will be charged on plan activation.\n* contract_termination - Addon will be charged on contract termination.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates when the non-recurring addon will be charged.\n\n* immediately - Charges for the addon will be applied immediately.\n* on_event - Charge for the addon will be applied on the occurrence of a specified event.\n", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "billing_address" : { "style" : "deepObject", "explode" : true }, "card" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/collect_now" : { "post" : { "summary" : "Collect now", "description" : "This API generates a hosted page URL to collect due payments for the customer.\n\nOpen the hosted page in a new browser tab or window using the `url` from this API's response. Do not embed it in your own [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/iframe). \n**`openCheckout()` not supported**\n\nThe Chargebee.js [`openCheckout()`](https://www.chargebee.com/checkout-portal-docs/cbinstanceobj-api-ref.html#opencheckout-options) function does not support Collect Now hosted pages. To open a Collect Now page, open the `url` from this API's response in a new browser tab or window (for example, `window.open(response.hosted_page.url, '_blank')`).\n", "operationId" : "collect_now", "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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?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "Used to specify the destination URL to which a user is redirected after invoices are paid. The [transaction ID](/docs/api/transactions/transaction-object#id)\nof the transactions made through the Pay Now hosted page will be sent as return variables along with the URL.\n", "maxLength" : 250, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the specified *credit amount*\n.\n", "maxLength" : 3, "example" : null }, "payment_method_save_policy" : { "type" : "string", "deprecated" : false, "description" : "Determines whether the payment method should be saved to the customer's account.\n\n* ask - Let the customer choose whether to save the payment method.\n* never - Do not save the payment method.\n* always - Automatically save the payment method to the customer's account for future use.\n", "enum" : [ "always", "ask", "never" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "card" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/checkout_gift" : { "post" : { "summary" : "Checkout gift subscription", "description" : "Creates a hosted page for a customer (called the gifter) to gift a subscription to another customer (called the receiver).\n\n#### Gifter customer resource lookup and creation\n\nWhen [gifter[customer_id]](/docs/api/hosted_pages/checkout-gift-subscription-for-items#gifter_customer_id) is provided, it is looked up in Chargebee when the gifter completes the hosted page checkout. If not found, a new customer resource is created with this ID.\n\n#### Gift receiver customer resource lookup and creation\n\nOnce the gifter checks out using the hosted page returned by this endpoint, Chargebee checks if a customer resource with the receiver's email address exists. The first such customer record is considered the receiver's customer resource. A new customer resource is created for the receiver if none are found.\n", "operationId" : "checkout_gift_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})))|(?:(?:(?:(?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(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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.\n\n**Note** :\n\n* Although the customer will be redirected to the `redirect_url` after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [`subscription_created`](/docs/api/events) or [`invoice_generated`](/docs/api/events) 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 }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](/docs/api/coupon_codes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "gifter" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gifter\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Gifter customer id\n", "maxLength" : 50, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "description" : "Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "Plan Quantity for this subscription in Multi Decimal\n", "maxLength" : 33, "example" : null } }, "required" : [ "plan_id" ], "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Returned for quantity-based plans when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "gifter" : { "style" : "deepObject", "explode" : true }, "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/accept_quote" : { "post" : { "summary" : "Accept a quote", "description" : "This API generates a hosted page URL for the customer to accept a quote. If the hosted page URL has expired, a new URL will be generated automatically. \n* Hosted page URL to accept a quote cannot be generated for one-time charges.\n* Customers with existing subscriptions can generate a quote for new subscriptions. However, Hosted page URL to accept a quote cannot be generated for new subscriptions in V1 and V2 hosted pages.\n", "operationId" : "accept_a_quote", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})(?:(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.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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.\n\n**Note** :\n\n* Although the customer will be redirected to the `redirect_url` after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [`subscription_created`](/docs/api/events) or [`invoice_generated`](/docs/api/events) 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 }, "layout" : { "type" : "string", "deprecated" : false, "description" : "Specifies the UI layout for the hosted page. This overrides [the layout](https://www.chargebee.com/docs/billing/2.0/hosted-capabilities/hosted-checkout#ui-layout-options) configured in Chargebee Billing.\n\n* full_page - Renders the hosted page in a full-page layout.\n* in_app - Renders the hosted page in an in-app layout.\n", "enum" : [ "in_app", "full_page" ], "example" : null }, "quote" : { "type" : "object", "deprecated" : false, "description" : "Parameters for quote\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The quote number. Acts as a identifier for quote and typically generated sequentially.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "quote" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/claim_gift" : { "post" : { "summary" : "Claim a gift subscription", "description" : "This API generates a hosted page URL to claim a gifted subscription.\n", "operationId" : "claim_a_gift_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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.\n\n**Note** :\n\n* Although the customer will be redirected to the `redirect_url` after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [`subscription_created`](/docs/api/events) or [`invoice_generated`](/docs/api/events) 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 }, "gift" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gift\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Uniquely identifies a gift\n", "maxLength" : 150, "example" : null } }, "required" : [ "id" ], "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "locale" : { "type" : "string", "deprecated" : false, "description" : "Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.\n", "maxLength" : 50, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "customer" : { "style" : "deepObject", "explode" : true }, "gift" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/pre_cancel" : { "post" : { "summary" : "Create a pre-cancel hosted page", "description" : "Creates a `hosted_page`\nresource of `type`\n`pre_cancel`\n. Route canceling users to this page to provide them a retention experience and start saving revenue.\nThe hosted page is created in accordance with the retention experience [configured in the Chargebee Growth app](https://www.chargebee.com/docs/growth/experiences/setting-up-cancel-pages)\n, along with the data provided as input to this endpoint. Call the endpoint before your customer clicks the **Cancel**\nbutton, and when they do, route them to the [url](/docs/api/hosted_pages/hosted_page-object#url)\nin the endpoint response.\n", "operationId" : "create_a_pre-cancel_hosted_page", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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,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})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "pass_thru_content" : { "type" : "string", "deprecated" : false, "description" : "Additional data to be passed to Chargebee Growth. Only the value of `pass_thru_content.custom` is sent to Chargebee Growth. It is sent as the value of the [`custom`](https://www.chargebee.com/checkout-portal-docs/cancel-page-api-ref.html#parameters) property. The fields provided in `pass_thru_content.custom` must be preconfigured in Chargebee Growth.\n\nAlthough only `pass_thru_content.custom` is sent to Chargebee Growth, all of `pass_thru_content` is stored by Chargebee Billing and is retrievable as an [attribute](/docs/api/hosted_pages/hosted_page-object#pass_thru_content) of the `hosted_page`.\n.\n", "maxLength" : 2048, "example" : null }, "cancel_url" : { "type" : "string", "deprecated" : false, "description" : "The customer is sent to this URL if they finally decide to cancel the subscription, despite the attempt to retain them.\n", "maxLength" : 250, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The customer is sent to this URL upon successful retention. In other words, this is the page to which the customer is sent when they decide **not**\nto cancel the subscription.\n", "maxLength" : 250, "example" : null }, "locale" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "The unique ID of the subscription which the customer wants to cancel.\n", "maxLength" : 50, "example" : null } }, "required" : [ "id" ], "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/{hosted-page-id}/acknowledge" : { "post" : { "summary" : "Acknowledge a hosted page", "description" : "When a hosted page is successfully completed by the user and processed by Chargebee, its [`state`](/docs/api/hosted_pages/hosted_page-object#state)\nis automatically changed to `succeeded`\n. Acknowledging a hosted page confirms that you have moved the customer details from Chargebee into your system and are ready to fulfill it. This API is used to acknowledge the hosted page in `succeeded`\nstate and change its state to `acknowledged`\n.\n\n**Note:**\nThe hosted page status must be succeeded for this API call to be allowed.\n", "operationId" : "acknowledge_a_hosted_page", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "hosted-page-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/hosted-page-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/retrieve_agreement_pdf" : { "post" : { "summary" : "Retrieve direct debit agreement PDF", "description" : "This is applicable only for Direct Debit via SEPA, Bacs, Bg Autogiro, BECS (for both Australia and New Zealand) and PAD. For Direct Debit, the customer needs to accept an agreement that allows the merchant to debit their bank account. This agreement PDF allows you to easily display scheme-rules compliant Direct Debit mandates to your customers.\n\nThis API retrieves the redirect link to the corresponding agreement for customers. The agreement PDF can be your \"Thank You\" page or sent by email to customers. Communicating this PDF to your customers is mandatory.\n\nCustomer locale is used to generate the PDF in the required language. If a customer language is not supported, the PDF is generated in English. Checkout the [list of languages](https://developer.gocardless.com/api-reference/#mandate-pdfs-create-a-mandate-pdf) supported by GoCardless.\n", "operationId" : "retrieve_direct_debit_agreement_pdf", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))?::(?:(?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{1,4})):){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" : { "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source to be used for this payment.\n", "maxLength" : 40, "example" : null } }, "required" : [ "payment_source_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/{hosted-page-id}" : { "get" : { "summary" : "Retrieve a hosted page", "description" : "Retrieves a hosted page resource.\n", "operationId" : "retrieve_a_hosted_page", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})(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-F]{1,4})))?::)))))$" } }, { "name" : "hosted-page-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/hosted-page-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "hosted_page" : { "$ref" : "#/components/schemas/HostedPage", "description" : "Resource object representing hosted_page
" } }, "required" : [ "hosted_page" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/hosted_pages/manage_payment_sources" : { "post" : { "summary" : "Manage payment sources", "description" : "This API generates a hosted page URL to add new or update existing payment sources for the customer.\n\nUse one of the following methods to open the hosted page:\n\n* **In-app modal** : Use Chargebee.js [`openCheckout()`](https://www.chargebee.com/checkout-portal-docs/cbinstanceobj-api-ref.html#opencheckout-options) to open the hosted page in a modal popup in your website or application.\n* **Standalone page** : Redirect the customer to the hosted page `url`.\n\nDo not embed the hosted page in your own [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/iframe).\n", "operationId" : "manage_payment_sources", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "business_entity_id" : { "type" : "string", "deprecated" : false, "description" : "The ID of the business entity created for the site. For Product Catalog 1.0, all the site data is tied to this business entity.\n\n**Note** [Multiple Business Entities](/docs/api/business_entities) is a feature available only on Product Catalog 2.0.\n", "maxLength" : 50, "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.\n\n**Note** :\n\n* Although the customer will be redirected to the `redirect_url` after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [`subscription_created`](/docs/api/events) or [`invoice_generated`](/docs/api/events) 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 }, "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/checkout_existing" : { "post" : { "summary" : "Checkout existing subscription", "description" : "You can checkout an existing subscription(typically in the trial state) by passing in the plan, quantity and addon details(like [Update a Subscription](/docs/api/v2/pcv-1/subscriptions/update-a-subscription))\n\nWhen the redirect URL is notified of the result, we would advise you to [retrieve the subscription](/docs/api/subscriptions/retrieve-a-subscription) and verify the details.\n\n#### Related Tutorial\n\n* [Upgrade existing subscription using Chargebee's hosted page](https://www.chargebee.com/checkout-portal-docs/checkout-existing-tutorial.html)\n\nAs mentioned before this behavior is very similar to the update subscription API call. All the web hook events will be fired only after the submission of payment details by the customer and successful checkout of subscription.\nAny errors related to the payment form that is submitted is handled as a response within the form so that the user is kept informed about the reason for failure to take corrective action.\n", "operationId" : "checkout_existing_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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?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "replace_addon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Should be true if the existing addons should be replaced with the ones that are being passed.\n", "example" : null }, "mandatory_addons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of addons IDs that are mandatory to the plan and has to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices`\nis set to `true`\n, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes and line_item_taxes are computed based on the tax configuration as of `invoice_date`.\nWhen passing this parameter, the following prerequisites must be met:\n\n* `invoice_date` must be in the past.\n* `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n* It is not earlier than `changes_scheduled_at`, `reactivate_from`, or `trial_end`.\n* `invoice_immediately` is `true`. .\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan is used.\n", "minimum" : 0, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).\nIf a new term is started for the subscription due to this API call, then `terms_to_charge`\nis inclusive of this new term. See description for the `force_term_reset`\nparameter to learn more about when a subscription term is reset.\n", "minimum" : 1, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "If the subscription `status`\nis `cancelled`\nand it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.\n**Note:**\nIt is recommended not to pass this parameter along with `changed_scheduled_at`.\n`reactivate_from`\ncan be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating must be enabled for subscription reactivation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.\n* The date is on or after the last date/time any of the product catalog items of the subscription were changed.\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. .\n", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nchosen for the site for calendar billing. Only applicable when using calendar billing.\n\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_coupon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If `true`\nthen the existing `coupon_ids`\nlist for the subscription is replaced by the one provided. If `false`\nthen the provided `coupon_ids`\nlist gets added to the existing list.\n", "example" : null }, "reactivate" : { "type" : "boolean", "deprecated" : false, "description" : "Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.\n", "example" : null }, "force_term_reset" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "**Note** : This parameter is relevant only for subscriptions with `status` of `active`, `non_renewing`, or `cancelled`.\n\nWhen you set this parameter to `true`, the subscription term resets to the date of the subscription change.\nBy default, if you change the plan to another with the same billing period, the subscription term remains unchanged. For example, if the subscription renews on the 28th of every month, it will continue to renew on the 28th after the change. \n**Note** : If the new plan has a different billing period from the current plan, the subscription term resets automatically, regardless of the value of `force_term_reset`.\n", "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The customers will be redirected to this URL upon successful checkout. The hosted page id and state will be passed as parameters to this URL.\n\n**Note** :\n\n* Although the customer will be redirected to the `redirect_url` after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons such as user closing the tab, or exiting the browser, and so on. If there is any synchronization that you are doing after the redirection, you will have to have a backup. Chargebee recommends listening to appropriate webhooks such as [`subscription_created`](/docs/api/events) or [`invoice_generated`](/docs/api/events) 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\n*Eg : http://yoursite.com?id=\\&state=cancelled*\n\n* This parameter is not applicable for iframe messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html) checkout.\n", "maxLength" : 250, "example" : null }, "pass_thru_content" : { "type" : "string", "deprecated" : false, "description" : "This attribute allows you to store custom information with the `hosted_page` object. You can use it to associate specific data with a hosted page session.\nFor example, you can store the ID of the marketing campaign that initiated the user session. After a successful checkout, when the customer is redirected, you can retrieve the hosted page ID from the [redirect URL](/docs/api/v2/pcv-1/hosted_pages/checkout-existing-subscription#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.\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 }, "allow_offline_payment_methods" : { "type" : "boolean", "deprecated" : false, "description" : "Allow the customer to select an offline payment method during checkout. The choice of payment methods can be configured via the Chargebee UI.\n", "example" : null }, "subscription" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Represents the plan quantity for this subscription.\n", "minimum" : 1, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When price overriding is enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The new start date of a `future`\nsubscription. Applicable only for `future`\nsubscriptions.\n", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription `status`\nis `future`\n, `in_trial`\n, or `cancelled`.\nAlso, the value must not be earlier than `changes_scheduled_at`\nor `start_date`.\n**Note** :\nThis parameter can be backdated (set to a value in the past) only when the subscription is in `cancelled`\nor `in_trial`\n`status`.\nDo this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end`\nis backdated, the subscription immediately goes into `active`\nor `non_renewing`\nstatus. This parameter overrides the Plan's [`trial_period`](/docs/api/v2/pcv-1/plans)\ndirectly.\n", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* boleto - Boleto\n* no_preference - No Preference\n* sepa_credit - SEPA Credit\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* bank_transfer - Bank Transfer\n* ach_credit - ACH Credit\n* custom - Custom\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* cash - Cash\n* check - Check\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, "required" : [ "id" ], "example" : null }, "customer" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "The VAT/tax registration number for the customer. For customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas\n`XI`\n(which is **United Kingdom - Northern Ireland**\n), the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number)\ncan be overridden by setting\n[vat_number_prefix](/docs/api/customers/customer-object#vat_number_prefix)\n.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null } }, "example" : null }, "card" : { "type" : "object", "deprecated" : false, "description" : "Parameters for card\n", "properties" : { "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account in which this payment source is stored.\n", "maxLength" : 50, "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n* cancel - Contract term completes and subscription is canceled.\n", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates when the non-recurring addon will be charged.\n\n* on_event - Charge for the addon will be applied on the occurrence of a specified event.\n* immediately - Charges for the addon will be applied immediately.\n", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* plan_activation - Addon will be charged on plan activation.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n* contract_termination - Addon will be charged on contract termination.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "card" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "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" : [ ] } ] } }, "/subscriptions/{subscription-id}/renewal_estimate" : { "get" : { "summary" : "Subscription renewal estimate", "description" : "This returns an estimate of the amount that will be charged when the subscription is billed next. The estimate is calculated based on the current recurring items of the subscription - plan, addons, and coupons.\n\nIn the response,\n\n* **estimate.subscription_estimate** has the current subscription details like its status, next billing date, and so on.\n\n**estimate.invoice_estimate**\nhas details of the invoice that will be generated at the next billing date. \nThe generated invoice estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html)\n, Refundable Credits, and Excess Payments - if any. If you don't want these balances to be included you can specify 'false' for the parameter *use_existing_balances*\n. \nTo exclude the [delayed charges](https://www.chargebee.com/docs/charges.html)\nfrom the invoice estimate, specify 'false' for the parameter *include_delayed_charges*\n.\n\n**Note:**\n\n* This API will not generate a renewal invoice if an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html) is already present for the subscription.\n* For 'Non Renewing' subscriptions, only the [delayed charges](https://www.chargebee.com/docs/charges.html) will be included in the invoice estimate.\n* This API is not supported for 'Cancelled' subscriptions.\n* Only the subscription's charges will be included. If you have enabled the Consolidated invoicing feature, use the *Upcoming Invoices* estimate available for the Customer object to get the actual estimate invoice for the customer.\n", "operationId" : "subscription_renewal_estimate", "parameters" : [ { "name" : "include_delayed_charges", "in" : "query", "description" : "If true, all the unbilled charges will be included for the invoice estimate.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null } }, { "name" : "use_existing_balances", "in" : "query", "description" : "The generated invoice_estimate/next_invoice_estimate will include all the balances - Promotional Credits, Refundable Credits, and Excess Payments - if any. If you don't want these balances to be included you can specify 'false' for the parameter `use_existing_balances`.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null } }, { "name" : "ignore_scheduled_cancellation", "in" : "query", "description" : "if true, ignores scheduled cancellation for non renewing subscription.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, { "name" : "ignore_scheduled_changes", "in" : "query", "description" : "If true, ignores all recurring charges scheduled during renewal.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, { "name" : "exclude_tax_type", "in" : "query", "description" : "Indicates whether tax calculation should be excluded for the operation. This attribute is applicable only when a third-party tax provider is configured. If no such provider is set up, this parameter will be ignored.\n\n* exclusive - Excludes only **exclusive** tax calculations, and only when exclusive taxes are applicable.\n* none - No exclusions are applied. All applicable taxes are calculated based on the standard tax configuration.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "default" : "none", "deprecated" : false, "enum" : [ "exclusive", "none" ], "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))?::(?: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F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/estimates/update_subscription" : { "post" : { "summary" : "Update subscription estimate", "description" : "Generates an estimate for the 'update subscription' operation. The input will be similar to the [Update Subscription](/docs/api/v2/pcv-1/subscriptions/update-a-subscription) API but subscription will not be updated, only an estimate will be created.\n\nIn the response,\n\n* [subscription_estimate](/docs/api/estimates/estimate-object): The details of the changed subscription such as `status`, next billing date, and so on.\n* [invoice_estimate](/docs/api/estimates/estimate-object):The details of the immediate invoice, if it is generated. An immediate invoice is not generated when:\n * `end_of_term` parameter is true\n * `prorate` parameter is `false`\n * No changes are made to `subscription` or `addons`.\n * For changes such as [quantity downgrades](https://www.chargebee.com/docs/proration.html#proration-mechanism_plan-quantity-downgrade-paid-invoice).\n* [next_invoice_estimate](/docs/api/estimates/estimate-object):The details of the invoice to be generated later (if any) on the occasion that no immediate invoice has been generated.\n* [credit_note_estimates](/docs/api/estimates/estimate-object):The list of credit notes (if any) generated during this operation.\n* [unbilled_charge_estimates](/docs/api/estimates/estimate-object): The details of charges that have not been invoiced. This is returned only if the `invoice_immediately` parameter is set to `false`.\n\n**Note:** If you have configured [EU VAT](https://www.chargebee.com/docs/eu-vat.html) or [Customized taxes](https://www.chargebee.com/docs/customized-tax.html), you need to specify the applicable parameters for calculating taxes - *billing_address\\[\\]* , *shipping_address\\[\\]* , *customer\\[vat_number\\]* , *customer\\[taxability\\]* etc. Otherwise tax calculation will be ignored.\n", "operationId" : "update_subscription_estimate", "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-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])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : { "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When `change_option`\nis set to `specific_date`\n, then set the date/time at which the subscription change is to happen or has happened. **Note:**\nIt is recommended not to pass this parameter along with `reactivate_from`.\n`changes_scheduled_at`\ncan be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating must be enabled for subscription change operations.\n\n* Only the following changes can be backdated:\n\n* Changes in the recurring items or their prices.\n\n* Addition of non-recurring items.\n\n* Subscription `status` is `active`, `cancelled`, or `non_renewing`.\n\n* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is typically the day of the month by which the accounting for the previous month must be closed.\n\n* The date is on or after `current_term_start`.\n\n* The date is on or after the last date/time any of the following changes were made:\n\n* Changes in the recurring items or their prices.\n\n* Addition of non-recurring items.\n\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February.\n .\n\n", "example" : null }, "change_option" : { "type" : "string", "deprecated" : false, "description" : "When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.\n\n* end_of_term - The change is carried out at the end of the current billing cycle of the subscription.\n* specific_date -\n The change is carried out as of the date specified under `changes_scheduled_at`\n .\n* immediately - The change is carried out immediately.\n", "enum" : [ "immediately", "end_of_term", "specific_date" ], "example" : null }, "replace_addon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Should be true if the existing addons should be replaced with the ones that are being passed.\n", "example" : null }, "mandatory_addons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of addons IDs that are mandatory to the plan and has to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices`\nis set to `true`\n, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes and line_item_taxes are computed based on the tax configuration as of `invoice_date`.\nWhen passing this parameter, the following prerequisites must be met:\n\n* `invoice_date` must be in the past.\n* `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n* It is not earlier than `changes_scheduled_at`, `reactivate_from`, or `trial_end`.\n* `invoice_immediately` is `true`. .\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan is used.\n", "minimum" : 0, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).\nIf a new term is started for the subscription due to this API call, then `terms_to_charge`\nis inclusive of this new term. See description for the `force_term_reset`\nparameter to learn more about when a subscription term is reset.\n", "minimum" : 1, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "If the subscription `status`\nis `cancelled`\nand it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.\n**Note:**\nIt is recommended not to pass this parameter along with `changed_scheduled_at`.\n`reactivate_from`\ncan be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating must be enabled for subscription reactivation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.\n* The date is on or after the last date/time any of the product catalog items of the subscription were changed.\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. .\n", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nchosen for the site for calendar billing. Only applicable when using calendar billing.\n\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](/docs/api/coupon_codes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_coupon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If `true`\nthen the existing `coupon_ids`\nlist for the subscription is replaced by the one provided. If `false`\nthen the provided list gets added to the existing `coupon_ids`\n.\n", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "* When `true`: [Prorated credits or charges](https://www.chargebee.com/docs/1.0/proration.html#proration-mechanism) are created as applicable for this change.\n* When `false`: The subscription is changed without creating any credits or charges.\n* When not provided, the value configured in the [site settings](https://www.chargebee.com/docs/1.0/proration.html#proration-for-subscription-change) is considered.\n\n**Caveat**\n\nFor further changes within the same billing term, when `prorate` is set to `true`, **credits** are **not created** when **all** the conditions below hold true:\n\nAn immediate previous change was made\n\n* with `prorate` set to `false` and\n* no changes were made to the subscription's billing term and\n* a change was made to either the subscription's plan, its addons, or the prices of the plan or addons.\n", "example" : null }, "end_of_term" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Set this to true if you want the update to be applied at the end of the current subscription billing cycle.\n", "example" : null }, "force_term_reset" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Say the subscription has the renewal date as 28th of every month. When the plan-item price of the subscription is set to one that has the same billing period as the current plan-item price, the subscription change does not change the term. In other words, the subscription still renews on the 28th. Passing this parameter as `true`\nwill have the subscription reset its term to the current date (provided `end_of_term`\nis false).\n**Note**:\nWhen the new plan-item price has a billing period different from the current plan-item price of the subscription, the term is always reset, regardless of the value passed for this parameter.\n", "example" : null }, "reactivate" : { "type" : "boolean", "deprecated" : false, "description" : "Applicable only for `cancelled`\nsubscriptions. When passed as `true`\n, the canceled subscription is activated; otherwise subscription changes are made without changing its `status`.\nIf not passed, subscription will be activated only if `subscription_items`\nis passed.\n", "example" : null }, "include_delayed_charges" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If true, all the unbilled charges will be included for the invoice estimate.\n", "example" : null }, "use_existing_balances" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "The generated invoice_estimate/next_invoice_estimate will include all the balances - Promotional Credits, Refundable Credits, and Excess Payments - if any. If you don't want these balances to be included you can specify 'false' for the parameter *use_existing_balances*\n.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\nThe default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration)\n. \n**Note:**\n`invoice_immediately`\nonly affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.\n\n.\n", "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Represents the plan quantity for this subscription.\n", "minimum" : 1, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When price overriding is enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The new start date of a `future`\nsubscription. Applicable only for `future`\nsubscriptions.\n", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription `status`\nis `future`\n, `in_trial`\n, or `cancelled`.\nAlso, the value must not be earlier than `changes_scheduled_at`\nor `start_date`.\n**Note** :\nThis parameter can be backdated (set to a value in the past) only when the subscription is in `cancelled`\nor `in_trial`\n`status`.\nDo this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end`\nis backdated, the subscription immediately goes into `active`\nor `non_renewing`\nstatus.\n", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* bank_transfer - Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* boleto - Boleto\n* no_preference - No Preference\n* sepa_credit - SEPA Credit\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* ach_credit - ACH Credit\n* custom - Custom\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* cash - Cash\n* check - Check\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit.\n", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/v2/pcv-1/plans/create-a-plan#period_unit)\nattribute of the [plan](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#plan_id)\nchosen.\n\n* year - Charge based on year(s)\n* day - Charge based on day(s)\n* month - Charge based on month(s)\n* week - Charge based on week(s)\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nhas been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends.\n\n* activate_subscription - The subscription activates and charges are raised for non-metered items.\n* cancel_subscription - The subscription cancels.\n* plan_default -\n The action [configured for the site](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\n at the time when the trial ends, takes effect. This is the default value when `trial_end_action`\n is defined for the plan.\n* site_default -\n The action [configured for the site](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\n at the time when the trial ends, takes effect. This is the default value when `trial_end_action`\n is **not**\n defined for the plan.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null } }, "required" : [ "id" ], "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n).\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n).\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is registered under GST. If set to `true`\nthen the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism)\nis applicable. This field is applicable only when Australian GST is configured for your site.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The time at which the trial ends for the addon. To update this value, redo the complete addon set using [`replace_addon_list`](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#replace_addon_list).\n(Addon trial periods must be enabled by [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n.)\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "proration_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies how to manage charges or credits for the addon for this estimate. It's relevant only for addons that have their [pricing_model](/docs/api/v2/pcv-1/addons/addon-object#pricing_model)\nset to `per_unit`.\nYou may use this parameter only if the change to the subscription takes effect [immediately](/docs/api/v2/pcv-1/estimates/update-subscription-estimate#end_of_term). \n**Note**\nIf you don't provide a value, Chargebee determines the proration logic based on the following precedence: this parameter \\> [prorate](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#prorate) parameter \\> [addon.proration_type](/docs/api/v2/pcv-1/addons/addon-object#proration_type) \\> [site-wide proration](https://www.chargebee.com/docs/1.0/proration.html#proration-for-subscription-change) setting.\n\n* full_term - Charge the full price of the addon or give the full credit. Don't apply any proration.\n* partial_term - Prorate the charges or credits for the rest of the current term.\n* none - Don't apply any charges or credits for the addon.\n", "enum" : [ "full_term", "partial_term", "none" ], "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates when the non-recurring addon will be charged.\n\n* immediately - Charges for the addon will be applied immediately.\n* on_event - Charge for the addon will be applied on the occurrence of a specified event.\n", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* plan_activation - Addon will be charged on plan activation.\n* contract_termination - Addon will be charged on contract termination.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "billing_address" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/resume_subscription_estimate" : { "post" : { "summary" : "Resume subscription estimate", "description" : "Generates an estimate for the 'resume subscription' operation. This is similar to the [Resume a subscription](/docs/api/subscriptions/resume-a-subscription) API, but the subscription will not be resumed. Only an estimate for this operation is created.\n\nIn the response,\n\n* **estimate.subscription_estimate** has the subscription details.\n\n**estimate.invoice_estimate**\nhas details of the invoice that will be generated immediately. This will not be present if no immediate invoice is generated for this operation. This will happen for in-term resumption++\n. \n**++What is an \"in-term resumption\"?**\n\nAn \"in-term resumption\" is when the resumption happens within the billing term of the subscription.\n\n**estimate.next_invoice_estimate**\nhas details of the invoice that will be generated during the next billing date of this subscription. This will be present only if no immediate invoice is generated during this operation (scenario mentioned above) and this subscription has next billing. \nThe generated invoice_estimate/next_invoice_estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html)\n, Refundable Credits, and Excess Payments - if any.\n", "operationId" : "resume_subscription_estimate", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))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:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "resume_option" : { "type" : "string", "deprecated" : false, "description" : "List of options to resume the subscription.\n\n* immediately - Resume immediately\n* specific_date - Resume on a specific date\n", "enum" : [ "immediately", "specific_date" ], "example" : null }, "charges_handling" : { "type" : "string", "deprecated" : false, "description" : "Applicable when charges get added during this operation and **resume_option**\nis set as 'immediately'. Allows to raise invoice immediately or add them to unbilled charges.\n\n* add_to_unbilled_charges - Add to unbilled charges\n* invoice_immediately - Invoice immediately\n", "enum" : [ "invoice_immediately", "add_to_unbilled_charges" ], "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "For a paused subscription, it is the date/time when the subscription is scheduled to resume. If the pause is for an indefinite period, this value is not returned.\n", "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/estimates/gift_subscription" : { "post" : { "summary" : "Gift subscription estimate", "description" : "Generates an estimate for the 'create a gift' operation. This is similar to the [Create a gift](/docs/api/v2/pcv-1/gifts/create-a-gift) API, but the gift subscription will not be created. Only an estimate for this operation is created.\n\nIn the response,\n\n* **estimate.subscription_estimate** has the gift subscription details.\n* **estimate.invoice_estimate** has details of the gift invoice that will be generated immediately.\n", "operationId" : "gift_subscription_estimate", "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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?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "gift" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gift\n", "properties" : { "scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately.\n", "example" : null }, "auto_claim" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "When `true`\n, the claim happens automatically. When not passed, the default value in the site settings is used.\n", "example" : null }, "no_expiry" : { "type" : "boolean", "deprecated" : false, "description" : "When `true`\n, indicates that the gift does not expire. Do not pass or pass as `false`\nwhen `auto_claim`\nis set.\n", "example" : null }, "claim_expiry_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date until which the gift can be claimed. Must be set to a value after `scheduled_at`.\nIf the gift is not claimed within `claim_expiry_date`\n, it will expire and the subscription will move to `cancelled`\nstate. When not passed, the value specified in the site settings will be used.\nPass as `NULL`\nor do not pass when `auto_claim`\nor `no_expiry`\nare set.\n", "example" : null } }, "example" : null }, "gifter" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gifter\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Gifter customer id.\n", "maxLength" : 50, "example" : null }, "signature" : { "type" : "string", "deprecated" : false, "description" : "Gifter sign-off name\n", "maxLength" : 50, "example" : null }, "note" : { "type" : "string", "deprecated" : false, "description" : "Personalized message for the gift.\n", "maxLength" : 500, "example" : null }, "payment_src_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the payment source\n", "maxLength" : 40, "example" : null } }, "required" : [ "customer_id", "signature" ], "example" : null }, "gift_receiver" : { "type" : "object", "deprecated" : false, "description" : "Parameters for gift_receiver\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Receiver customer id.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name of the receiver as given by the gifter.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name of the receiver as given by the gifter,\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email of the receiver. All gift related emails are sent to this email.\n", "maxLength" : 70, "example" : null } }, "required" : [ "customer_id", "email", "first_name", "last_name" ], "example" : null }, "payment_intent" : { "type" : "object", "deprecated" : false, "description" : "Parameters for payment_intent\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.\n", "maxLength" : 150, "example" : null }, "gateway_account_id" : { "type" : "string", "deprecated" : false, "description" : "The gateway account used for performing the 3DS flow.\n", "maxLength" : 50, "example" : null }, "gw_token" : { "type" : "string", "deprecated" : false, "description" : "Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments)\nto find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "payment_method_type" : { "type" : "string", "deprecated" : false, "description" : "The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay.\n\n* card - card\n* twint - Payments made via Twint\n* swish - Payments made via Swish\n* dotpay - dotpay\n* faster_payments - Faster Payments\n* upi - upi\n* kbc_payment_button - KBC Payment Button\n* klarna - Payments made via Klarna.\n* payme - Payments made via PayMe\n* go_pay - Payments made via GoPay\n* google_pay - google_pay\n* trustly - Trustly\n* naver_pay - Payments made via Naver Pay.\n* stablecoin - Payments made via Stablecoin.\n* paypal_express_checkout - paypal_express_checkout\n* pix - Pix\n* venmo - Venmo\n* klarna_pay_now - Klarna Pay Now\n* alipay - Payments made via Alipay.\n* tamara - Payments made via Tamara.\n* ideal - ideal\n* pay_to - PayTo\n* boleto - boleto\n* pay_co - Payments made via PayCo\n* wechat_pay - Payments made via WeChat Pay.\n* cash_app_pay - Payments made via Cash App Pay.\n* alipay_hk - Payments made via Alipay HK.\n* after_pay - Payments made via Afterpay\n* netbanking_emandates - netbanking_emandates\n* grab_pay - Payments made via GrabPay\n* paypay - PayPay\n* payconiq_by_bancontact - Payments made via Payconiq by Bancontact.\n* electronic_payment_standard - Electronic Payment Standard\n* direct_debit - direct_debit\n* sepa_instant_transfer - Sepa Instant Transfer\n* bancontact - bancontact\n* pay_by_bank - Pay By Bank\n* touch_n_go - Payments made via Touch 'n Go.\n* apple_pay - apple_pay\n* qpay - Payments made via Qpay.\n* online_banking_poland - Online Banking Poland\n* gcash - Payments made via GCash.\n* giropay - giropay\n* sofort - sofort\n* amazon_payments - Amazon Payments\n* kakao_pay - Payments made via Kakao Pay.\n* dana - Payments made via Dana.\n* south_korean_cards - Payments made via South Korean Cards\n* revolut_pay - Payments made via Revolut Pay.\n", "enum" : [ "card", "ideal", "sofort", "bancontact", "google_pay", "dotpay", "giropay", "apple_pay", "upi", "netbanking_emandates", "paypal_express_checkout", "direct_debit", "boleto", "venmo", "amazon_payments", "pay_to", "faster_payments", "sepa_instant_transfer", "klarna_pay_now", "online_banking_poland", "payconiq_by_bancontact", "electronic_payment_standard", "kbc_payment_button", "pay_by_bank", "trustly", "stablecoin", "kakao_pay", "naver_pay", "revolut_pay", "cash_app_pay", "wechat_pay", "alipay", "twint", "go_pay", "grab_pay", "pay_co", "after_pay", "swish", "payme", "pix", "klarna", "alipay_hk", "paypay", "gcash", "south_korean_cards", "paynow", "bizum", "promptpay", "dana", "touch_n_go", "tamara", "qpay" ], "example" : null }, "reference_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.\n", "maxLength" : 65000, "example" : null }, "additional_information" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "* `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).\n\n * `payer`: User related information.\n * `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).\n * `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.\n* `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.\n* `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n * `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.\n* `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.\n* `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.\n\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device.\n* `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.\n\n * `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.\n* `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.\n\n * `payer`: User related information.\n * `document`: Document is the user's identification number based on their country.\n * `fraud`: Fraud identification related information.\n * `device_session_id`: Session ID associated with the user's device\n", "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "Plan Quantity for this subscription in Multi Decimal\n", "maxLength" : 33, "example" : null } }, "required" : [ "plan_id" ], "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Returned for quantity-based plans when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "gift" : { "style" : "deepObject", "explode" : true }, "gift_receiver" : { "style" : "deepObject", "explode" : true }, "gifter" : { "style" : "deepObject", "explode" : true }, "payment_intent" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/upcoming_invoices_estimate" : { "get" : { "summary" : "Upcoming invoices estimate", "description" : "Estimate of the upcoming scheduled invoices (subscription activations, renewals etc) of a customer. For now preview of the invoices generated on the immediate upcoming date is supported. Say a customer has couple of subscription renewals scheduled on *Jan,10th* and another subscription renewal scheduled on *Jan,15th* . This API gives the preview of all the invoices scheduled to be generated on *Jan,10th* (immediate upcoming date).\n\nIn the response:\n\n* **estimate.invoice_estimates\\[\\]** has details of the invoices scheduled to be generated.\n\n**Note:** If *consolidated invoicing* is enabled you may use this API to test whether upcoming renewals are consolidated.\n", "operationId" : "upcoming_invoices_estimate", "parameters" : [ { "name" : "include_usage_charges", "in" : "query", "description" : "When set to true, each invoice estimate in the response will include usage context for metered items and estimate any usage charges (on-demand/overage) that would be invoiced.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "deprecated" : false, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|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fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/regenerate_invoice_estimate" : { "post" : { "summary" : "Regenerate invoice estimate", "description" : "Regenerates the invoice for the current term of the subscription. The subscription must have `status` as `active` or `non_renewing`. This operation is not allowed when any of the following conditions hold true for the subscription:\n\n* An invoice exists for the current term and its `status` is not `voided`.\n* There are [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html) for the current term.\n* The subscription has an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html).\n\n#### Response\n\nReturns an `estimate` object with one of the following components depending on the value of `invoice_immediately`.\n\n* If the value is `true`: an `invoice_estimate` object that corresponds to the regenerated invoice.\n* If the value is `false`: a list of `unbilled_charge_estimate` objects corresponding to all the unbilled charges created for the current term of the subscription.\n", "operationId" : "regenerate_invoice_estimate", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(?:(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?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "date_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The start date of the period being invoiced. The default value is [current_term_start](/docs/api/subscriptions/subscription-object#current_term_start)\n.\n", "example" : null }, "date_to" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The end date of the period being invoiced. The default value is [current_term_end](/docs/api/subscriptions/subscription-object#current_term_end)\n.\n", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "Whether the charges should be prorated according to the term specified by `date_from`\nand `date_to`.\nShould not be passed without `date_from`\nand `date_to`\n.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "Only applicable when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html )\nis enabled for the customer. Set to `false`\nto leave the current term charge for the subscription as [unbilled](https://www.chargebee.com/docs/unbilled-charges.html ).\nOnce you have done this for all suitable subscriptions of the customer, call [Create an invoice for unbilled charges](/docs/api/unbilled_charges/create-an-invoice-for-unbilled-charges)\nto invoice them.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/create_subscription_estimate" : { "get" : { "summary" : "Create subscription for a customer estimate", "description" : "Create a subscription for the existing estimate of a customer.\n", "operationId" : "create_subscription_for_a_customer_estimate", "parameters" : [ { "name" : "use_existing_balances", "in" : "query", "description" : "The generated invoice_estimate/next_invoice_estimate will include all the balances - Promotional Credits, Refundable Credits, and Excess Payments - if any. If you don't want these balances to be included you can specify 'false' for the parameter *use_existing_balances*\n.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null } }, { "name" : "invoice_immediately", "in" : "query", "description" : "If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\nThe default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration)\n. \n**Note:**\n`invoice_immediately`\nonly affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.\n\n.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "deprecated" : false, "example" : null } }, { "name" : "billing_cycles", "in" : "query", "description" : "Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null } }, { "name" : "mandatory_addons_to_remove", "in" : "query", "description" : "List of addons IDs that are mandatory to the plan and has to be removed from the subscription.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "deprecated" : false, "items" : { "type" : "string", "deprecated" : false, "x-cb-parameter-blank-option" : "as_null", "x-cb-attribute-meta-comment" : "optional", "x-cb-is-api-column" : true, "maxLength" : 100, "example" : null }, "example" : null } }, { "name" : "terms_to_charge", "in" : "query", "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null } }, { "name" : "billing_alignment_mode", "in" : "query", "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "enum" : [ "immediate", "delayed" ], "example" : null } }, { "name" : "invoice_date", "in" : "query", "description" : "The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date.\n`taxes`\nand\n`line_item_taxes`\nare computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null } }, { "name" : "coupon_ids", "in" : "query", "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "deprecated" : false, "items" : { "type" : "string", "deprecated" : false, "x-cb-parameter-blank-option" : "as_null", "x-cb-attribute-meta-comment" : "optional", "x-cb-is-api-column" : true, "maxLength" : 100, "example" : null }, "example" : null } }, { "name" : "subscription", "in" : "query", "description" : "Parameters for subscription\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial ends for this subscription. Can be specified to override the default trial period.If **'0'**\nis passed, the subscription will be activated immediately.\n", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription is to start. If not provided, the subscription starts immediately. You can provide a value in the past as well. This is called backdating the subscription creation and is done when the subscription has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating is enabled for subscription creation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.\n* The date is not more than duration X into the past, where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `start_date` cannot be earlier than 14th February.\n", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit.\n", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/v2/pcv-1/plans/create-a-plan#period_unit)\nattribute of the [plan](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#plan_id)\nchosen.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nhas been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null } }, "required" : [ "plan_id" ], "example" : null } }, { "name" : "shipping_address", "in" : "query", "description" : "Parameters for shipping_address\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n).\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null } }, { "name" : "contract_term", "in" : "query", "description" : "Parameters for contract_term\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null } }, { "name" : "addons", "in" : "query", "description" : "Parameters for addons\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The time at which the trial ends for the addon. This value can only be set for subscriptions that start with an `active`\nor `non-renewing`\nstatus. Once set, the value can't be changed. (Addon trial periods must be enabled by [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n)\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, { "name" : "event_based_addons", "in" : "query", "description" : "Parameters for event_based_addons\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "on_event" : { "type" : "array", "description" : "Event on which this addon will be charged.\n", "items" : { "type" : "string", "deprecated" : false, "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "description" : "Indicates when the non-recurring addon will be charged.\n", "items" : { "type" : "string", "deprecated" : false, "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "example" : null } }, { "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-f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0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/change_term_end_estimate" : { "post" : { "summary" : "Subscription change term end estimate", "description" : "Generates an estimate for the 'change term end' operation. This is similar to the [Change term end](/docs/api/subscriptions/change-term-end) API but the subscription's term end will not be changed, only an estimate for this operation is created. This is applicable only for subscriptions in 'in-trial', 'active' and 'non-renewing' states.\n\nIn the response,\n\n* **estimate.subscription_estimate** has the subscription details like the status of the subscription (in_trial, active, etc.), next billing date, and so on.\n* **estimate.invoice_estimate** has details of the invoice that will be generated immediately. This will not be present if no immediate invoice is generated for this operation. This will happen when\n * *prorate* parameter is false, or\n * *invoice_immediately* parameter is false, or\n * subscription is in *in-trial* state\n* **estimate.credit_note_estimates\\[\\]** has details of the credit-notes that will get generated during this operation. This list will be empty if no credit-note gets generated during this operation.\n* **estimate.unbilled_charge_estimates\\[\\]** has details of the unbilled charges. This is returned only if *invoice_immediately* is set as false.\n", "operationId" : "subscription_change_term_end_estimate", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})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]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "term_ends_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the current term should end for this subscription.\n", "example" : null }, "prorate" : { "type" : "boolean", "deprecated" : false, "description" : "Applicable for *active*\n/ *non_renewing*\nsubscriptions. If specified as *true*\nprorated charges / credits will be added during this operation.\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\nThe default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration)\n. \n**Note:**\n`invoice_immediately`\nonly affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.\n\n.\n", "example" : null } }, "required" : [ "term_ends_at" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/pause_subscription_estimate" : { "post" : { "summary" : "Pause subscription estimate", "description" : "This API provides an estimate of the details pertaining to the [pause_subscription](/docs/api/subscriptions/pause-a-subscription) operation. It returns attributes such as [pause_date](/docs/api/estimates/estimate-object#subscription_estimate_pause_date) and [resume_date](/docs/api/estimates/estimate-object#subscription_estimate_resume_date). This is similar to the [Pause a subscription](/docs/api/subscriptions/pause-a-subscription) API with the exception that the subscription is not paused. Only an estimate for this operation is created.\n\nIn the response,\n\n* **estimate.subscription_estimate** has the subscription details.\n* **estimate.invoice_estimate** has details of the invoice that are generated immediately. This is not present if no immediate invoices are generated for this operation.\n* **estimate.credit_note_estimates\\[\\]** has details of the credit notes that are generated during this operation. This list is empty if no credit notes are generated.\n", "operationId" : "pause_subscription_estimate", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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}(?: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?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "pause_option" : { "type" : "string", "deprecated" : false, "description" : "List of options to pause the subscription.\n\n* billing_cycles - Pause at the end of the current term, and resume automatically after the number of billing cycles you specify in [skip_billing_cycles](/docs/api/subscriptions/pause-a-subscription#skip_billing_cycles)\n* immediately - Pause immediately\n* end_of_term - Pause at the end of current term\n* specific_date - Pause on a specific date\n", "enum" : [ "immediately", "end_of_term", "specific_date", "billing_cycles" ], "example" : null }, "unbilled_charges_handling" : { "type" : "string", "deprecated" : false, "description" : "Applicable when unbilled charges are present for the subscription and [pause_option](/docs/api/estimates/pause-subscription-estimate#pause_option) is set as `immediately`. **Note:** On the invoice raised, an automatic charge is attempted on the payment method available, if customer's auto-collection property is set to `on`.\n\n* invoice -\n Invoice charges\n If `invoice` is chosen, an automatic charge is attempted on the payment method available if the customer has enabled auto-collection. If a payment collection fails or when auto-collection is not enabled, the invoice is closed as unpaid.\n* no_action -\n Retain as unbilled\n If `no_action` is chosen, charges are added to the resumption invoice.\n", "enum" : [ "no_action", "invoice" ], "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "pause_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When a pause has been scheduled, it is the date/time of scheduled pause. When the subscription is in the `paused`\nstate, it is the date/time when the subscription was paused.\n", "example" : null }, "resume_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "For a paused subscription, it is the date/time when the subscription is scheduled to resume. If the pause is for an indefinite period, this value is not returned.\n", "example" : null }, "skip_billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles this subscription should be paused. The subscription resumes after the paused billing cycles end.\n", "minimum" : 1, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/advance_invoice_estimate" : { "post" : { "summary" : "Advance invoice estimate", "description" : "This API is used to generate an invoice estimate for preview. Estimate details include the number of billing cycles to be invoiced in advance, the number of billing cycles in one interval, advance invoicing schedules, and so on.\n", "operationId" : "advance_invoice_estimate", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))?::(?:(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F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "terms_to_charge" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "* For `schedule_type = immediate`: the number of future billing cycles to be invoiced in advance. The invoicing is done for the [`remaining_billing_cycles`](/docs/api/subscriptions/subscription-object#remaining_billing_cycles) of the subscription if that is less than `terms_to_charge`.\n* For `schedule_type = fixed_intervals`: The number of future billing cycles in one [interval](/docs/api/advance_invoice_schedules). The schedule is created such that the total number of billing cycles in the schedule does not exceed the [remaining_billing_cycles](/docs/api/subscriptions/subscription-object#remaining_billing_cycles) of the subscription. .\n", "minimum" : 1, "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "Whether the charge should be invoiced immediately or added to [`unbilled_charges`](/docs/api/unbilled_charges).\nApplicable only when [`schedule_type`](/docs/api/subscriptions/charge-future-renewals#schedule_type)\nis `immediate`\n.\n", "example" : null }, "schedule_type" : { "type" : "string", "deprecated" : false, "description" : "The type of advance invoice or advance invoicing schedule.\n\n* immediate -\n Charge immediately for the number of billing cycles specified by [`terms_to_charge`](/docs/api/subscriptions/charge-future-renewals#terms_to_charge)\n .\n* specific_dates -\n Charge on [specific dates](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_date).\n For each date, specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_terms_to_charge)\n to charge for. Up to 5 dates can be configured.\n* fixed_intervals -\n Charge at fixed intervals of time. Specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#terms_to_charge)\n that constitute an interval and the number of [days before each interval](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_days_before_renewal)\n that the invoice should be generated. Also specify [when the schedule should end](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_end_schedule_on)\n .\n", "enum" : [ "immediate", "specific_dates", "fixed_intervals" ], "example" : null }, "fixed_interval_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for fixed_interval_schedule\n", "properties" : { "number_of_occurrences" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the [`remaining_billing_cycles`](/docs/api/subscriptions/subscription-object#remaining_billing_cycles)\nof the subscription. This parameter is applicable only when [`fixed_interval_schedule[end_schedule_on]`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_end_schedule_on)\n= `after_number_of_intervals`\n", "minimum" : 1, "example" : null }, "days_before_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before each interval that advance invoices are generated.\n", "minimum" : 1, "example" : null }, "end_schedule_on" : { "type" : "string", "deprecated" : false, "description" : "Specifies when the schedule should end.\n\n* after_number_of_intervals - Advance invoices are generated a `specified number of times`\n* subscription_end - Advance invoices are generated for as long as the subscription is active.\n* specific_date -\n End the advance invoicing schedule on a `specific date`\n .\n", "enum" : [ "after_number_of_intervals", "specific_date", "subscription_end" ], "example" : null }, "end_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date when the schedule should end. Advance invoices are not generated beyond this date. It must be at least 1 day before the start of the last billing cycle of the subscription and also within 5 years from the current date. This parameter is only applicable when [`fixed_interval_schedule[end_schedule_on]`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_end_schedule_on)\n= `specific_date`\n.\n", "example" : null } }, "example" : null }, "specific_dates_schedule" : { "type" : "object", "deprecated" : false, "description" : "Parameters for specific_dates_schedule\n", "properties" : { "terms_to_charge" : { "type" : "array", "description" : "The number of billing cycles to charge for, on the date specified. Applicable only when [`schedule_type`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#schedule_type)\nis specific_dates.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "date" : { "type" : "array", "description" : "The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when [`schedule_type`](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#schedule_type)\nis `specific_dates`\n.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "fixed_interval_schedule" : { "style" : "deepObject", "explode" : true }, "specific_dates_schedule" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/estimates/create_subscription" : { "post" : { "summary" : "Create subscription estimate", "description" : "Generates an estimate for the 'create subscription' operation. This is similar to the [Create Subscription](/docs/api/v2/pcv-1/subscriptions/create-a-subscription) API but no subscription will be created, only an estimate for this operation is created.\n\nIn the response,\n\n* **estimate.subscription_estimate** has the subscription details like the status of the subscription (in_trial, active, etc.), next billing date, and so on.\n\n* **estimate.invoice_estimate** has details of the invoice that will be generated immediately. This will not be present if no immediate invoice is generated for this operation.\n\n**estimate.next_invoice_estimate**\nhas details of the invoice that will be generated on the next billing date of this subscription. This will be present only if no immediate invoice is generated during this operation and this subscription has next billing. \nIf the subscription is created in **trial/future**\nstates, *estimate.invoice_estimate*\nwill not be present as no immediate invoice would be generated. However, *estimate.next_invoice_estimate*\nwill be returned which is a preview of the invoice that would be generated at a later date when the subscription becomes 'active'.\n\n* **estimate.unbilled_charge_estimates** has details of the unbilled charges. This is returned only if *invoice_immediately* is set as false. But this is not applicable for the 'Subscription renewal estimate' operation.\n\n**Tip**\n\nSet the `customer[taxability]`\nattribute as `true`\nand provide any other necessary parameters to compute taxes. Otherwise tax is exempted for the estimate.\n\n#### Related Tutorial\n\n* [Check out this tutorial for when and how to use create subscription estimate API](https://www.chargebee.com/tutorials/in-app-checkout-page-using-estimate-api-example.html)\n", "operationId" : "create_subscription_estimate", "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" : { "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.\n", "minimum" : 0, "example" : null }, "mandatory_addons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of addons IDs that are mandatory to the plan and has to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\nThe default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration)\n. \n**Note:**\n`invoice_immediately`\nonly affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.\n\n.\n", "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date.\n`taxes`\nand\n`line_item_taxes`\nare computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n", "example" : null }, "client_profile_id" : { "type" : "string", "deprecated" : false, "description" : "Indicates the Client profile id for the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "maxLength" : 50, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial ends for this subscription. Can be specified to override the default trial period.If **'0'**\nis passed, the subscription will be activated immediately.\n", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription is to start. If not provided, the subscription starts immediately. You can provide a value in the past as well. This is called backdating the subscription creation and is done when the subscription has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating is enabled for subscription creation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.\n* The date is not more than duration X into the past, where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `start_date` cannot be earlier than 14th February.\n", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* bank_transfer - Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* boleto - Boleto\n* no_preference - No Preference\n* sepa_credit - SEPA Credit\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* ach_credit - ACH Credit\n* custom - Custom\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* cash - Cash\n* check - Check\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "free_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit.\n", "minimum" : 1, "example" : null }, "free_period_unit" : { "type" : "string", "deprecated" : false, "description" : "The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/v2/pcv-1/plans/create-a-plan#period_unit)\nattribute of the [plan](/docs/api/v2/pcv-1/subscriptions/create-a-subscription#plan_id)\nchosen.\n\n* year - Charge based on year(s)\n* day - Charge based on day(s)\n* month - Charge based on month(s)\n* week - Charge based on week(s)\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nhas been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends.\n\n* activate_subscription - The subscription activates and charges are raised for non-metered items.\n* cancel_subscription - The subscription cancels.\n* plan_default -\n The action [configured for the site](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\n at the time when the trial ends, takes effect.\n* site_default -\n This is the default value. The action [configured for the site](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\n at the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "plan_default", "activate_subscription", "cancel_subscription" ], "example" : null } }, "required" : [ "plan_id" ], "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n).\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n).\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is registered under GST. If set to `true`\nthen the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism)\nis applicable. This field is applicable only when Australian GST is configured for your site.\n", "example" : null }, "taxability" : { "type" : "string", "default" : "taxable", "deprecated" : false, "description" : "Specifies if the customer is liable for tax\n\n* exempt -\n * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed.\n * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address.\n* taxable -\n Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html).\n In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero.\n", "enum" : [ "taxable", "exempt" ], "example" : null }, "entity_code" : { "type" : "string", "deprecated" : false, "description" : "The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption)\n.\n\n* med2 - US Medical Device Excise Tax with taxable sales tax\n* med1 - US Medical Device Excise Tax with exempt sales tax\n* b - State government\n* c - Tribe/Status Indian/Indian Band\n* a - Federal government\n* f - Religious organization\n* g - Resale\n* d - Foreign diplomat\n* e - Charitable or benevolent organization\n* j - Direct pay permit\n* k - Direct mail\n* h - Commercial agricultural production\n* i - Industrial production/manufacturer\n* n - Local government\n* l - Other or custom\n* m - Educational organization\n* r - Non-resident\n* p - Commercial aquaculture\n* q - Commercial Fishery\n", "enum" : [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p", "q", "r", "med1", "med2" ], "example" : null }, "exempt_number" : { "type" : "string", "deprecated" : false, "description" : "Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption)\n.\n", "maxLength" : 100, "example" : null }, "exemption_details" : { "type" : "array", "deprecated" : false, "description" : "Indicates the exemption information. You can customize customer exemption based on specific Location, Tax level (Federal, State, County and Local), Category of Tax or specific Tax Name. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\nTo know more about what values you need to provide, refer to this [Avalara's API document](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/exemption/)\n.\n", "items" : { "example" : null }, "example" : null }, "customer_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* business - When the purchase is made at a place of business\n* residential - When the purchase is made by a customer for home use\n* industrial - When the purchase is made by an industrial business\n* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks\n", "enum" : [ "residential", "business", "senior_citizen", "industrial" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n* cancel - Contract term completes and subscription is canceled.\n", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The time at which the trial ends for the addon. This value can only be set for subscriptions that start with an `active`\nor `non-renewing`\nstatus. Once set, the value can't be changed. (Addon trial periods must be enabled by [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n)\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* plan_activation - Addon will be charged on plan activation.\n* contract_termination - Addon will be charged on contract termination.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates when the non-recurring addon will be charged.\n\n* immediately - Charges for the addon will be applied immediately.\n* on_event - Charge for the addon will be applied on the occurrence of a specified event.\n", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the related tax field\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "billing_address" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/estimates/create_invoice" : { "post" : { "summary" : "Create invoice estimate", "description" : "Generates an estimate for the 'create an invoice' operation. This is similar to the [Create an invoice](/docs/api/v2/pcv-1/invoices/create-an-invoice) API, but the invoice will not be generated. Only an estimate for this operation is created.\n\nIn the response,\n\n* **estimate.invoice_estimate** has details of the invoice that will be generated immediately.\n", "operationId" : "create_invoice_estimate", "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-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[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the invoice amount.\n", "maxLength" : 3, "example" : null }, "invoice_note" : { "type" : "string", "deprecated" : false, "description" : "A note for this particular invoice. This, and [all other notes](/docs/api/invoices/invoice-object#notes)\nfor the invoice are displayed on the PDF invoice sent to the customer.\n", "maxLength" : 2000, "example" : null }, "remove_general_note" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Set as `true`\nto remove the [**general note**](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes)\nfrom this invoice.\n", "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "authorization_transaction_id" : { "type" : "string", "deprecated" : false, "description" : "Authorization transaction to be captured.\n", "maxLength" : 40, "example" : null }, "payment_source_id" : { "type" : "string", "deprecated" : false, "description" : "Payment source to be used for this payment.\n", "maxLength" : 40, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "The customer level auto collection will be override if specified.\n\n* on - Whenever an invoice is created, an automatic attempt will be made to charge.\n* off - Whenever an invoice is created as payment due.\n", "enum" : [ "on", "off" ], "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date.\n`taxes`\nand\n`line_item_taxes`\nare computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n", "example" : null }, "invoice" : { "type" : "object", "deprecated" : false, "description" : "Parameters for invoice\n", "properties" : { "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for which this invoice needs to be created. Should be specified if 'subscription_id' is not specified.\n", "maxLength" : 50, "example" : null }, "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer_id' is not specified.(not applicable for consolidated invoice)\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this invoice.\n", "maxLength" : 100, "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Returned for quantity-based plans when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "The decimal representation of the price or per-unit price of the addon. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled. \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:\n\n* The `unit_price_in_decimal` provided is $10.75\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10.75 on each subscription renewal.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the addon starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the addon ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charges\n", "properties" : { "amount" : { "type" : "array", "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ).\nProvide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this charge\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "taxable" : { "type" : "array", "description" : "The amount to be charged is taxable or not.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "tax_profile_id" : { "type" : "array", "description" : "Tax profile of the charge.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "avalara_tax_code" : { "type" : "array", "description" : "The Avalara tax codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "hsn_code" : { "type" : "array", "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**India**](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst) has been enabled as a **Tax Region**. (An error is returned when this condition is not true.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "taxjar_product_code" : { "type" : "array", "description" : "The TaxJar product codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* consumed - Transaction is for an item that is consumed directly\n* vendor_use - Transaction is for an item that is subject to vendor use tax\n* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer\n* retail - Transaction is a sale to an end user\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "example" : null }, "avalara_transaction_type" : { "type" : "array", "description" : "Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "avalara_service_type" : { "type" : "array", "description" : "Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "date_from" : { "type" : "array", "description" : "The time when the service period for the charge starts.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null }, "date_to" : { "type" : "array", "description" : "The time when the service period for the charge ends.\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "notes_to_remove" : { "type" : "object", "deprecated" : false, "description" : "Parameters for notes_to_remove\n", "properties" : { "entity_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Type of entity to which the [note](/docs/api/invoices/invoice-object#notes)\nbelongs. To remove the general note, use the `remove_general_note`\nparameter.\n\n* plan - Entity that represents a plan.\n* addon - Entity that represents an addon.\n* customer - Entity that represents a customer.\n* subscription - Entity that represents a subscription of customer.\n* coupon - Entity that represents a coupon.\n", "enum" : [ "plan", "addon", "customer", "subscription", "coupon" ], "example" : null }, "example" : null }, "entity_id" : { "type" : "array", "description" : "Unique identifier of the [note](/docs/api/invoices/invoice-object#notes)\n.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the related tax field\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "charges" : { "style" : "deepObject", "explode" : true }, "invoice" : { "style" : "deepObject", "explode" : true }, "notes_to_remove" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/subscriptions/{subscription-id}/cancel_subscription_estimate" : { "post" : { "summary" : "Cancel subscription estimate", "description" : "Generates an estimate for the 'cancel subscription' operation. This is similar to the [Cancel a subscription](/docs/api/v2/pcv-1/subscriptions/cancel-a-subscription) API, but the subscription will not be cancelled. Only an estimate for this operation is created.\n\nIn the response,\n\n* **estimate.subscription_estimate** has the subscription details.\n* **estimate.invoice_estimate** has details of the invoice that will be generated immediately. This will not be present if no immediate invoice is generated for this operation.\n* **estimate.credit_note_estimates\\[\\]** has details of the credit-notes that will get generated during this operation. This list will be empty if no credit-note gets generated during this operation.\n* **estimate.unbilled_charge_estimates** has details of the unbilled charges.\n", "operationId" : "cancel_subscription_estimate", "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-9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,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" : "subscription-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/subscription-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "cancel_option" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nDetermines when to cancel the subscription.\n\n##### If the subscription has a contract term:\n\nThis parameter is not applicable.\n\n* end_of_billing_term - This is used to cancel a subscription either at the end of the advance term, if it's billed for future renewals or at the end of its current billing cycle\n* end_of_term - This is used to cancel a subscription at the end of the current billing cycle\n* immediately - This is used to cancel the subscription with immediate effect\n* specific_date - This is used to cancel a subscription on a specified date. The change occurs as of the date/time defined in `cancel_at`\n", "enum" : [ "immediately", "end_of_term", "specific_date", "end_of_billing_term" ], "example" : null }, "end_of_term" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "**(Deprecated)** Use `cancel_option` instead.\nApplicable only when the subscription does not have [contract terms](/docs/api/contract_terms).\nSet this to `true` if you want to cancel the subscription at the end of the current subscription billing cycle. The subscription `status` changes to `non_renewing`.\n", "example" : null }, "cancel_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies the date and time when the subscription should be canceled. Do not use this parameter when `end_of_term` is set to `true`.\n\n##### If the subscription has a contract term:\n\nApplicable only when `contract_term_cancel_option` is `specific_date`. Specifies the date and time to cancel the subscription and contract term.\n\n##### Backdating\n\nYou can set a past date to backdate the cancellation. Backdating is allowed only if the following conditions are met:\n\n* [Backdating](https://www.chargebee.com/docs/1.0/backdating.html) is enabled for subscription cancellation.\n* The current date does not exceed the [backdating limit configured in Chargebee Billing](https://www.chargebee.com/docs/1.0/backdating.html#configuring-backdated-subscription-actions-and-invoicing).\n* The date is on or after the `current_term_start`.\n* The date is on or after the most recent change involving:\n * Addition/change/removal of plan or addon item prices.\n * Addition of charge item prices.\n* The date is not more than one billing period into the past. For example, if the plan's billing period is two months and today is April 14, `cancel_at` cannot be earlier than February 14.\n", "example" : null }, "credit_option_for_current_term_charges" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies how to handle credits for current term charges when canceling immediately (i.e., `cancel_option` is `immediately`). If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/cancellations.html#configure-subscription-cancellation) is used.\n\n##### If the subscription has a contract term:\n\nSpecifies how to handle credits for current term charges when `contract_term_cancel_option` is `terminate_immediately`. If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/contract-terms.html#configuring-contract-terms) is used.\n\n* none - No credits notes are created.\n* full - Credits are issues for the full value of the current term charges.\n* prorate - Prorated credits are issued.\n", "enum" : [ "none", "prorate", "full", "consumption_based" ], "example" : null }, "unbilled_charges_option" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies how to handle unbilled charges when canceling immediately (i.e., `cancel_option` is `immediately`). If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/cancellations.html#configure-subscription-cancellation) is used.\n\n##### If the subscription has a contract term:\n\nSpecifies how to handle unbilled charges when `contract_term_cancel_option` is `terminate_immediately`. If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/contract-terms.html#configuring-contract-terms) is used.\n\n* invoice - An invoice is generated immediately with the unbilled charges.\n* delete - The unbilled charges are deleted.\n", "enum" : [ "invoice", "delete" ], "example" : null }, "account_receivables_handling" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies how to handle past due invoices when canceling immediately (i.e., `cancel_option` is `immediately`). If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/cancellations.html#configure-subscription-cancellation) is used.\n\n##### If the subscription has a contract term:\n\nSpecifies how to handle past due invoices when `contract_term_cancel_option` is `terminate_immediately`. If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/contract-terms.html#configuring-contract-terms) is used.\n\n* no_action - No action is taken.\n* write_off -\n Applies excess payments and refundable credits to past due invoices. Any remaining balance is written off.\n\n *Note: The credit note for the write-off is not included in the API response.*\n* schedule_payment_collection -\n Applies excess payments and refundable credits to past due invoices. If any amount remains and `auto_collection`\n is `on`\n , the remaining amount is automatically charged to the available payment method.\n", "enum" : [ "no_action", "schedule_payment_collection", "write_off" ], "example" : null }, "refundable_credits_handling" : { "type" : "string", "deprecated" : false, "description" : "##### If the subscription does not have a contract term:\n\nSpecifies how to handle refundable credits when canceling immediately (i.e., `cancel_option` is `immediately`). If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/cancellations.html#configure-subscription-cancellation) is used.\n\n##### If the subscription has a contract term:\n\nSpecifies how to handle refundable credits when `contract_term_cancel_option` is `terminate_immediately`. If not specified, the [site-level setting](https://www.chargebee.com/docs/1.0/contract-terms.html#configuring-contract-terms) is used.\n\n* schedule_refund - Refunds remaining credits after applying them to any past due invoices.\n* no_action - No action is taken.\n", "enum" : [ "no_action", "schedule_refund" ], "example" : null }, "contract_term_cancel_option" : { "type" : "string", "deprecated" : false, "description" : "Required when the subscription has a contract term. Determines when to cancel the subscription along with the contract term.\n\n* terminate_immediately -\n Cancels the subscription and contract term immediately. Sets the contract term's `status` to `terminated` and collects any termination fee, if applicable.\n\n To specify the termination fee, include a single object in the `subscription_items` array. If not specified, the [default termination fee](/docs/api/contract_terms) is applied (if configured).\n* end_of_contract_term - Prevents the contract term from renewing and schedules the subscription for cancellation at the end of the contract term.\n* specific_date -\n Cancels the subscription and contract term on the date specified by `cancel_at`. Sets `action_at_term_end` to `cancel`.\n\n **Note** : Contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this option for your [Chargebee site](https://www.chargebee.com/docs/1.0/sites-intro.html).\n* end_of_subscription_billing_term -\n Cancels the subscription and contract term at the end of the current billing cycle. Sets `action_at_term_end` to `cancel`.\n\n **Note** : Contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support) to enable this option for your [Chargebee site](https://www.chargebee.com/docs/1.0/sites-intro.html).\n", "enum" : [ "terminate_immediately", "end_of_contract_term", "specific_date", "end_of_subscription_billing_term" ], "example" : null }, "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices`\nis `true`\n, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes`\nand `line_item_taxes`\nare computed based on the `tax`\nconfiguration as of `invoice_date`.\nWhen passing this parameter, the following prerequisites must be met:\n\n* `invoice_date` must be in the past.\n* `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n* It is not earlier than `cancel_at`. .\n", "example" : null }, "cancel_reason_code" : { "type" : "string", "deprecated" : false, "description" : "Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in **Settings \\> Configure Chargebee \\> Reason Codes \\> Subscriptions \\> Subscription Cancellation**.\nMust be passed if set as mandatory in the app. The codes are case-sensitive.\n", "maxLength" : 100, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "The unique `id`\nof the event-based addon that represents the termination fee.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "The quantity associated with the termination fee. Applicable only when the addon for the termination charge is quantity-based.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The termination fee. In case it is quantity-based, this is the fee per unit.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "The service period of the termination fee-expressed in days-starting from the current date.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "event_based_addons" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "estimate" : { "$ref" : "#/components/schemas/Estimate", "description" : "Resource object representing estimate
" } }, "required" : [ "estimate" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/{quote-id}/edit_one_time_quote" : { "post" : { "summary" : "Edit quote for one-time charges", "description" : "Edits a quote. The quote must be for [one-time charges](https://www.chargebee.com/docs/charges.html#one-time-charges) or [non-recurring addons](https://www.chargebee.com/docs/charges.html#non-recurring-addon).\n\nTo edit quotes created for subscriptions, use:\n\n* [Edit quote for new subscription](/docs/api/v2/pcv-1/quotes/edit-quote-for-a-new-subscription).\n* [Edit quote for updating a subscription](/docs/api/v2/pcv-1/quotes/edit-quote-for-updating-a-subscription).\n", "operationId" : "edit_quote_for_one-time_charges", "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})):(?:(?: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1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this quote.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the quote.\n", "maxLength" : 3, "example" : null }, "coupon" : { "type" : "string", "deprecated" : false, "description" : "The 'One Time' coupon to be applied.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Returned for quantity-based plans when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "The decimal representation of the price or per-unit price of the addon. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled. \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:\n\n* The `unit_price_in_decimal` provided is $10.75\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10.75 on each subscription renewal.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period" : { "type" : "array", "description" : "Specifies the service period of the addon in days. When the quote is converted, the [invoice.line_item.date_from](/docs/api/invoices/invoice-object#line_items)\nis set to current date/time and [invoice.line_item.date_to](/docs/api/invoices/invoice-object#line_items)\nis set to `service_period`\ndays ahead of [date_from](/docs/api/invoices/invoice-object#line_items)\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charges\n", "properties" : { "amount" : { "type" : "array", "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the amount for the one-time charge. The value is in [major units of the currency](/docs/api/getting-started).\nApplicable only when multi-decimal pricing is enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this charge\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer\n* retail - Transaction is a sale to an end user\n* consumed - Transaction is for an item that is consumed directly\n* vendor_use - Transaction is for an item that is subject to vendor use tax\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "example" : null }, "avalara_transaction_type" : { "type" : "array", "description" : "Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "avalara_service_type" : { "type" : "array", "description" : "Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "service_period" : { "type" : "array", "description" : "Service period for charge\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider currently supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "charges" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "Resource object representing quoted_charge
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/{quote-id}" : { "get" : { "summary" : "Retrieve a quote", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nRetrieves the quotes identified by the \\`number\\` specified in the URL.\n", "operationId" : "retrieve_a_quote", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "Resource object representing quoted_charge
" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "Resource object representing quoted_ramp
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/update_subscription_quote" : { "post" : { "summary" : "Create quote for updating a subscription", "description" : "Creates a quote for updating a subscription under the customer specified.\n\nTo send this quote, use \"[Send Email](https://www.chargebee.com/docs/quotes.html#other-quote-actions_send-email)\" quote action in the Chargebee application.\n\nBased on the customer's reply, you can use [Update quote status](/docs/api/v2/pcv-1/quotes/update-quote-status) and [Convert a quote](/docs/api/v2/pcv-1/quotes/convert-a-quote) APIs for changing quote status and invoicing the customer, respectively.\n", "operationId" : "create_quote_for_updating_a_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|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):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The quote name will be used as the pdf name of the quote.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "replace_addon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Should be true if the existing addons should be replaced with the ones that are being passed.\n", "example" : null }, "mandatory_addons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of addons IDs that are mandatory to the plan and has to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan is used.\n", "minimum" : 0, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html).\nIf a new term is started for the subscription due to this API call, then `terms_to_charge`\nis inclusive of this new term. See description for the `force_term_reset`\nparameter to learn more about when a subscription term is reset.\n", "minimum" : 1, "example" : null }, "reactivate_from" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "If the subscription `status`\nis `cancelled`\nand it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.\n**Note:**\nIt is recommended not to pass this parameter along with `changed_scheduled_at`.\n`reactivate_from`\ncan be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating must be enabled for subscription reactivation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.\n* The date is on or after the last date/time any of the product catalog items of the subscription were changed.\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. .\n", "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nchosen for the site for calendar billing. Only applicable when using calendar billing.\n\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "Identifier of the coupon as a List. Coupon Codes can also be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "replace_coupon_list" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Should be true if the existing coupons should be replaced with the ones that are being passed.\n", "example" : null }, "change_option" : { "type" : "string", "deprecated" : false, "description" : "When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.\n\n* specific_date -\n The change is carried out as of the date specified under `changes_scheduled_at`\n .\n* immediately - The change is carried out immediately.\n", "enum" : [ "immediately", "specific_date" ], "example" : null }, "changes_scheduled_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "When `change_option`\nis set to `specific_date`\n, then set the date/time at which the subscription change is to happen or has happened. `changes_scheduled_at`\ncan be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating must be enabled for subscription change operations.\n\n* Only the following changes can be backdated:\n\n* Changes in the recurring items or their prices.\n\n* Addition of non-recurring items.\n\n* Subscription `status` is `active`, `cancelled`, or `non_renewing`.\n\n* The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.\n\n* The date is on or after `current_term_start`.\n\n* The date is on or after the last date/time any of the following changes were made:\n\n* Changes in the recurring items or their prices.\n\n* Addition of non-recurring items.\n\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription's plan is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February..\n\n**Note:**\nThe `changes_scheduled_at`\nparameter does not apply to `auto_collection`\n, `shipping_address`\n, and `po_number`\n; these parameters take effect **immediately**\nwhen scheduling a subscription update.\n", "example" : null }, "force_term_reset" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Applicable for 'Active' \\& 'Non Renewing' states alone. Generally, subscription's term will be reset (i.e current term is ended and a new term starts immediately) when a new plan having different billing frequency is specified in the input. For all the other cases, the subscription's term will remain intact. Now for this later scenario, if you want to force a term reset you can specify this param as 'true'.\n**Note**:\nSpecifying this value as 'false' has no impact on the default behaviour.\n", "example" : null }, "reactivate" : { "type" : "boolean", "deprecated" : false, "description" : "Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.\n", "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Represents the plan quantity for this subscription.\n", "minimum" : 1, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When price overriding is enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The new start date of a `future`\nsubscription. Applicable only for `future`\nsubscriptions.\n", "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription `status`\nis `future`\n, `in_trial`\n, or `cancelled`.\nAlso, the value must not be earlier than `changes_scheduled_at`\nor `start_date`.\n**Note** :\nThis parameter can be backdated (set to a value in the past) only when the subscription is in `cancelled`\nor `in_trial`\n`status`.\nDo this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end`\nis backdated, the subscription immediately goes into `active`\nor `non_renewing`\nstatus.\n", "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.\n\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* bank_transfer - Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* boleto - Boleto\n* no_preference - No Preference\n* sepa_credit - SEPA Credit\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* ach_credit - ACH Credit\n* custom - Custom\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* cash - Cash\n* check - Check\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, "required" : [ "id" ], "example" : null }, "billing_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for billing_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the billing contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the billing contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* valid - Address was validated successfully.\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "customer" : { "type" : "object", "deprecated" : false, "description" : "Parameters for customer\n", "properties" : { "vat_number" : { "type" : "string", "deprecated" : false, "description" : "VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this.\n", "maxLength" : 20, "example" : null }, "vat_number_prefix" : { "type" : "string", "deprecated" : false, "description" : "An overridden value for the first two characters of the [full VAT number](https://en.wikipedia.org/wiki/VAT_identification_number).\nOnly applicable specifically for customers with [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`\n(which is **United Kingdom - Northern Ireland**\n).\n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\nin 2021 or have [manually enabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\nthe Brexit configuration, you have the option of setting [billing_address](/docs/api/customers/customer-object#billing_address)\n\n`country`\nas `XI`.\nThat's the code for **United Kingdom - Northern Ireland** .\nThe first two characters of the VAT number in such a case is\n`XI`\nby default. However, if the VAT number was registered in UK, the value should be `GB`.\nSet\n`vat_number_prefix`\nto `GB`\nfor such cases.\n", "maxLength" : 10, "example" : null }, "registered_for_gst" : { "type" : "boolean", "deprecated" : false, "description" : "Confirms that a customer is registered under GST. If set to `true`\nthen the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism)\nis applicable. This field is applicable only when Australian GST is configured for your site.\n", "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "default" : "renew", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n* renew_once -\n Used when you want to renew the contract term just once. Does the following: - Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n\n * The `action_at_term_end` for the new contract term is set to `cancel`.\n* cancel - Contract term completes and subscription is canceled.\n", "enum" : [ "renew", "evergreen", "cancel", "renew_once" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The time at which the trial ends for the addon. To update this value, redo the complete addon set using [`replace_addon_list`](/docs/api/v2/pcv-1/subscriptions/update-a-subscription#replace_addon_list).\n(Addon trial periods must be enabled by [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n.)\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates when the non-recurring addon will be charged.\n\n* immediately - Charges for the addon will be applied immediately.\n* on_event - Charge for the addon will be applied on the occurrence of a specified event.\n", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* plan_activation - Addon will be charged on plan activation.\n* contract_termination - Addon will be charged on contract termination.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "billing_address" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "customer" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/create_for_onetime_charges" : { "post" : { "summary" : "Create quote for one-time charges", "description" : "Creates a quote for [one-time charges](https://www.chargebee.com/docs/charges.html#one-time-charges) and [non-recurring addons](https://www.chargebee.com/docs/charges.html#non-recurring-addon). This is applicable only for one-time payment. Recurring charges are not permitted in this quote; use [Create quote for a new subscription](/docs/api/v2/pcv-1/quotes/create-quote-for-a-new-subscription) or [Create quote for updating a subscription](/docs/api/v2/pcv-1/quotes/create-quote-for-updating-a-subscription) instead.\n\nTo send this quote, use \"[Send Email](https://www.chargebee.com/docs/quotes.html#other-quote-actions_send-email)\" quote action in the Chargebee application.\n\nBased on the customer's reply, you can use [Update quote status](/docs/api/quotes/update-quote-status) and [Convert a quote](/docs/api/quotes/convert-a-quote) APIs for changing quote status and invoicing the customer, respectively.\n", "operationId" : "create_quote_for_one-time_charges", "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}(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:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The quote name will be used as the pdf name of the quote.\n", "maxLength" : 100, "example" : null }, "customer_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the customer for which the quote needs to be created.\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase Order Number for this quote.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the quote.\n", "maxLength" : 3, "example" : null }, "coupon" : { "type" : "string", "deprecated" : false, "description" : "The 'One Time' coupon to be applied.\n", "maxLength" : 100, "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "List of Coupons to be added.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Returned for quantity-based plans when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "The decimal representation of the price or per-unit price of the addon. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled. \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:\n\n* The `unit_price_in_decimal` provided is $10.75\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10.75 on each subscription renewal.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period" : { "type" : "array", "description" : "Specifies the service period of the addon in days. When the quote is converted, the [invoice.line_item.date_from](/docs/api/invoices/invoice-object#line_items)\nis set to current date/time and [invoice.line_item.date_to](/docs/api/invoices/invoice-object#line_items)\nis set to `service_period`\ndays ahead of [date_from](/docs/api/invoices/invoice-object#line_items)\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "charges" : { "type" : "object", "deprecated" : false, "description" : "Parameters for charges\n", "properties" : { "amount" : { "type" : "array", "description" : "The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "amount_in_decimal" : { "type" : "array", "description" : "The decimal representation of the amount for the one-time charge. The value is in [major units of the currency](/docs/api/getting-started).\nApplicable only when multi-decimal pricing is enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "description" : { "type" : "array", "description" : "Description for this charge\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 250, "example" : null }, "example" : null }, "avalara_sale_type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* consumed - Transaction is for an item that is consumed directly\n* vendor_use - Transaction is for an item that is subject to vendor use tax\n* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer\n* retail - Transaction is a sale to an end user\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "example" : null }, "avalara_transaction_type" : { "type" : "array", "description" : "Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "avalara_service_type" : { "type" : "array", "description" : "Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "service_period" : { "type" : "array", "description" : "Service period for charge\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider currently supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null } }, "required" : [ "customer_id" ], "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "charges" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "Resource object representing quoted_charge
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/{quote-id}/update_status" : { "post" : { "summary" : "Update quote status", "description" : "Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed.\n", "operationId" : "update_quote_status", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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[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(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "status" : { "type" : "string", "deprecated" : false, "description" : "Status to update for the quote.\n\n* accepted - Accepted.\n* closed - Closed\n* declined - Declined.\n* proposed - Proposed.\n* voided - Voided.\n", "enum" : [ "accepted", "declined", "proposed", "voided", "closed" ], "example" : null }, "comment" : { "type" : "string", "deprecated" : false, "description" : "An internal [comment](/docs/api/comments)\nto be added for this operation, to the quote. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](/docs/api/hosted_pages)\nor any document such as the [Quote PDF](/docs/api/quotes/retrieve-quote-as-pdf)\n.\n", "maxLength" : 300, "example" : null } }, "required" : [ "status" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "Resource object representing quoted_charge
" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "Resource object representing quoted_ramp
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/customers/{customer-id}/create_subscription_quote" : { "post" : { "summary" : "Create quote for a new subscription", "description" : "Creates a quote for a new subscription under the customer specified.\n\nTo send this quote, use \"[Send Email](https://www.chargebee.com/docs/1.0/quotes.html#other-quote-actions_send-email)\" quote action in the Chargebee application.\n\nBased on the customer's reply, you can use [Update quote status](/docs/api/v2/pcv-1/quotes/update-quote-status) and [Convert a quote](/docs/api/v2/pcv-1/quotes/convert-a-quote) APIs for changing quote status and invoicing the customer, respectively.\n", "operationId" : "create_quote_for_a_new_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|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[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "customer-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/customer-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The quote name will be used as the pdf name of the quote.\n", "maxLength" : 100, "example" : null }, "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.\n", "minimum" : 0, "example" : null }, "mandatory_addons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of addons IDs that are mandatory to the plan and has to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "Identifier of the coupon as a List. Coupon Codes can also be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial ends for this subscription. Can be specified to override the default trial period.If **'0'**\nis passed, the subscription will be activated immediately.\n", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately on quote conversion. The quote can be converted on a date/time after this date. This is called backdating the subscription creation and is done when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating is enabled for subscription creation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `subscription[start_date]` cannot be earlier than 14th February.\n", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* boleto - Boleto\n* no_preference - No Preference\n* sepa_credit - SEPA Credit\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* bank_transfer - Bank Transfer\n* ach_credit - ACH Credit\n* custom - Custom\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* cash - Cash\n* check - Check\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, "required" : [ "plan_id" ], "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n* cancel - Contract term completes and subscription is canceled.\n", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The time at which the trial ends for the addon. This value can only be set for subscriptions that start with an `active`\nor `non-renewing`\nstatus. Once set, the value can't be changed. (Addon trial periods must be enabled by [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n)\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* plan_activation - Addon will be charged on plan activation.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n* contract_termination - Addon will be charged on contract termination.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates when the non-recurring addon will be charged.\n\n* on_event - Charge for the addon will be applied on the occurrence of a specified event.\n* immediately - Charges for the addon will be applied immediately.\n", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/{quote-id}/quote_line_groups" : { "get" : { "summary" : "List quote line groups", "description" : "This API retrieves all the quote line groups and lineitems for a quote.\n", "operationId" : "list_quote_line_groups", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|(?:(?:::(?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]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "quote_line_group" : { "$ref" : "#/components/schemas/QuoteLineGroup", "description" : "Resource object representing quote_line_group" } }, "required" : [ "quote_line_group" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/{quote-id}/extend_expiry_date" : { "post" : { "summary" : "Extend expiry date", "description" : "Can be used to extend the expiry date of a quote.\n", "operationId" : "extend_expiry_date", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]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(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quote will be valid till this date. After this date quote will be marked as closed.\n", "example" : null } }, "required" : [ "valid_till" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "Resource object representing quoted_charge
" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "Resource object representing quoted_ramp
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/{quote-id}/edit_create_subscription_quote" : { "post" : { "summary" : "Edit quote for a new subscription", "description" : "Edits a quote. This endpoint is for quotes that are for new subscriptions. To edit a quote that is for updating a subscription, use [Edit quote for updating a subscription](/docs/api/v2/pcv-1/quotes/edit-quote-for-updating-a-subscription).\n", "operationId" : "edit_quote_for_a_new_subscription", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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-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:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "notes" : { "type" : "string", "deprecated" : false, "description" : "Notes specific to this quote that you want customers to see on the quote PDF.\n", "maxLength" : 10000, "example" : null }, "expires_at" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Quotes will be valid till this date. After this quote will be marked as closed.\n", "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled.\n", "minimum" : 0, "example" : null }, "mandatory_addons_to_remove" : { "type" : "array", "deprecated" : false, "description" : "List of addons IDs that are mandatory to the plan and has to be removed from the subscription.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "terms_to_charge" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html)\n.\n", "minimum" : 1, "example" : null }, "billing_alignment_mode" : { "type" : "string", "deprecated" : false, "description" : "Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date)\nfor Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.\n\n* delayed - Subscription period will be aligned with the configured billing date at the next renewal.\n* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..\n", "enum" : [ "immediate", "delayed" ], "example" : null }, "coupon_ids" : { "type" : "array", "deprecated" : false, "description" : "Identifier of the coupon as a List. Coupon Codes can also be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null }, "plan_id" : { "type" : "string", "deprecated" : false, "description" : "Identifier of the plan for this subscription\n", "maxLength" : 100, "example" : null }, "plan_quantity" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Plan quantity for this subscription\n", "minimum" : 1, "example" : null }, "plan_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The decimal representation of the quantity of the plan purchased. Can be provided for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 33, "example" : null }, "plan_unit_price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the Plan's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "plan_unit_price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the plan can be set here. The value [set for the plan](/docs/api/v2/pcv-1/plans/plan-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "maxLength" : 39, "example" : null }, "setup_fee" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Amount that will override the default setup fee. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "trial_end" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The time at which the trial ends for this subscription. Can be specified to override the default trial period.If **'0'**\nis passed, the subscription will be activated immediately.\n", "example" : null }, "start_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately on quote conversion. The quote can be converted on a date/time after this date. This is called backdating the subscription creation and is done when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:\n\n* Backdating is enabled for subscription creation operations.\n* The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.\n* The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `subscription[start_date]` cannot be earlier than 14th February.\n", "example" : null }, "offline_payment_method" : { "type" : "string", "deprecated" : false, "description" : "The preferred offline payment method for the subscription.\n\n* uk_automated_bank_transfer - UK Automated Bank Transfer\n* us_automated_bank_transfer - US Automated Bank Transfer\n* boleto - Boleto\n* no_preference - No Preference\n* sepa_credit - SEPA Credit\n* jp_automated_bank_transfer - JP Automated Bank Transfer\n* mx_automated_bank_transfer - MX Automated Bank Transfer\n* bank_transfer - Bank Transfer\n* ach_credit - ACH Credit\n* custom - Custom\n* eu_automated_bank_transfer - EU Automated Bank Transfer\n* cash - Cash\n* check - Check\n", "enum" : [ "no_preference", "cash", "check", "bank_transfer", "ach_credit", "sepa_credit", "boleto", "us_automated_bank_transfer", "eu_automated_bank_transfer", "uk_automated_bank_transfer", "jp_automated_bank_transfer", "mx_automated_bank_transfer", "custom" ], "example" : null }, "contract_term_billing_cycle_on_renewal" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles`\nor a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms)\n.\n", "maximum" : 100, "minimum" : 1, "example" : null } }, "required" : [ "plan_id" ], "example" : null }, "shipping_address" : { "type" : "object", "deprecated" : false, "description" : "Parameters for shipping_address\n", "properties" : { "first_name" : { "type" : "string", "deprecated" : false, "description" : "The first name of the contact.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "The last name of the contact.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "The email address.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "The company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "The phone number.\n", "maxLength" : 50, "example" : null }, "line1" : { "type" : "string", "deprecated" : false, "description" : "Address line 1\n", "maxLength" : 150, "example" : null }, "line2" : { "type" : "string", "deprecated" : false, "description" : "Address line 2\n", "maxLength" : 150, "example" : null }, "line3" : { "type" : "string", "deprecated" : false, "description" : "Address line 3\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "The name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* invalid - Address is invalid.\n* not_validated - Address is not yet validated.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "example" : null }, "contract_term" : { "type" : "object", "deprecated" : false, "description" : "Parameters for contract_term\n", "properties" : { "action_at_term_end" : { "type" : "string", "deprecated" : false, "description" : "Action to be taken when the contract term completes.\n\n* evergreen - Contract term completes and the subscription renews.\n* renew -\n * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](/docs/api/v2/pcv-1/subscriptions/create-subscription-for-customer#contract_term_billing_cycle_on_renewal).\n * The `action_at_term_end` for the new contract term is set to `renew`.\n* cancel - Contract term completes and subscription is canceled.\n", "enum" : [ "renew", "evergreen", "cancel" ], "example" : null }, "cancellation_cutoff_period" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "The number of days before [`contract_end`](/docs/api/contract_terms/contract_term-object#contract_end)\n, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure.\n", "example" : null } }, "example" : null }, "addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started). \n**Note:**\n\nFor recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:\n\n* The `unit_price` provided is $10\n* The addon billing period is 1 month.\n* The plan billing period is 3 months.\n* The addon is only billed for $10 on each subscription renewal.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. However, the price provided here is considered as the price of the addon for an entire billing cycle of the subscription regardless of the value of the addon `period`.\nProvide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "Number of billing cycles the addon will be charged for. When not set, the addon is attached to the subscription for an indefinite number of billing cycles. While updating a subscription to a plan with a different billing period, set this parameter again or its value will be lost. And so, the addon will be attached indefinitely.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "trial_end" : { "type" : "array", "description" : "The time at which the trial ends for the addon. This value can only be set for subscriptions that start with an `active`\nor `non-renewing`\nstatus. Once set, the value can't be changed. (Addon trial periods must be enabled by [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\n)\n", "items" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "A unique 'id' used to identify the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "unit_price" : { "type" : "array", "description" : "Amount that will override the Addon's default price. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "items" : { "type" : "integer", "format" : "int64", "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "unit_price_in_decimal" : { "type" : "array", "description" : "When [price overriding](http://chargebee.com/docs/price-override.html )\nis enabled for the site, the price or per-unit price of the addon can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price)\nis used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null }, "service_period_in_days" : { "type" : "array", "description" : "Defines service period of the addon in days from the day of charge.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "maximum" : 4000, "minimum" : 1, "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which this addon will be charged.\n\n* plan_activation - Addon will be charged on plan activation.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n* contract_termination - Addon will be charged on contract termination.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null }, "charge_on" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Indicates when the non-recurring addon will be charged.\n\n* on_event - Charge for the addon will be applied on the occurrence of a specified event.\n* immediately - Charges for the addon will be applied immediately.\n", "enum" : [ "immediately", "on_event" ], "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "addons" : { "style" : "deepObject", "explode" : true }, "contract_term" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "shipping_address" : { "style" : "deepObject", "explode" : true }, "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes" : { "get" : { "summary" : "List quotes", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nList all quotes.\n", "operationId" : "list_quotes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "include_deleted", "in" : "query", "description" : "If set to true, includes the deleted resources in the response. For the deleted resources in the response, the '**deleted**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nThe quote number. Acts as a identifier for quote and typically generated sequentially.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"123\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "123", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "customer_id", "in" : "query", "description" : "optional, string filter\n\nThe identifier of the customer this quote belongs to.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*customer_id\\[is\\] = \"4gmiXbsjdm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "subscription_id", "in" : "query", "description" : "optional, string filter\n\nTo filter based on subscription_id.\nNOTE: Not to be used if *consolidated invoicing*\nfeature is enabled.\n**Supported operators :**\nis, is_not, starts_with, is_present, in, not_in\n\n**Example →**\n*subscription_id\\[is\\] = \"4gmiXbsjdm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "4gmiXbsjdm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nCurrent status of this quote. Possible values are : open, accepted, declined, invoiced, closed.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is_not\\] = \"open\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "open", "properties" : { "is" : { "type" : "string", "description" : "* `open` - Open\n* `accepted` - Accepted.\n* `declined` - Declined.\n* `invoiced` - Invoiced\n* `closed` - Closed\n* `pending_approval` - Pending Approval\n* `approval_rejected` - Approval Rejected\n* `proposed` - Proposed.\n* `voided` - Voided.\n* `expired` - Expired", "enum" : [ "open", "accepted", "declined", "invoiced", "closed", "pending_approval", "approval_rejected", "proposed", "voided", "expired" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `open` - Open\n* `accepted` - Accepted.\n* `declined` - Declined.\n* `invoiced` - Invoiced\n* `closed` - Closed\n* `pending_approval` - Pending Approval\n* `approval_rejected` - Approval Rejected\n* `proposed` - Proposed.\n* `voided` - Voided.\n* `expired` - Expired", "enum" : [ "open", "accepted", "declined", "invoiced", "closed", "pending_approval", "approval_rejected", "proposed", "voided", "expired" ], "example" : null }, "in" : { "type" : "string", "description" : "* `open` - Open\n* `accepted` - Accepted.\n* `declined` - Declined.\n* `invoiced` - Invoiced\n* `closed` - Closed\n* `pending_approval` - Pending Approval\n* `approval_rejected` - Approval Rejected\n* `proposed` - Proposed.\n* `voided` - Voided.\n* `expired` - Expired", "enum" : [ "open", "accepted", "declined", "invoiced", "closed", "pending_approval", "approval_rejected", "proposed", "voided", "expired" ], "pattern" : "^\\[(open|accepted|declined|invoiced|closed|pending_approval|approval_rejected|proposed|voided|expired)(,(open|accepted|declined|invoiced|closed|pending_approval|approval_rejected|proposed|voided|expired))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `open` - Open\n* `accepted` - Accepted.\n* `declined` - Declined.\n* `invoiced` - Invoiced\n* `closed` - Closed\n* `pending_approval` - Pending Approval\n* `approval_rejected` - Approval Rejected\n* `proposed` - Proposed.\n* `voided` - Voided.\n* `expired` - Expired", "enum" : [ "open", "accepted", "declined", "invoiced", "closed", "pending_approval", "approval_rejected", "proposed", "voided", "expired" ], "pattern" : "^\\[(open|accepted|declined|invoiced|closed|pending_approval|approval_rejected|proposed|voided|expired)(,(open|accepted|declined|invoiced|closed|pending_approval|approval_rejected|proposed|voided|expired))*\\]$", "example" : null } } } }, { "name" : "date", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nCreation date of the quote. Typically this is the date on which quote is generated.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*date\\[after\\] = \"1435054328\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1435054328", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ndate\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"date\"*\n\nThis will sort the result based on the 'date' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "date" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "date" ], "example" : null } }, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "Resource object representing quoted_ramp
" } }, "required" : [ "quote" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing download
" } }, "required" : [ "download" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/{quote-id}/convert" : { "post" : { "summary" : "Convert a quote", "description" : "This API is to convert a quote to an invoice.\n", "operationId" : "convert_a_quote", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "invoice_date" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "The document date displayed on the invoice PDF. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. When not provided, the value is the same as current date. Moreover, if the invoice is created as `pending`\n, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes`\nand `line_item_taxes`\nare computed based on the tax configuration as of `invoice_date`.\nWhen passing this parameter, the following prerequisites must be met:\n\n* `invoice_date` must be in the past.\n* `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.\n* The date is not earlier than `quoted_subscription.start_date` or `quoted_subscription.changes_scheduled_at` (whichever is applicable).\n* `invoice_immediately` must be `true`. .\n", "example" : null }, "invoice_immediately" : { "type" : "boolean", "deprecated" : false, "description" : "If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\nThe default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration)\n. \n**Note:**\n`invoice_immediately`\nonly affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.\n\n.\n", "example" : null }, "subscription" : { "type" : "object", "deprecated" : false, "description" : "Parameters for subscription\n", "properties" : { "id" : { "type" : "string", "deprecated" : false, "description" : "Applicable only for create subscription quote.\n", "maxLength" : 50, "example" : null }, "auto_collection" : { "type" : "string", "deprecated" : false, "description" : "Applicable only for create subscription quote.\n\n* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments.\n* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.\n", "enum" : [ "on", "off" ], "example" : null }, "po_number" : { "type" : "string", "deprecated" : false, "description" : "Purchase order number for this subscription.\n", "maxLength" : 100, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "subscription" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "Resource object representing quoted_charge
" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "Resource object representing quoted_ramp
" }, "customer" : { "$ref" : "#/components/schemas/Customer", "description" : "Resource object representing customer
" }, "subscription" : { "$ref" : "#/components/schemas/Subscription", "description" : "Resource object representing subscription
" }, "invoice" : { "$ref" : "#/components/schemas/Invoice", "description" : "Resource object representing invoice
" }, "credit_note" : { "$ref" : "#/components/schemas/CreditNote", "description" : "Resource object representing credit_note
" }, "unbilled_charges" : { "type" : "array", "description" : "Resource object representing unbilled_charge
", "items" : { "$ref" : "#/components/schemas/UnbilledCharge", "description" : "Resource object representing unbilled_charge" }, "example" : null } }, "required" : [ "customer", "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/{quote-id}/delete" : { "post" : { "summary" : "Delete a quote", "description" : "Delete an existing quote using this API.\n", "operationId" : "delete_a_quote", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "comment" : { "type" : "string", "deprecated" : false, "description" : "Reason for deleting this transaction. This comment will be added to the associated entity.\n", "maxLength" : 300, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "quote" : { "$ref" : "#/components/schemas/Quote", "description" : "Resource object representing quote
" }, "quoted_subscription" : { "$ref" : "#/components/schemas/QuotedSubscription", "description" : "Resource object representing quoted_subscription
" }, "quoted_charge" : { "$ref" : "#/components/schemas/QuotedCharge", "description" : "Resource object representing quoted_charge
" }, "quoted_ramp" : { "$ref" : "#/components/schemas/QuotedRamp", "description" : "Resource object representing quoted_ramp
" } }, "required" : [ "quote" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/quotes/{quote-id}/quote_entitlements" : { "get" : { "summary" : "List quote entitlements", "operationId" : "list_quote_entitlements", "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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(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "quote-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/quote-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } }, { "name" : "limit", "in" : "query", "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" : "entity_id", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "description" : "Filter by entity_id", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null } }, "example" : null } }, { "name" : "start_date", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "description" : "Filter lock-mode entitlements by ramp start date (unix timestamp). Use with end_date[on].", "example" : "1780252200", "properties" : { "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null } } } }, { "name" : "end_date", "in" : "query", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "description" : "Filter lock-mode entitlements by ramp end date (unix timestamp). Use with start_date[on].", "example" : "1782844200", "properties" : { "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "quote_entitlement" : { "$ref" : "#/components/schemas/QuoteEntitlement", "description" : "Resource object representing quote_entitlement" } }, "required" : [ "quote_entitlement" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.", "maxLength" : 1000, "example" : null } }, "required" : [ "list" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/plans/{plan-id}/unarchive" : { "post" : { "summary" : "Unarchive a plan", "description" : "This endpoint unarchives a specific plan which was [archived](/docs/api/v2/pcv-1/plans/plan-object#status)\nearlier.\n", "operationId" : "unarchive_a_plan", "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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4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "plan-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/plan-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "plan" : { "$ref" : "#/components/schemas/Plan", "description" : "Resource object representing plan
" } }, "required" : [ "plan" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/plans/{plan-id}/delete" : { "post" : { "summary" : "Delete a plan", "description" : "Deletes or archives a plan. This endpoint behaves differently based on the scenarios listed below:\n\n* When the plan has subscriptions/invoices linked, it is not deleted. Instead, it is moved to the [archived](/docs/api/v2/pcv-1/plans/plan-object#status) state. Subscriptions already on it continue to renew. However, until the plan is unarchived,\n * No other subscription can use the plan\n * You cannot update the plan\n* When the plan does not have any subscriptions or invoices linked to it, the endpoint permanently deletes the plan from your Chargebee site. You cannot undo this action.\n", "operationId" : "delete_a_plan", "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})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[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "plan-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/plan-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "plan" : { "$ref" : "#/components/schemas/Plan", "description" : "Resource object representing plan
" } }, "required" : [ "plan" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/plans/copy" : { "post" : { "summary" : "Copy a plan", "description" : "Creates a plan in this site by copying its configurations from another site. Copying of archived plans is not supported. \n**Note:**\nThe attribute *tax_profile_id*\nis not copied. In effect, if the plan is taxable, it will be mapped to the *Primary*\ntax profile.\n", "operationId" : "copy_a_plan", "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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]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : { "from_site" : { "type" : "string", "deprecated" : false, "description" : "Your Chargebee site name having the plan to be copied.\n**Note:**\nUnless you are copying from a twin site (acme \\& acme-test are twin sites), [contact support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\nto have this allow-listed.\n", "maxLength" : 50, "example" : null }, "id_at_from_site" : { "type" : "string", "deprecated" : false, "description" : "Id of the plan to be copied. The new plan created in this site will have the same Id.\n", "maxLength" : 100, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Id of copied plan in this site.\n", "maxLength" : 100, "example" : null }, "for_site_merging" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If copy action is performed as part of Chargebee site merge action, pass the value as true.\n", "example" : null } }, "required" : [ "from_site", "id_at_from_site" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "plan" : { "$ref" : "#/components/schemas/Plan", "description" : "Resource object representing plan
" } }, "required" : [ "plan" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/plans" : { "get" : { "summary" : "List plans", "description" : "This API fetches all the `active` and `archived` plans. If the limit parameter is not set, it will return upto 10 plans.\n", "operationId" : "list_plans", "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", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nA unique ID for your system to identify the plan.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"Enterprise\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Enterprise", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "optional, string filter\n\nThe display name used in web interface for identifying the plan.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*name\\[is\\] = \"plan_enterprise\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "plan_enterprise", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "price", "in" : "query", "description" : "optional, in cents filter\n\nThe price of the plan. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*price\\[gte\\] = \"1200\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1200", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "period", "in" : "query", "description" : "optional, integer filter\n\nDefines billing frequency. Example: to bill customer every 3 months, provide \"3\" here.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*period\\[lte\\] = \"3\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "period_unit", "in" : "query", "description" : "optional, enumerated string filter\n\nDefines billing frequency in association with billing period. Possible values are : day, week, month, year.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*period_unit\\[is\\] = \"month\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "month", "properties" : { "is" : { "type" : "string", "description" : "* `day` - Charge based on day(s)\n* `week` - Charge based on week(s)\n* `month` - Charge based on month(s)\n* `year` - Charge based on year(s)", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `day` - Charge based on day(s)\n* `week` - Charge based on week(s)\n* `month` - Charge based on month(s)\n* `year` - Charge based on year(s)", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "in" : { "type" : "string", "description" : "* `day` - Charge based on day(s)\n* `week` - Charge based on week(s)\n* `month` - Charge based on month(s)\n* `year` - Charge based on year(s)", "enum" : [ "day", "week", "month", "year" ], "pattern" : "^\\[(day|week|month|year)(,(day|week|month|year))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `day` - Charge based on day(s)\n* `week` - Charge based on week(s)\n* `month` - Charge based on month(s)\n* `year` - Charge based on year(s)", "enum" : [ "day", "week", "month", "year" ], "pattern" : "^\\[(day|week|month|year)(,(day|week|month|year))*\\]$", "example" : null } } } }, { "name" : "trial_period", "in" : "query", "description" : "optional, integer filter\n\nThe free time window for your customer to try your product.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between, is_present\n\n**Example →**\n*trial_period\\[lt\\] = \"14\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "14", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null }, "is_present" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "trial_period_unit", "in" : "query", "description" : "optional, enumerated string filter\n\nTime unit for the trial period. Possible values are : day, month.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*trial_period_unit\\[is\\] = \"day\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "day", "properties" : { "is" : { "type" : "string", "description" : "* `day` - In days\n* `month` - In months", "enum" : [ "day", "month" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `day` - In days\n* `month` - In months", "enum" : [ "day", "month" ], "example" : null }, "in" : { "type" : "string", "description" : "* `day` - In days\n* `month` - In months", "enum" : [ "day", "month" ], "pattern" : "^\\[(day|month)(,(day|month))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `day` - In days\n* `month` - In months", "enum" : [ "day", "month" ], "pattern" : "^\\[(day|month)(,(day|month))*\\]$", "example" : null } } } }, { "name" : "addon_applicability", "in" : "query", "description" : "optional, enumerated string filter\n\nIndicates if all or only some addons are applicable with the plan. Possible values are : all, restricted.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*addon_applicability\\[is\\] = \"all\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "all", "properties" : { "is" : { "type" : "string", "description" : "* `all` - All addons are applicable with this plan.\n* `restricted` - Only addons marked as 'applicable_addons' are applicable with the plan.", "enum" : [ "all", "restricted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `all` - All addons are applicable with this plan.\n* `restricted` - Only addons marked as 'applicable_addons' are applicable with the plan.", "enum" : [ "all", "restricted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `all` - All addons are applicable with this plan.\n* `restricted` - Only addons marked as 'applicable_addons' are applicable with the plan.", "enum" : [ "all", "restricted" ], "pattern" : "^\\[(all|restricted)(,(all|restricted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `all` - All addons are applicable with this plan.\n* `restricted` - Only addons marked as 'applicable_addons' are applicable with the plan.", "enum" : [ "all", "restricted" ], "pattern" : "^\\[(all|restricted)(,(all|restricted))*\\]$", "example" : null } } } }, { "name" : "giftable", "in" : "query", "description" : "optional, boolean filter\n\nSpecifies if the plan should be gifted or not. Possible values are : *true, false*\n\n**Supported operators :**\nis\n\n**Example →**\n*giftable\\[is\\] = \"true\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "true", "properties" : { "is" : { "type" : "string", "format" : "boolean", "enum" : [ "true", "false" ], "example" : null } } } }, { "name" : "pricing_model", "in" : "query", "description" : "optional, enumerated string filter\n\nDefines how the recurring charges for the subscription is calculated. Possible values are : flat_fee, per_unit, tiered, volume, stairstep.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*pricing_model\\[is\\] = \"flat_fee\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "flat_fee", "properties" : { "is" : { "type" : "string", "description" : "* `flat_fee` - A fixed price that is not quantity-based.\n* `per_unit` - A fixed price per unit quantity.\n* `tiered` - The per unit price is based on the tier that the total quantity falls in.\n* `volume` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* `stairstep` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `flat_fee` - A fixed price that is not quantity-based.\n* `per_unit` - A fixed price per unit quantity.\n* `tiered` - The per unit price is based on the tier that the total quantity falls in.\n* `volume` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* `stairstep` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "in" : { "type" : "string", "description" : "* `flat_fee` - A fixed price that is not quantity-based.\n* `per_unit` - A fixed price per unit quantity.\n* `tiered` - The per unit price is based on the tier that the total quantity falls in.\n* `volume` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* `stairstep` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "pattern" : "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `flat_fee` - A fixed price that is not quantity-based.\n* `per_unit` - A fixed price per unit quantity.\n* `tiered` - The per unit price is based on the tier that the total quantity falls in.\n* `volume` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* `stairstep` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "pattern" : "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nThe plan state. Possible values are : active, archived, deleted.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"active\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - New subscriptions can be created with the plan.\n* `archived` - No new subscriptions allowed for the plan. Existing subscriptions on this plan will remain as-is and can be migrated to another active plan if required.\n* `deleted` - Indicates the plan has been deleted.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - New subscriptions can be created with the plan.\n* `archived` - No new subscriptions allowed for the plan. Existing subscriptions on this plan will remain as-is and can be migrated to another active plan if required.\n* `deleted` - Indicates the plan has been deleted.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - New subscriptions can be created with the plan.\n* `archived` - No new subscriptions allowed for the plan. Existing subscriptions on this plan will remain as-is and can be migrated to another active plan if required.\n* `deleted` - Indicates the plan has been deleted.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - New subscriptions can be created with the plan.\n* `archived` - No new subscriptions allowed for the plan. Existing subscriptions on this plan will remain as-is and can be migrated to another active plan if required.\n* `deleted` - Indicates the plan has been deleted.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at. This attribute will be present only if the resource has been updated after 2016-11-09.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[before\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "currency_code", "in" : "query", "description" : "optional, string filter\n\nThe currency code (ISO 4217 format) of the plan.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*currency_code\\[is\\] = \"USD\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "properties" : { "is" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "include_deleted", "in" : "query", "description" : "If set to true, includes the deleted resources in the response. For the deleted resources in the response, the '**deleted**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "plan" : { "$ref" : "#/components/schemas/Plan", "description" : "Resource object representing plan" } }, "required" : [ "plan" ], "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.
Resource object representing plan
" } }, "required" : [ "plan" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/plans/{plan-id}" : { "get" : { "summary" : "Retrieve a plan", "description" : "This endpoint retrieves a specific plan using the plan ID.\n", "operationId" : "retrieve_a_plan", "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]))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?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "plan-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/plan-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "plan" : { "$ref" : "#/components/schemas/Plan", "description" : "Resource object representing plan
" } }, "required" : [ "plan" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] }, "post" : { "summary" : "Update a plan", "description" : "When updating plans that are already linked to an invoice or a subscription, you can only update the following parameters:\n\n* name\n* invoice_name\n* setup_cost\n* price\n* trial_period\n* trial_period_unit\n* redirect_url\n* enabled_in_hosted_pages\n* meta_data\n", "operationId" : "update_a_plan", "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" : "plan-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/plan-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The display name used in web interface for identifying the plan.\n", "maxLength" : 100, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "Display name used in invoice. If it is not configured then name is used in invoice.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description about the plan to show in the hosted pages \\& customer portal.\n**Note:**\n\nIf your input contains characters that are subjected to sanitization (like incomplete HTML tags), the sanitization process might increase the length of your input. If the sanitized input exceeds the limit, your request will be rejected.\n", "maxLength" : 2000, "example" : null }, "trial_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The free time window for your customer to try your product. If **zero**\nis passed, the trial period will be removed.\n", "minimum" : 0, "example" : null }, "trial_period_unit" : { "type" : "string", "deprecated" : false, "description" : "Time unit for the trial period.\n\n* month - In months\n* day - In days\n", "enum" : [ "day", "month" ], "example" : null }, "trial_end_action" : { "type" : "string", "deprecated" : false, "description" : "Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\nhas been enabled for the site. Whenever the plan has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends. This can be overridden at the [subscription-level](/docs/api/v2/pcv-1/subscriptions/subscription-object#trial_end_action)\n.\n\n* cancel_subscription - The subscription cancels.\n* activate_subscription - The subscription activates and charges are raised for non-metered items.\n* site_default -\n The action [configured for the site](https://www.chargebee.com/docs/1.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions)\n at the time when the trial ends, takes effect.\n", "enum" : [ "site_default", "activate_subscription", "cancel_subscription" ], "example" : null }, "period" : { "type" : "integer", "format" : "int32", "default" : 1, "deprecated" : false, "description" : "Defines billing frequency. Example: to bill customer every 3 months, provide \"3\" here.\n", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "default" : "month", "deprecated" : false, "description" : "Defines billing frequency in association with billing period.\n\n* month - Charge based on month(s)\n* day - Charge based on day(s)\n* week - Charge based on week(s)\n* year - Charge based on year(s)\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "setup_cost" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "One-time setup fee charged as part of the first invoice.\n", "minimum" : 1, "example" : null }, "price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The price of the plan. The unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The price of the plan when the `pricing_model`\nis `flat_fee`.\nWhen the pricing model is `per_unit`\n, it is the price per unit quantity of the plan. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled. .\n", "maxLength" : 39, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the plan. Applicable if Multicurrency is enabled.\n", "maxLength" : 3, "example" : null }, "billing_cycles" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The number of billing cycles the subscription is active. The subscription is moved to non renewing state and then to cancelled state automatically.\n", "minimum" : 1, "example" : null }, "pricing_model" : { "type" : "string", "default" : "flat_fee", "deprecated" : false, "description" : "Defines how the recurring charges for the subscription is calculated.\n\n* tiered - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* per_unit - A fixed price per unit quantity.\n* flat_fee - A fixed price that is not quantity-based.\n* volume - The per unit price is based on the tier that the total quantity falls in.\n* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "free_quantity" : { "type" : "integer", "format" : "int32", "default" : 0, "deprecated" : false, "description" : "Free quantity the subscriptions of this plan will have. Only the quantity more than this will be charged for the subscription.\n", "minimum" : 0, "example" : null }, "free_quantity_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The quantity of the plan that is available free-of-charge, represented in decimal. When a subscription is created for this plan or when the plan of a subscription is changed to this one, only the quantity above this number is charged for. Applicable for quantity-based plans and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled. .\n", "maxLength" : 33, "example" : null }, "addon_applicability" : { "type" : "string", "default" : "all", "deprecated" : false, "description" : "Indicates if all or only some addons are applicable with the plan.\n\n* all - All addons are applicable with this plan.\n* restricted - Only addons marked as 'applicable_addons' are applicable with the plan.\n", "enum" : [ "all", "restricted" ], "example" : null }, "redirect_url" : { "type" : "string", "deprecated" : false, "description" : "The url to redirect on successful checkout. Eg: https://yoursite.com/success.html?plan=basic.\n", "maxLength" : 500, "example" : null }, "enabled_in_hosted_pages" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "If true, allow checkout through plan specific hosted page URL for this plan.\n", "example" : null }, "enabled_in_portal" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "If enabled, customers can switch to this plan using the 'Change Subscription' option in the customer portal.\n", "example" : null }, "taxable" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Specifies whether taxes apply to this plan. This value is set and returned even if [Taxes](https://www.chargebee.com/docs/tax.html)\nhave been disabled in Chargebee. However, the value is effective only while Taxes are enabled.\n", "example" : null }, "tax_profile_id" : { "type" : "string", "deprecated" : false, "description" : "Tax profile of the plan.\n", "maxLength" : 50, "example" : null }, "tax_code" : { "type" : "string", "deprecated" : false, "description" : "The Avalara tax codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html)\n.\n", "maxLength" : 50, "example" : null }, "hsn_code" : { "type" : "string", "deprecated" : false, "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**India**](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst) has been enabled as a **Tax Region**. (An error is returned when this condition is not true.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee. .\n", "maxLength" : 50, "example" : null }, "taxjar_product_code" : { "type" : "string", "deprecated" : false, "description" : "The TaxJar product codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html)\n.\n", "maxLength" : 50, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* retail - Transaction is a sale to an end user\n* vendor_use - Transaction is for an item that is subject to vendor use tax\n* consumed - Transaction is for an item that is consumed directly\n* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "description" : "The field is used as Product name/code in your third party accounting application. Chargebee will use it as an alternate name in your accounting application.\n", "maxLength" : 100, "example" : null }, "accounting_code" : { "type" : "string", "deprecated" : false, "description" : "This field is to capture the Account code setup in your Accounting system for integration purposes only.\n", "maxLength" : 100, "example" : null }, "accounting_category1" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**Xero:**](https://www.chargebee.com/docs/1.0/xero.html ) If you've categorized your products in Xero, provide the category name and option. Use the format: `:` . For example:`Location: Singapore.`\n* [**QuickBooks:**](https://www.chargebee.com/docs/1.0/quickbooks.html ) If you've categorized your product sales in QuickBooks according to Classes, provide the class name here. Use the following format: `::...`\n* [**NetSuite:**](https://www.chargebee.com/docs/1.0/netsuite.html ) If you've categorized your products in NetSuite under Classes, provide the class name here. Use the following format: `: : ....` For example: `Services : Plan.`\n* [**Intacct:**](https://www.chargebee.com/docs/1.0/intacct.html ) If you've classified your products in Intacct under Locations, provide the name of the Location here.\n", "maxLength" : 100, "example" : null }, "accounting_category2" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**Xero:**](https://www.chargebee.com/docs/1.0/xero.html ) If you've categorized your products in Xero, then provide the second category name and option here. Use the format: `: ....` For example, `Region: South`\n* [**QuickBooks:**](https://www.chargebee.com/docs/1.0/quickbooks.html ) If you've categorized your product sales in QuickBooks according to Location, provide the Location name here. Use the following format: `::....` For example: `Location: North America: Canada`\n* [**NetSuite:**](https://www.chargebee.com/docs/1.0/netsuite.html ) If you've categorized your products in NetSuite under Locations, provide the location name here. Use the following format `: : ....` For example: `NA:US:CA`\n* [**Intacct:**](https://www.chargebee.com/docs/1.0/intacct.html ) If you've classified your products in Intacct under Dimensions, provide the value of the Dimension here.\n", "maxLength" : 100, "example" : null }, "accounting_category3" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**NetSuite:**](https://www.chargebee.com/docs/1.0/netsuite.html ) If you've categorized your products in NetSuite under Departments, pass the department name here. Use the following format: `: : ....` For example: `Production: Assembly.`\n* [**Intacct:**](https://www.chargebee.com/docs/1.0/intacct.html ) If you've classified your products in Intacct under multiple Dimensions, provide the value of the second Dimension here. .\n", "maxLength" : 100, "example" : null }, "accounting_category4" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**NetSuite:**](https://www.chargebee.com/docs/1.0/netsuite.html ) Provide the \"Revenue Recognition Rule Id\" for the product from NetSuite.\n* [**Intacct:**](https://www.chargebee.com/docs/1.0/intacct.html ) If you have configured \"Revenue Recognition Templates\" for products in Intacct, provide the template ID for the product. .\n", "maxLength" : 100, "example" : null }, "is_shippable" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If enabled, charges for this plan/addon will be added to orders.\n", "example" : null }, "shipping_frequency_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Defines the shipping frequency. Example: to bill customer every 2 weeks, provide \"2\" here.\n", "minimum" : 1, "example" : null }, "shipping_frequency_period_unit" : { "type" : "string", "deprecated" : false, "description" : "Defines the shipping frequency in association with shipping period.\n\n* month - Ship based on month(s)\n* year - Ship based on year(s)\n* day - Ship based on day(s)\n* week - Ship based on week(s)\n", "enum" : [ "year", "month", "week", "day" ], "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the plan. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/v2/pcv-1/advanced-features)\n.\n", "example" : null }, "show_description_in_invoices" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the [plan.description](/docs/api/v2/pcv-1/plans/plan-object)\nshould be shown on [invoice PDFs](/docs/api/invoices/retrieve-invoice-as-pdf).\nIf this Boolean is changed, only invoices generated (or [regenerated](https://www.chargebee.com/docs/billing/2.0/invoices-credit-notes-and-quotes/invoice-operations#actions-for-payment-due-not-paid-invoices)\n)after the change are affected; past invoices are not.\n", "example" : null }, "show_description_in_quotes" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the [plan description](/docs/api/v2/pcv-1/plans/plan-object)\nshould be shown on [quote PDFs](/docs/api/quotes/retrieve-quote-as-pdf).\nIf this Boolean is changed, only quotes created after the change are affected; past quotes are not.\n", "example" : null }, "tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tiers\n", "properties" : { "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The per-unit price for the tier when the `pricing_model`\nis `tiered`\nor `volume`\n; the total cost for the item price when the `pricing_model`\nis `stairstep`.\nThe value is in the [minor unit of the currency](/docs/api/v2/pcv-1/currencies)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "starting_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal`\nof the next lower tier. Applicable only when the `pricing_model`\nis `tiered`\n, `volume`\nor `stairstep`\nand [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "ending_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal`\nof the next higher tier. Applicable only when the `pricing_model`\nis `tiered`\n, `volume`\nor `stairstep`\nand [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "The decimal representation of the per-unit price for the tier when the `pricing_model`\nis `tiered`\nor `volume`.\nWhen the `pricing_model`\nis `stairstep`\n, it is the decimal representation of the total price for the plan. The value is in major units of the currency. Applicable when the plan is quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider currently supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "field_id", "field_value", "provider_name" ], "example" : null }, "applicable_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for applicable_addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon appplicable to the plan.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null }, "event_based_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for event_based_addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon. Multiple addons can be passed.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The decimal representation of the quantity of the addon purchased. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "on_event" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Event on which the addon will be charged\n\n* plan_activation - Addon will be charged on plan activation.\n* contract_termination - Addon will be charged on contract termination.\n* subscription_activation - Addon will be charged on subscription activation.\n* subscription_creation - Addon will be charged on subscription creation.\n* subscription_trial_start - Addon will be charged when the trial period starts.\n", "enum" : [ "subscription_creation", "subscription_trial_start", "plan_activation", "subscription_activation", "contract_termination" ], "example" : null }, "example" : null }, "charge_once" : { "type" : "array", "description" : "If enabled, the addon will be charged only at the first occurrence of the event. Applicable only for non-recurring add-ons.\n", "items" : { "type" : "boolean", "default" : true, "deprecated" : false, "example" : null }, "example" : null } }, "example" : null }, "attached_addons" : { "type" : "object", "deprecated" : false, "description" : "Parameters for attached_addons\n", "properties" : { "id" : { "type" : "array", "description" : "Identifier of the addon attached with the plan. Only recurring addons can be attached with the plan.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "quantity" : { "type" : "array", "description" : "Quantity of the addon. Applicable for addons with `pricing_model`\nother than `flat_fee`\n.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "quantity_in_decimal" : { "type" : "array", "description" : "The default quantity of the addon to be attached when the quantity is not specified while [creating](/docs/api/v2/pcv-1/subscriptions/create-a-subscription)\n/ [updating](/docs/api/v2/pcv-1/subscriptions/update-a-subscription)\nthe subscription. The value is in decimal. Can be provided for quantity-based addons and only when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "billing_cycles" : { "type" : "array", "description" : "The number of billing cycles this addon will be attached to the plan.\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "type" : { "type" : "array", "items" : { "type" : "string", "deprecated" : false, "description" : "Specifies attachment type of the addon to the plan\n\n* recommended - Addon will be charged with this plan unless specifically removed.\n* mandatory - Addon will be always charged with this plan.\n", "enum" : [ "recommended", "mandatory" ], "example" : null }, "example" : null } }, "example" : null } }, "example" : null }, "encoding" : { "applicable_addons" : { "style" : "deepObject", "explode" : true }, "attached_addons" : { "style" : "deepObject", "explode" : true }, "event_based_addons" : { "style" : "deepObject", "explode" : true }, "tax_providers_fields" : { "style" : "deepObject", "explode" : true }, "tiers" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "plan" : { "$ref" : "#/components/schemas/Plan", "description" : "Resource object representing plan
" } }, "required" : [ "plan" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/addons/copy" : { "post" : { "summary" : "Copy an addon", "description" : "Creates an addon in this site by copying its configurations from another site. Copying of archived addons is not supported. \n**Note:**\nThe attribute *tax_profile_id*\nis not copied. In effect, if the plan is taxable, it will be mapped to the *Primary*\ntax profile.\n", "operationId" : "copy_an_addon", "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}(?:(?: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?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "from_site" : { "type" : "string", "deprecated" : false, "description" : "Your Chargebee site name having the addon to be copied.\n**Note:**\nUnless you are copying from a twin site (acme \\& acme-test are twin sites), [contact support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\nto have this allow-listed.\n", "maxLength" : 50, "example" : null }, "id_at_from_site" : { "type" : "string", "deprecated" : false, "description" : "Id of the addon to be copied. The new addon created in this site will have the same Id.\n", "maxLength" : 100, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Id of copied addon in this site.\n", "maxLength" : 100, "example" : null }, "for_site_merging" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If copy action is performed as part of Chargebee site merge action, pass the value as true.\n", "example" : null } }, "required" : [ "from_site", "id_at_from_site" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "addon" : { "$ref" : "#/components/schemas/Addon", "description" : "Resource object representing addon
" } }, "required" : [ "addon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/addons/{addon-id}/unarchive" : { "post" : { "summary" : "Unarchive an addon", "description" : "Unarchives a specific addon using the id.\n", "operationId" : "unarchive_an_addon", "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})):(?:(?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0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "addon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/addon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "addon" : { "$ref" : "#/components/schemas/Addon", "description" : "Resource object representing addon
" } }, "required" : [ "addon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/addons/{addon-id}" : { "get" : { "summary" : "Retrieve an addon", "description" : "Retrieve a specific addon using the ID.\n", "operationId" : "retrieve_an_addon", "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]|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0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "addon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/addon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "addon" : { "$ref" : "#/components/schemas/Addon", "description" : "Resource object representing addon
" } }, "required" : [ "addon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "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 addon", "description" : "When updating addons that already have an invoice or a subscription linked to it, you can only update the following parameters:\n\n* name\n* invoice_name\n* price\n* included_in_mrr\n* meta_data\n", "operationId" : "update_an_addon", "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])\\.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(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "addon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/addon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The display name used in web interface for identifying the addon.\n", "maxLength" : 100, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "Display name used in invoice. If it is not configured then name is used in invoice.\n", "maxLength" : 100, "example" : null }, "description" : { "type" : "string", "deprecated" : false, "description" : "Description about the addon to show in the hosted pages \\& customer portal. This description will not be shown if multiple addons are added.\n**Note:**\n\nIf your input contains characters that are subjected to sanitization (like incomplete HTML tags), the sanitization process might increase the length of your input. If the sanitized input exceeds the limit, your request will be rejected.\n", "maxLength" : 2000, "example" : null }, "charge_type" : { "type" : "string", "default" : "recurring", "deprecated" : false, "description" : "Type of charge.\n\n* non_recurring - Charged immediately and only once every time it is applied.\n* recurring - Charges are automatically applied in sync with the billing frequency of subscription.\n", "enum" : [ "recurring", "non_recurring" ], "example" : null }, "price" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "Addon price is calculated based on the addon type and charge type. [Learn more](https://www.chargebee.com/docs/addons.html#charge-type-and-pricing).\nThe unit depends on the [type of currency](/docs/api/getting-started)\n.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code (ISO 4217 format) of the addon. Applicable if Multicurrency is enabled.\n", "maxLength" : 3, "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Applicable only for recurring-addons. Along with 'period_unit' decides the term-price of this addon.\n", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "Applicable only for recurring-addons. Along with 'period' decides the term-price of this addon.\n\n* month - Charge based on month(s)\n* week - Charge based on week(s)\n* not_applicable - not applicable for this addon\n* year - Charge based on year(s)\n* day - Charge based on Day(S)\n", "enum" : [ "day", "week", "month", "year", "not_applicable" ], "example" : null }, "pricing_model" : { "type" : "string", "deprecated" : false, "description" : "Defines how the charges for the addons are calculated.\n\n* tiered - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* per_unit - A fixed price per unit quantity.\n* flat_fee - A fixed price that is not quantity-based.\n* volume - The per unit price is based on the tier that the total quantity falls in.\n* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.\n", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "unit" : { "type" : "string", "deprecated" : false, "description" : "Specifies the type of quantity. For example, if the addon price is $10 and 'agent' is the unit of measure, the addon will be $10/agent.\nApplicable only for quantity type addons.\n", "maxLength" : 30, "example" : null }, "enabled_in_portal" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "If enabled, customers can select this addon using the 'Change Subscription' option in the customer portal.\n", "example" : null }, "taxable" : { "type" : "boolean", "default" : true, "deprecated" : false, "description" : "Specifies whether taxes apply to this addon. This value is set and returned even if [Taxes](https://www.chargebee.com/docs/tax.html)\nhave been disabled in Chargebee. However, the value is effective only while Taxes are enabled.\n", "example" : null }, "tax_profile_id" : { "type" : "string", "deprecated" : false, "description" : "Tax profile of the addon.\n", "maxLength" : 50, "example" : null }, "avalara_sale_type" : { "type" : "string", "deprecated" : false, "description" : "Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n\n* retail - Transaction is a sale to an end user\n* vendor_use - Transaction is for an item that is subject to vendor use tax\n* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer\n* consumed - Transaction is for an item that is consumed directly\n", "enum" : [ "wholesale", "retail", "consumed", "vendor_use" ], "example" : null }, "avalara_transaction_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "avalara_service_type" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\nintegration.\n", "example" : null }, "tax_code" : { "type" : "string", "deprecated" : false, "description" : "The Avalara tax codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html)\n.\n", "maxLength" : 50, "example" : null }, "hsn_code" : { "type" : "string", "deprecated" : false, "description" : "The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html)\nto which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:\n\n* [**India**](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst) has been enabled as a **Tax Region**. (An error is returned when this condition is not true.)\n* The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.\n", "maxLength" : 50, "example" : null }, "taxjar_product_code" : { "type" : "string", "deprecated" : false, "description" : "The TaxJar product codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html)\n.\n", "maxLength" : 50, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the addon. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/v2/pcv-1/advanced-features)\n.\n", "example" : null }, "sku" : { "type" : "string", "deprecated" : false, "description" : "The field is used as Product name/code in your third party accounting application. Chargebee will use it as an alternate name in your accounting application.\n", "maxLength" : 100, "example" : null }, "accounting_code" : { "type" : "string", "deprecated" : false, "description" : "This field is to capture the Account code setup in your Accounting system for integration purposes only.\n", "maxLength" : 100, "example" : null }, "accounting_category1" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**Xero:**](https://www.chargebee.com/docs/1.0/xero.html ) If you've categorized your products in Xero, provide the category name and option. Use the format: `:` . For example:`Location: Singapore.`\n* [**QuickBooks:**](https://www.chargebee.com/docs/1.0/quickbooks.html ) If you've categorized your product sales in QuickBooks according to Classes, provide the class name here. Use the following format: `::...`\n* [**NetSuite:**](https://www.chargebee.com/docs/1.0/netsuite.html ) If you've categorized your products in NetSuite under Classes, provide the class name here. Use the following format: `: : ....` For example: `Services : Plan.`\n* [**Intacct:**](https://www.chargebee.com/docs/1.0/intacct.html ) If you've classified your products in Intacct under Locations, provide the name of the Location here.\n", "maxLength" : 100, "example" : null }, "accounting_category2" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**Xero:**](https://www.chargebee.com/docs/1.0/xero.html ) If you've categorized your products in Xero, then provide the second category name and option here. Use the format: `: ....` For example, `Region: South`\n* [**QuickBooks:**](https://www.chargebee.com/docs/1.0/quickbooks.html ) If you've categorized your product sales in QuickBooks according to Location, provide the Location name here. Use the following format: `::....` For example: `Location: North America: Canada`\n* [**NetSuite:**](https://www.chargebee.com/docs/1.0/netsuite.html ) If you've categorized your products in NetSuite under Locations, provide the location name here. Use the following format `: : ....` For example: `NA:US:CA`\n* [**Intacct:**](https://www.chargebee.com/docs/1.0/intacct.html ) If you've classified your products in Intacct under Dimensions, provide the value of the Dimension here.\n", "maxLength" : 100, "example" : null }, "accounting_category3" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**NetSuite:**](https://www.chargebee.com/docs/1.0/netsuite.html ) If you've categorized your products in NetSuite under Departments, pass the department name here. Use the following format: `: : ....` For example: `Production: Assembly.`\n* [**Intacct:**](https://www.chargebee.com/docs/1.0/intacct.html ) If you've classified your products in Intacct under multiple Dimensions, provide the value of the second Dimension here. .\n", "maxLength" : 100, "example" : null }, "accounting_category4" : { "type" : "string", "deprecated" : false, "description" : "Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/1.0/finance-integration-index.html )\n\n* [**NetSuite:**](https://www.chargebee.com/docs/1.0/netsuite.html ) Provide the \"Revenue Recognition Rule Id\" for the product from NetSuite.\n* [**Intacct:**](https://www.chargebee.com/docs/1.0/intacct.html ) If you have configured \"Revenue Recognition Templates\" for products in Intacct, provide the template ID for the product. .\n", "maxLength" : 100, "example" : null }, "is_shippable" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If enabled, charges for this plan/addon will be added to orders.\n", "example" : null }, "shipping_frequency_period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Defines the shipping frequency. Example: to bill customer every 2 weeks, provide \"2\" here.\n", "minimum" : 1, "example" : null }, "shipping_frequency_period_unit" : { "type" : "string", "deprecated" : false, "description" : "Defines the shipping frequency in association with shipping period.\n\n* day - Ship based on day(s)\n* week - Ship based on week(s)\n* month - Ship based on month(s)\n* year - Ship based on year(s)\n", "enum" : [ "year", "month", "week", "day" ], "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "The addon is included in MRR calculations for your site. This attribute is only applicable for addons of `charge_type = non_recurring`\nand when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude non-recurring addons from MRR calculations, this value is always returned `false`\n.\n", "example" : null }, "show_description_in_invoices" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the [addon description](/docs/api/v2/pcv-1/addons/addon-object)\nshould be shown on [invoice PDFs](/docs/api/invoices/retrieve-invoice-as-pdf).\nIf this Boolean is changed, only invoices generated (or [regenerated](https://www.chargebee.com/docs/invoice-operations.html#actions-for-payment-due-not-paid-invoices_regenerate-invoice)\n) after the change are affected; past invoices are not.\n", "example" : null }, "show_description_in_quotes" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "Whether the [addon description](/docs/api/v2/pcv-1/addons/addon-object)\nshould be shown on [quote PDFs](/docs/api/quotes/retrieve-quote-as-pdf).\nIf this Boolean is changed, only quotes created after the change are affected; past quotes are not.\n", "example" : null }, "price_in_decimal" : { "type" : "string", "deprecated" : false, "description" : "The price of the addon when the `pricing_model`\nis `flat_fee`.\nWhen the pricing model is `per_unit`\n, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n\nThis price is for the `period` of the addon. When attached to a plan, the addon is billed for the billing period of the plan. Learn more.\n", "maxLength" : 39, "example" : null }, "proration_type" : { "type" : "string", "default" : "site_default", "deprecated" : false, "description" : "**Note**\nApplicable only for addons with [pricing_model](/docs/api/v2/pcv-1/addons/addon-object#pricing_model) = `per_unit`.\n\nSpecifies how to manage charges or credits for the addon during a [subscription update](/docs/api/v2/pcv-1/subscriptions/update-a-subscription)\nor [estimating](/docs/api/v2/pcv-1/estimates/update-subscription-estimate)\na subscription update.\n\n* full_term - Charge the full price of the addon item price or give the full credit. Don't apply any proration.\n* site_default -\n Use the [site-wide proration setting](https://www.chargebee.com/docs/1.0/proration.html#proration-for-subscription-change)\n .\n* partial_term - Prorate the charges or credits for the rest of the current term.\n", "enum" : [ "site_default", "partial_term", "full_term" ], "example" : null }, "tiers" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tiers\n", "properties" : { "starting_unit" : { "type" : "array", "description" : "The lower limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "minimum" : 1, "example" : null }, "example" : null }, "ending_unit" : { "type" : "array", "description" : "The upper limit of a range of units for the tier\n", "items" : { "type" : "integer", "format" : "int32", "deprecated" : false, "example" : null }, "example" : null }, "price" : { "type" : "array", "description" : "The per-unit price for the tier when the `pricing_model`\nis `tiered`\nor `volume`\n; the total cost for the item price when the `pricing_model`\nis `stairstep`.\nThe value is in the [minor unit of the currency](/docs/api/v2/pcv-1/currencies)\n.\n", "items" : { "type" : "integer", "format" : "int64", "default" : 0, "deprecated" : false, "minimum" : 0, "example" : null }, "example" : null }, "starting_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal`\nof the next lower tier. Applicable only when the `pricing_model`\nis `tiered`\n, `volume`\nor `stairstep`\nand [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "ending_unit_in_decimal" : { "type" : "array", "description" : "The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal`\nof the next higher tier. Applicable only when the `pricing_model`\nis `tiered`\n, `volume`\nor `stairstep`\nand [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 33, "example" : null }, "example" : null }, "price_in_decimal" : { "type" : "array", "description" : "The decimal representation of the per-unit price for the tier when the `pricing_model`\nis `tiered`\nor `volume`.\nWhen the `pricing_model`\nis `stairstep`\n, it is the decimal representation of the total price for the plan. The value is in major units of the currency. Applicable when the plan is quantity-based and [multi-decimal pricing](/docs/api/v2/pcv-1/currencies)\nis enabled.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 39, "example" : null }, "example" : null } }, "example" : null }, "tax_providers_fields" : { "type" : "object", "deprecated" : false, "description" : "Parameters for tax_providers_fields\n", "properties" : { "provider_name" : { "type" : "array", "description" : "Name of the tax provider currently supported.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_id" : { "type" : "array", "description" : "Field id of the attribute which tax vendor has provided while getting onboarded with us.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null }, "field_value" : { "type" : "array", "description" : "The value of the corresponding tax field.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "required" : [ "field_id", "field_value", "provider_name" ], "example" : null } }, "example" : null }, "encoding" : { "tax_providers_fields" : { "style" : "deepObject", "explode" : true }, "tiers" : { "style" : "deepObject", "explode" : true } } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "addon" : { "$ref" : "#/components/schemas/Addon", "description" : "Resource object representing addon
" } }, "required" : [ "addon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/addons" : { "get" : { "summary" : "List addons", "description" : "List the addons. This returns all your current active and archived addons.\n", "operationId" : "list_addons", "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-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(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nA unique ID for your system to identify the addon.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"support_charge\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "support_charge", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "optional, string filter\n\nThe display name used in web interface for identifying the addon.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*name\\[is\\] = \"Support Charge\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Support Charge", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "pricing_model", "in" : "query", "description" : "optional, enumerated string filter\n\nDefines how the charges for the addons are calculated. Possible values are : flat_fee, per_unit, tiered, volume, stairstep.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*pricing_model\\[is\\] = \"flat_fee\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "flat_fee", "properties" : { "is" : { "type" : "string", "description" : "* `flat_fee` - A fixed price that is not quantity-based.\n* `per_unit` - A fixed price per unit quantity.\n* `tiered` - The per unit price is based on the tier that the total quantity falls in.\n* `volume` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* `stairstep` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `flat_fee` - A fixed price that is not quantity-based.\n* `per_unit` - A fixed price per unit quantity.\n* `tiered` - The per unit price is based on the tier that the total quantity falls in.\n* `volume` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* `stairstep` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "example" : null }, "in" : { "type" : "string", "description" : "* `flat_fee` - A fixed price that is not quantity-based.\n* `per_unit` - A fixed price per unit quantity.\n* `tiered` - The per unit price is based on the tier that the total quantity falls in.\n* `volume` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* `stairstep` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "pattern" : "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `flat_fee` - A fixed price that is not quantity-based.\n* `per_unit` - A fixed price per unit quantity.\n* `tiered` - The per unit price is based on the tier that the total quantity falls in.\n* `volume` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.\n* `stairstep` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.", "enum" : [ "flat_fee", "per_unit", "tiered", "volume", "stairstep" ], "pattern" : "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\]$", "example" : null } } } }, { "name" : "charge_type", "in" : "query", "description" : "optional, enumerated string filter\n\nType of charge. Possible values are : recurring, non_recurring.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*charge_type\\[is_not\\] = \"recurring\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "recurring", "properties" : { "is" : { "type" : "string", "description" : "* `recurring` - Charges are automatically applied in sync with the billing frequency of subscription.\n* `non_recurring` - Charged immediately and only once every time it is applied.", "enum" : [ "recurring", "non_recurring" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `recurring` - Charges are automatically applied in sync with the billing frequency of subscription.\n* `non_recurring` - Charged immediately and only once every time it is applied.", "enum" : [ "recurring", "non_recurring" ], "example" : null }, "in" : { "type" : "string", "description" : "* `recurring` - Charges are automatically applied in sync with the billing frequency of subscription.\n* `non_recurring` - Charged immediately and only once every time it is applied.", "enum" : [ "recurring", "non_recurring" ], "pattern" : "^\\[(recurring|non_recurring)(,(recurring|non_recurring))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `recurring` - Charges are automatically applied in sync with the billing frequency of subscription.\n* `non_recurring` - Charged immediately and only once every time it is applied.", "enum" : [ "recurring", "non_recurring" ], "pattern" : "^\\[(recurring|non_recurring)(,(recurring|non_recurring))*\\]$", "example" : null } } } }, { "name" : "price", "in" : "query", "description" : "optional, in cents filter\n\nAddon price is calculated based on the addon type and charge type. [Learn more](https://www.chargebee.com/docs/addons.html#charge-type-and-pricing).\nThe unit depends on the [type of currency](/docs/api/getting-started)\n.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*price\\[gte\\] = \"1300\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1300", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "period", "in" : "query", "description" : "optional, integer filter\n\nApplicable only for recurring-addons. Along with 'period_unit' decides the term-price of this addon.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*period\\[is\\] = \"3\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "3", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "period_unit", "in" : "query", "description" : "optional, enumerated string filter\n\nApplicable only for recurring-addons. Along with 'period' decides the term-price of this addon. Possible values are : day, week, month, year, not_applicable.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*period_unit\\[is_not\\] = \"month\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "month", "properties" : { "is" : { "type" : "string", "description" : "* `day` - Charge based on Day(S)\n* `week` - Charge based on week(s)\n* `month` - Charge based on month(s)\n* `year` - Charge based on year(s)\n* `not_applicable` - not applicable for this addon", "enum" : [ "day", "week", "month", "year", "not_applicable" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `day` - Charge based on Day(S)\n* `week` - Charge based on week(s)\n* `month` - Charge based on month(s)\n* `year` - Charge based on year(s)\n* `not_applicable` - not applicable for this addon", "enum" : [ "day", "week", "month", "year", "not_applicable" ], "example" : null }, "in" : { "type" : "string", "description" : "* `day` - Charge based on Day(S)\n* `week` - Charge based on week(s)\n* `month` - Charge based on month(s)\n* `year` - Charge based on year(s)\n* `not_applicable` - not applicable for this addon", "enum" : [ "day", "week", "month", "year", "not_applicable" ], "pattern" : "^\\[(day|week|month|year|not_applicable)(,(day|week|month|year|not_applicable))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `day` - Charge based on Day(S)\n* `week` - Charge based on week(s)\n* `month` - Charge based on month(s)\n* `year` - Charge based on year(s)\n* `not_applicable` - not applicable for this addon", "enum" : [ "day", "week", "month", "year", "not_applicable" ], "pattern" : "^\\[(day|week|month|year|not_applicable)(,(day|week|month|year|not_applicable))*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nStatus of the addon. Possible values are : active, archived, deleted.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is_not\\] = \"active\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - Only active addons can be applied to subscriptions\n* `archived` - No new associations with subscriptions are allowed. Existing associations for recurring addons remain as-is and can be removed if required.\n* `deleted` - Indicates the addon has been deleted.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - Only active addons can be applied to subscriptions\n* `archived` - No new associations with subscriptions are allowed. Existing associations for recurring addons remain as-is and can be removed if required.\n* `deleted` - Indicates the addon has been deleted.", "enum" : [ "active", "archived", "deleted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - Only active addons can be applied to subscriptions\n* `archived` - No new associations with subscriptions are allowed. Existing associations for recurring addons remain as-is and can be removed if required.\n* `deleted` - Indicates the addon has been deleted.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - Only active addons can be applied to subscriptions\n* `archived` - No new associations with subscriptions are allowed. Existing associations for recurring addons remain as-is and can be removed if required.\n* `deleted` - Indicates the addon has been deleted.", "enum" : [ "active", "archived", "deleted" ], "pattern" : "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at. This attribute will be present only if the resource has been updated after 2016-11-09.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[on\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "currency_code", "in" : "query", "description" : "optional, string filter\n\nThe currency code (ISO 4217 format) of the addon.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*currency_code\\[is\\] = \"USD\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "channel", "in" : "query", "description" : "optional, enumerated string filter\n\nThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*channel\\[is\\] = \"APP STORE\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "APP STORE", "properties" : { "is" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "example" : null }, "in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `web` - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI.\n* `app_store` - The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.\n* `play_store` -\n The object data is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. \n In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information.\n", "enum" : [ "web", "app_store", "play_store" ], "pattern" : "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\]$", "example" : null } } } }, { "name" : "include_deleted", "in" : "query", "description" : "If set to true, includes the deleted resources in the response. For the deleted resources in the response, the '**deleted**\n' attribute will be '**true**\n'.\n", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false, "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "addon" : { "$ref" : "#/components/schemas/Addon", "description" : "Resource object representing addon" } }, "required" : [ "addon" ], "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.
Resource object representing addon
" } }, "required" : [ "addon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/addons/{addon-id}/delete" : { "post" : { "summary" : "Delete an addon", "description" : "When an addon that already has subscriptions/invoices linked to it is deleted, it does not get completely purged but is instead moved to \"Archived\" state. No other subscriptions can use this addon but subscriptions already on it will continue to renew. Once an addon has been archived, it cannot be edited or used again and the addon cannot be un-archived.\n\nIf no subscriptions or invoices are linked to an addon, the addon will be permanently deleted from your Chargebee site. This action cannot be undone.\n\nIf an addon that is an applicable item for a coupon is deleted, then the addon will be removed from that coupon's list of applicable items.\n\nArchiving an addon will not affect coupons in anyway.\n", "operationId" : "delete_an_addon", "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])))))))|(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-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "addon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/addon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "addon" : { "$ref" : "#/components/schemas/Addon", "description" : "Resource object representing addon
" } }, "required" : [ "addon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupons" : { "get" : { "summary" : "List coupons", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nList all the available coupons that are created for a specific promotion or offers. You can find list of coupon codes that are currently active, expired, archived or deleted.\n", "operationId" : "list_coupons", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))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:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUsed to uniquely identify the coupon in your website/application and to integrate with Chargebee. \n**Note:**\n\nWhen the coupon ID contains a special character; for example: `#`, the API returns an error. Make sure that you [encode](https://www.urlencoder.org/) the coupon ID in the path parameter before making an API call.\n\n.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"OFF2008\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF2008", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "optional, string filter\n\nThe display name used in web interface for identifying the coupon. \n**Note:**\n\nWhen the name of the coupon set contains a special character; for example: `#`, the API returns an error. Make sure that you [encode](https://www.urlencoder.org/) the name of the coupon set in the path parameter before making an API call.\n\n.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*name\\[is\\] = \"Offer 10\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "Offer 10", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "discount_type", "in" : "query", "description" : "optional, enumerated string filter\n\nThe type of deduction. Possible values are : fixed_amount, percentage.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*discount_type\\[is\\] = \"fixed_amount\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "fixed_amount", "properties" : { "is" : { "type" : "string", "description" : "* `fixed_amount` - The specified amount will be deducted.\n* `percentage` - The specified percentage will be deducted.\n* `offer_quantity` - The specified units will be offered without any deduction.", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `fixed_amount` - The specified amount will be deducted.\n* `percentage` - The specified percentage will be deducted.\n* `offer_quantity` - The specified units will be offered without any deduction.", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "in" : { "type" : "string", "description" : "* `fixed_amount` - The specified amount will be deducted.\n* `percentage` - The specified percentage will be deducted.\n* `offer_quantity` - The specified units will be offered without any deduction.", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "pattern" : "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `fixed_amount` - The specified amount will be deducted.\n* `percentage` - The specified percentage will be deducted.\n* `offer_quantity` - The specified units will be offered without any deduction.", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "pattern" : "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\]$", "example" : null } } } }, { "name" : "duration_type", "in" : "query", "description" : "optional, enumerated string filter\n\nSpecifies the time duration for which this coupon is attached to the subscription. Possible values are : one_time, forever, limited_period.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*duration_type\\[is\\] = \"forever\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "forever", "properties" : { "is" : { "type" : "string", "description" : "* `one_time` - The coupon stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `limited_period` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`.\n", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `one_time` - The coupon stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `limited_period` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`.\n", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "in" : { "type" : "string", "description" : "* `one_time` - The coupon stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `limited_period` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`.\n", "enum" : [ "one_time", "forever", "limited_period" ], "pattern" : "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `one_time` - The coupon stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription.\n* `forever` - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* `limited_period` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`.\n", "enum" : [ "one_time", "forever", "limited_period" ], "pattern" : "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\]$", "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nStatus of the coupon. Possible values are : active, expired, archived, deleted.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"active\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "active", "properties" : { "is" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding [max_redemptions](/docs/api/coupons?#coupon_max_redemptions) or [valid_till](/docs/api/coupons?#coupon_valid_till) date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n", "enum" : [ "active", "expired", "archived", "deleted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding [max_redemptions](/docs/api/coupons?#coupon_max_redemptions) or [valid_till](/docs/api/coupons?#coupon_valid_till) date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n", "enum" : [ "active", "expired", "archived", "deleted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding [max_redemptions](/docs/api/coupons?#coupon_max_redemptions) or [valid_till](/docs/api/coupons?#coupon_valid_till) date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n", "enum" : [ "active", "expired", "archived", "deleted" ], "pattern" : "^\\[(active|expired|archived|deleted)(,(active|expired|archived|deleted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `active` - Can be applied to a subscription.\n* `expired` - Cannot be applied to a subscription. A coupon may expire due to exceeding [max_redemptions](/docs/api/coupons?#coupon_max_redemptions) or [valid_till](/docs/api/coupons?#coupon_valid_till) date is past. Existing associations remain unaffected.\n* `archived` - Cannot be applied to a subscription. Existing associations remain unaffected.\n* `deleted` - Indicates the coupon has been deleted.\n", "enum" : [ "active", "expired", "archived", "deleted" ], "pattern" : "^\\[(active|expired|archived|deleted)(,(active|expired|archived|deleted))*\\]$", "example" : null } } } }, { "name" : "apply_on", "in" : "query", "description" : "optional, enumerated string filter\n\nThe amount on the invoice to which the coupon is applied. Possible values are : invoice_amount, each_specified_item.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*apply_on\\[is\\] = \"invoice_amount\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "invoice_amount", "properties" : { "is" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice `sub_total`.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -\n The coupon is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. \n The coupon is applied to the `invoice.line_item.amount` that corresponds to the plan or addon specified by `plan_ids` and `addon_ids`.\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.\n", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice `sub_total`.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -\n The coupon is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. \n The coupon is applied to the `invoice.line_item.amount` that corresponds to the plan or addon specified by `plan_ids` and `addon_ids`.\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.\n", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "in" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice `sub_total`.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -\n The coupon is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. \n The coupon is applied to the `invoice.line_item.amount` that corresponds to the plan or addon specified by `plan_ids` and `addon_ids`.\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.\n", "enum" : [ "invoice_amount", "each_specified_item" ], "pattern" : "^\\[(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items)(,(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `invoice_amount` - The coupon is applied to the invoice `sub_total`.\n* `specified_items_total` - **(Deprecated)** Discount will be applied to the total of plan and addon items specified.\n* `each_specified_item` -\n The coupon is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. \n The coupon is applied to the `invoice.line_item.amount` that corresponds to the plan or addon specified by `plan_ids` and `addon_ids`.\n* `each_unit_of_specified_items` - **(Deprecated)** Discount will be applied to each unit of plan and addon items specified.\n", "enum" : [ "invoice_amount", "each_specified_item" ], "pattern" : "^\\[(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items)(,(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items))*\\]$", "example" : null } } } }, { "name" : "created_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTimestamp indicating when this coupon is created.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*created_at\\[after\\] = \"145222875\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "145222875", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "updated_at", "in" : "query", "description" : "optional, timestamp(UTC) in seconds filter\n\nTo filter based on updated at. This attribute will be present only if the resource has been updated after 2016-11-09.\n**Supported operators :**\nafter, before, on, between\n\n**Example →**\n*updated_at\\[after\\] = \"1243545465\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "1243545465", "properties" : { "after" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "before" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "on" : { "type" : "string", "format" : "unix-time", "pattern" : "^\\d{10}$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[\\d{10},\\d{10}\\]$", "example" : null } } } }, { "name" : "sort_by", "in" : "query", "description" : "optional, string filter\n\nSorts based on the specified attribute.\n**Supported attributes :**\ncreated_at\n\n**Supported sort-orders :**\nasc, desc\n\n**Example →**\n*sort_by\\[asc\\] = \"created_at\"*\n\nThis will sort the result based on the 'created_at' attribute in ascending(earliest first) order.\n", "required" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "additionalProperties" : true, "properties" : { "asc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null }, "desc" : { "type" : "string", "enum" : [ "created_at" ], "example" : null } }, "example" : null } }, { "name" : "currency_code", "in" : "query", "description" : "optional, string filter\n\nThe currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)\n) of the coupon. Applicable for *fixed_amount*\ncoupons alone.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*currency_code\\[is\\] = \"USD\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "USD", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "applicable_item_price_ids", "in" : "query", "description" : "List of itemPrice ids for which these coupons are applicable.\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "day-pass-USD", "properties" : { "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "is" : { "type" : "string", "minLength" : 1, "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "Resource object representing coupon" } }, "required" : [ "coupon" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing coupon
" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupons/{coupon-id}/unarchive" : { "post" : { "summary" : "Unarchive a coupon", "description" : "This API unarchives a specific coupon using the coupon ID.\n", "operationId" : "unarchive_a_coupon", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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A-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "coupon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "Resource object representing coupon
" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupons/{coupon-id}/delete" : { "post" : { "summary" : "Delete a coupon", "description" : "If no Subscriptions/Invoices are linked to this Coupon, the Coupon will be deleted from your Chargebee site. This action cannot be undone.\n\nTo ensure that existing Subscriptions/Invoices are not affected, Coupons associated with them will not be deleted, but moved to \"Archived\" state. Once a Coupon has been archived, it cannot be edited or used again unless [unarchived](/docs/api/coupons/unarchive-a-coupon). Unused Coupons codes are deleted.\n", "operationId" : "delete_a_coupon", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|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-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "coupon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "Resource object representing coupon
" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupons/copy" : { "post" : { "summary" : "Copy a coupon", "description" : "Creates a coupon in this site by copying its configurations from another site. Copying of archived coupons is not supported. \n**Note:**\n\n* The plans and addons (refer plan_constraint, plan_ids, addon_constraint, addon_ids) that are linked will also be copied. E.g. in the source site, the coupon C1 has P1 and P2 as applicable plans. Now, if in the destination site only the plan P1 is present, the newly created coupon will have only P1 as the applicable plan. So we recommend that you copy the necessary plans and addons before copying the coupons.\n* The 'redemptions' count is not copied. It will be 0 for the newly created coupon. Hence, if you are copying a Expired coupon (expired because max_redemptions is reached), its status will be 'Active' when created.\n", "operationId" : "copy_a_coupon", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : { "from_site" : { "type" : "string", "deprecated" : false, "description" : "Your Chargebee site name having the coupon to be copied.\n**Note:**\nUnless you are copying from a twin site (acme \\& acme-test are twin sites), [contact support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support)\nto have this allow-listed.\n", "maxLength" : 50, "example" : null }, "id_at_from_site" : { "type" : "string", "deprecated" : false, "description" : "Id of the coupon to be copied. The new coupon created in this site will have the same Id.\n", "maxLength" : 100, "example" : null }, "id" : { "type" : "string", "deprecated" : false, "description" : "Id of copied coupon in this site.\n", "maxLength" : 100, "example" : null }, "for_site_merging" : { "type" : "boolean", "default" : false, "deprecated" : false, "description" : "If copy action is performed as part of Chargebee site merge action, pass the value as true.\n**Note:**\nIf this parameter is passed true coupon state, redmeptions, coupon set and coupon codes associated with this coupon will be copied.\n", "example" : null } }, "required" : [ "from_site", "id_at_from_site" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "Resource object representing coupon
" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupons/{coupon-id}" : { "get" : { "summary" : "Retrieve a coupon", "description" : "**Important**\n\nFor sites where both [legacy and latest](/docs/api/v2/pcv-1/upgrade#retrieving-api-responses-in-latest-api-format) product catalog versions are active, GET API requests return responses in a `compat` format by default. This format works with both latest and legacy Product Catalog.\n\n**Override options:**\n\n* `chargebee-response-schema-type: items` → Return response in latest product catalog format only.\n* `chargebee-response-schema-type: plans_addons` → Return response in legacy product catalog format only.\n\nThis API retrieves a specific coupon using the coupon ID.\n", "operationId" : "retrieve_a_coupon", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})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:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "coupon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "Resource object representing coupon
" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] }, "post" : { "summary" : "Update a coupon", "description" : "When updating coupons that are already linked to an invoice or subscription you can only update the following parameters:\n\n* name\n* invoice name\n* plan_constraint - Applicable when apply_on is set as each_specified_item. Allows change from none to all, none to specific, and specific to all.\n* addon_constraint - Applicable when apply_on is set as each_specified_item. Allows change from none to all, none to specific, and specific to all.\n* plan_ids - Applicable when plan_constraint is set as specific. Allows addition of new plan_ids. However, existing plan_ids cannot be removed.\n* addon_ids - Applicable when addon_constraint is set as specific. Allows addition of new addon_ids. However, existing addon_ids cannot be removed.\n* valid_till\n* max_redemptions\n* invoice_notes\n* included_in_mrr\n* meta_data\n", "operationId" : "update_a_coupon", "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" : "coupon-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "The display name used in web interface for identifying the coupon. \n**Note:**\n\nWhen the name of the coupon set contains a special character; for example: `#`, the API returns an error. Make sure that you [encode](https://www.urlencoder.org/) the name of the coupon set in the path parameter before making an API call.\n\n.\n", "maxLength" : 50, "example" : null }, "invoice_name" : { "type" : "string", "deprecated" : false, "description" : "Display name used in invoice. If it is not configured then name is used in invoice.\n", "maxLength" : 100, "example" : null }, "discount_type" : { "type" : "string", "default" : "percentage", "deprecated" : false, "description" : "Specifies the type of discount to be applied.\n\n* fixed_amount -\n A fixed amount is deducted as a discount. The discount amount is specified in [discount_amount](/docs/api/v2/pcv-1/coupons/update-a-coupon#discount_amount). \n [Learn more](https://www.chargebee.com/docs/1.0/coupons.html#fixed-amount)\n about `fixed_amount`\n coupons.\n* percentage -\n A percentage of the original price is deducted as a discount. The discount percentage is specified in [discount_percentage](/docs/api/v2/pcv-1/coupons/update-a-coupon#discount_percentage). \n [Learn more](https://www.chargebee.com/docs/1.0/coupons.html#percentage)\n about `percentage`\n coupons.\n* offer_quantity -\n A specified number of units of the plan or addon are offered for free. The number of free units is specified in [discount_quantity](/docs/api/v2/pcv-1/coupons/update-a-coupon#discount_quantity).\n The `offer_quantity`\n option is valid only when [apply_on](/docs/api/v2/pcv-1/coupons/update-a-coupon#apply_on)\n is set to `each_specified_item`\n and the `pricing_model`\n of the [plan](/docs/api/v2/pcv-1/plans/plan-object#pricing_model)\n or addon is `per_unit`. \n [Learn more](https://www.chargebee.com/docs/1.0/coupons.html#offer-quantity)\n about `offer_quantity`\n coupons.\n", "enum" : [ "fixed_amount", "percentage", "offer_quantity" ], "example" : null }, "discount_amount" : { "type" : "integer", "format" : "int64", "deprecated" : false, "description" : "The value of the deduction. The format of this value depends on the [kind of currency](/docs/api/currencies)\n.\n", "minimum" : 0, "example" : null }, "currency_code" : { "type" : "string", "deprecated" : false, "description" : "The currency code ([ISO 4217 format](https://www.chargebee.com/docs/2.0/supported-currencies.html)\n) of the coupon. Applicable for *fixed_amount*\ncoupons alone.\n", "maxLength" : 3, "example" : null }, "discount_percentage" : { "type" : "number", "format" : "double", "deprecated" : false, "description" : "The percentage of the original amount that should be deducted from it.\n", "maximum" : 100, "minimum" : 0.01, "example" : null }, "discount_quantity" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Specifies the number of free units provided for the [plan](/docs/api/v2/pcv-1/plans)\nor [addon](/docs/api/v2/pcv-1/addons)\n, without affecting the total quantity sold. This parameter is applicable only when the [discount_type](/docs/api/v2/pcv-1/coupons/update-a-coupon#discount_type)\nis set to `offer_quantity`\n.\n", "minimum" : 1, "example" : null }, "apply_on" : { "type" : "string", "deprecated" : false, "description" : "The amount on the invoice to which the coupon is applied.\n\n* invoice_amount -\n The coupon is applied to the invoice `sub_total`\n .\n* each_specified_item -\n The coupon is applied to the `invoice.line_item.amount`\n that corresponds to the plan or addon specified by `plan_ids`\n and `addon_ids`\n .\n", "enum" : [ "invoice_amount", "each_specified_item" ], "example" : null }, "duration_type" : { "type" : "string", "default" : "forever", "deprecated" : false, "description" : "Specifies the time duration for which this coupon is attached to the subscription.\n\n* forever - The coupon is attached to the subscription and applied on the invoices until explicitly removed.\n* limited_period -\n The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period`\n and `period_unit`\n .\n* one_time -\n The coupon stays attached to the subscription till it is applied on an invoice **once**.\n It is removed after that from the subscription.\n", "enum" : [ "one_time", "forever", "limited_period" ], "example" : null }, "duration_month" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "**(Deprecated)**\nThe duration of time in months for which the coupon is attached to the subscription. Applicable only when `duration_type`\nis `limited_period`.\n\n**Note:**\nThis parameter has been deprecated. Use `period`\nand `period_unit`\ninstead.\n", "maximum" : 240, "minimum" : 1, "example" : null }, "valid_till" : { "type" : "integer", "format" : "unix-time", "deprecated" : false, "description" : "Date upto which the coupon can be applied to new subscriptions.\n", "example" : null }, "max_redemptions" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "Maximum number of times this coupon can be redeemed. \n**Note:**\n\nIf not specified, the coupon can be redeemed an indefinite number of times.\n\n.\n", "minimum" : 1, "example" : null }, "invoice_notes" : { "type" : "string", "deprecated" : false, "description" : "A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices/invoice-object#notes)\ndisplayed on the invoice PDF.\n", "maxLength" : 2000, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the coupon. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/v2/pcv-1/advanced-features)\n.\n", "example" : null }, "included_in_mrr" : { "type" : "boolean", "deprecated" : false, "description" : "The coupon is included in MRR calculations for your site. This attribute is only applicable for coupons of `duration_type = one_time`\nand when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude one-time coupons from MRR calculations, this value is always returned `false`\n.\n", "example" : null }, "period" : { "type" : "integer", "format" : "int32", "deprecated" : false, "description" : "The duration of time for which the coupon is attached to the subscription, in `period_units`.\nApplicable only when [duration_type](/docs/api/coupons/coupon-object#duration_type)\nis [limited_period](/docs/api/coupons/coupon-object#duration_type)\n.\n", "minimum" : 1, "example" : null }, "period_unit" : { "type" : "string", "deprecated" : false, "description" : "The unit of time for period. Applicable only when [duration_type](/docs/api/coupons/coupon-object#duration_type)\nis [limited_period](/docs/api/coupons/coupon-object#duration_type)\n.\n\n* year - A period of 1 calendar year.\n* month - A period of 1 calendar month.\n* week - A period of 7 days.\n* day - A period of 24 hours.\n", "enum" : [ "day", "week", "month", "year" ], "example" : null }, "plan_constraint" : { "type" : "string", "deprecated" : false, "description" : "Plans the coupon can be applied to.\n\n* all - Coupon applicable to all plans.\n* specific - Coupon only applicable to specified plans. If used, it is mandatory to specify the plan(s).\n* none - Coupon not applicable to any plans.\n", "enum" : [ "none", "all", "specific" ], "example" : null }, "addon_constraint" : { "type" : "string", "deprecated" : false, "description" : "Addons the coupon can be applied to.\n\n* specific - Coupon only applicable to specified addons. If used, it is mandatory to specify the addon(s).\n* all - Coupon applicable to all addons.\n* none - Coupon not applicable to any addons.\n", "enum" : [ "none", "all", "specific" ], "example" : null }, "plan_ids" : { "type" : "array", "deprecated" : false, "description" : "Identifier of the plan.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null }, "addon_ids" : { "type" : "array", "deprecated" : false, "description" : "Identifier of the addon.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 100, "example" : null }, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon" : { "$ref" : "#/components/schemas/Coupon", "description" : "Resource object representing coupon
" } }, "required" : [ "coupon" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupon_sets" : { "get" : { "summary" : "List coupon sets", "description" : "Use this API to get the list of all the coupon sets.\n", "operationId" : "list_coupon_sets", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUniquely identifies a coupon_set.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is\\] = \"bulk-codes-1\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "bulk-codes-1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "name", "in" : "query", "description" : "optional, string filter\n\nName of the coupon set.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*name\\[is\\] = \"bulk-codes-1\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "bulk-codes-1", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "coupon_id", "in" : "query", "description" : "optional, string filter\n\nCoupon id linked to coupon set.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*coupon_id\\[is_not\\] = \"OFF2008\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF2008", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "total_count", "in" : "query", "description" : "optional, integer filter\n\nNo of coupon codes present in coupon set.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*total_count\\[is_not\\] = \"10\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "10", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "redeemed_count", "in" : "query", "description" : "optional, integer filter\n\nNo of redeemed codes.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*redeemed_count\\[gt\\] = \"5\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "5", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } }, { "name" : "archived_count", "in" : "query", "description" : "optional, integer filter\n\nNo of archived codes.\n**Supported operators :**\nis, is_not, lt, lte, gt, gte, between\n\n**Example →**\n*archived_count\\[lte\\] = \"2\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "2", "properties" : { "is" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "is_not" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "lte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gt" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "gte" : { "type" : "string", "format" : "number", "pattern" : "^-?\\d+$", "example" : null }, "between" : { "type" : "string", "pattern" : "^\\[-?\\d+,-?\\d+\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "Resource object representing coupon_set" } }, "required" : [ "coupon_set" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing coupon_set
" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupon_sets/{coupon-set-id}/update" : { "post" : { "summary" : "Update a coupon set", "description" : "Use this API to update a specific coupon set by updating its `name` and the `meta_data`.\n", "operationId" : "update_a_coupon_set", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]|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{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-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" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "name" : { "type" : "string", "deprecated" : false, "description" : "Name of the coupon set.\n", "maxLength" : 50, "example" : null }, "meta_data" : { "type" : "object", "additionalProperties" : true, "deprecated" : false, "description" : "A collection of key-value pairs that provides extra information about the coupon set. \n**Note:**\nThere's a character limit of 65,535.\n\n[Learn more](/docs/api/v2/pcv-1/advanced-features)\n.\n", "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "Resource object representing coupon_set
" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupon_sets/{coupon-set-id}" : { "get" : { "summary" : "Retrieve a coupon set", "description" : "Use this API to retrieve a specific coupon set.\n", "operationId" : "retrieve_a_coupon_set", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])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:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "Resource object representing coupon_set
" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupon_sets/{coupon-set-id}/add_coupon_codes" : { "post" : { "summary" : "Add coupon codes to coupon set", "description" : "This API add coupon codes to an existing coupon set.\n", "operationId" : "add_coupon_codes_to_coupon_set", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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]{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]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "requestBody" : { "content" : { "application/x-www-form-urlencoded" : { "schema" : { "type" : "object", "properties" : { "code" : { "type" : "array", "deprecated" : false, "description" : "You can pass up to 100 values per API call. You can also use the Chargebee UI to pass up to 1000 codes per operation. There is no limit on the total number of coupon codes that can be included in a coupon set.\n", "items" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null }, "example" : null } }, "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "Resource object representing coupon_set
" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupon_sets/{coupon-set-id}/delete_unused_coupon_codes" : { "post" : { "summary" : "Delete unused coupon codes", "description" : "Use this API to delete all the unutilised coupon codes from a specific coupon set.\n", "operationId" : "delete_unused_coupon_codes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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[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|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "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" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "Resource object representing coupon_set
" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupon_sets/{coupon-set-id}/delete" : { "post" : { "summary" : "Delete a coupon set", "description" : "Use this endpoint to delete a specific coupon set\n", "operationId" : "delete_a_coupon_set", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])))))))|(?:(?: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1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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" : "coupon-set-id", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-set-id", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_set" : { "$ref" : "#/components/schemas/CouponSet", "description" : "Resource object representing coupon_set
" } }, "required" : [ "coupon_set" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupon_codes" : { "get" : { "summary" : "List coupon codes", "description" : "List the available coupon codes.\n", "operationId" : "list_coupon_codes", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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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]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "code", "in" : "query", "description" : "optional, string filter\n\nUnique coupon code that can be redeemed only once.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*code\\[is\\] = \"OFF2009\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF2009", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "coupon_id", "in" : "query", "description" : "optional, string filter\n\nId of the main coupon resource.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*coupon_id\\[is\\] = \"OFF20\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF20", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "coupon_set_name", "in" : "query", "description" : "optional, string filter\n\nCoupon set name to which this coupon code would be grouped under. If the coupon set with the passed name is not present, a new coupon set will be created.\n**Supported operators :**\nis, is_not, starts_with\n\n**Example →**\n*coupon_set_name\\[is_not\\] = \"OFF20\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "OFF20", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null } } } }, { "name" : "status", "in" : "query", "description" : "optional, enumerated string filter\n\nStatus of the coupon code. Possible values are : not_redeemed, redeemed, archived.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*status\\[is\\] = \"redeemed\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "redeemed", "properties" : { "is" : { "type" : "string", "description" : "* `not_redeemed` - Can be applied to a subscription.\n* `redeemed` - Cannot be applied to a subscription as the coupon code has been already used.\n* `archived` - Cannot be applied to a subscription as it has been made inactive.", "enum" : [ "not_redeemed", "redeemed", "archived" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `not_redeemed` - Can be applied to a subscription.\n* `redeemed` - Cannot be applied to a subscription as the coupon code has been already used.\n* `archived` - Cannot be applied to a subscription as it has been made inactive.", "enum" : [ "not_redeemed", "redeemed", "archived" ], "example" : null }, "in" : { "type" : "string", "description" : "* `not_redeemed` - Can be applied to a subscription.\n* `redeemed` - Cannot be applied to a subscription as the coupon code has been already used.\n* `archived` - Cannot be applied to a subscription as it has been made inactive.", "enum" : [ "not_redeemed", "redeemed", "archived" ], "pattern" : "^\\[(not_redeemed|redeemed|archived)(,(not_redeemed|redeemed|archived))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `not_redeemed` - Can be applied to a subscription.\n* `redeemed` - Cannot be applied to a subscription as the coupon code has been already used.\n* `archived` - Cannot be applied to a subscription as it has been made inactive.", "enum" : [ "not_redeemed", "redeemed", "archived" ], "pattern" : "^\\[(not_redeemed|redeemed|archived)(,(not_redeemed|redeemed|archived))*\\]$", "example" : null } } } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "list" : { "type" : "array", "items" : { "type" : "object", "properties" : { "coupon_code" : { "$ref" : "#/components/schemas/CouponCode", "description" : "Resource object representing coupon_code" } }, "required" : [ "coupon_code" ], "example" : null }, "example" : null }, "next_offset" : { "type" : "string", "description" : "This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.
Resource object representing coupon_code
" } }, "required" : [ "coupon_code" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/coupon_codes/{coupon-code-code}/archive" : { "post" : { "summary" : "Archive a coupon code", "description" : "Archives a coupon code thereby making it inactive. The archived coupon code cannot be applied to any subscription.\n", "operationId" : "archive_a_coupon_code", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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[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2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : "coupon-code-code", "in" : "path", "required" : true, "deprecated" : false, "$ref" : "#/components/parameters/coupon-code-code", "style" : "simple", "explode" : false, "schema" : { "type" : "string", "example" : null } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "coupon_code" : { "$ref" : "#/components/schemas/CouponCode", "description" : "Resource object representing coupon_code
" } }, "required" : [ "coupon_code" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/addresses" : { "get" : { "summary" : "Retrieve an address", "description" : "Retrieves an address resource for a subscription and the specified label.\n", "operationId" : "retrieve_an_address", "parameters" : [ { "name" : "subscription_id", "in" : "query", "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, { "name" : "label", "in" : "query", "description" : "Label to identify the address. This is unique for all the address for a subscription.\n", "required" : true, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "deprecated" : false, "maxLength" : 50, "example" : null } }, { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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,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0-9a-fA-F]{1,4})))?::)))))$" } } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "address" : { "$ref" : "#/components/schemas/Address", "description" : "Resource object representing address
" } }, "required" : [ "address" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] }, "post" : { "summary" : "Update an address", "description" : "Adds or replaces the address for a subscription. If an address is already present for the specified label, it will be replaced otherwise new address is added with that label.\n", "operationId" : "update_an_address", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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})))|(?:(?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(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "chargebee-event-actions", "in" : "header", "description" : "skip all actions to be done on the events", "required" : false, "deprecated" : 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" : { "subscription_id" : { "type" : "string", "deprecated" : false, "description" : "A unique and immutable identifier for the subscription. If not provided, it is autogenerated.\n", "maxLength" : 50, "example" : null }, "label" : { "type" : "string", "deprecated" : false, "description" : "Label to identify the address. This is unique for all the address for a subscription.\n", "maxLength" : 50, "example" : null }, "first_name" : { "type" : "string", "deprecated" : false, "description" : "First name.\n", "maxLength" : 150, "example" : null }, "last_name" : { "type" : "string", "deprecated" : false, "description" : "Last name.\n", "maxLength" : 150, "example" : null }, "email" : { "type" : "string", "format" : "email", "deprecated" : false, "description" : "Email.\n", "maxLength" : 70, "example" : null }, "company" : { "type" : "string", "deprecated" : false, "description" : "Company name.\n", "maxLength" : 250, "example" : null }, "phone" : { "type" : "string", "deprecated" : false, "description" : "Phone number.\n", "maxLength" : 50, "example" : null }, "addr" : { "type" : "string", "deprecated" : false, "description" : "Address line 1.\n", "maxLength" : 150, "example" : null }, "extended_addr" : { "type" : "string", "deprecated" : false, "description" : "Address line 2.\n", "maxLength" : 150, "example" : null }, "extended_addr2" : { "type" : "string", "deprecated" : false, "description" : "Address line 3.\n", "maxLength" : 150, "example" : null }, "city" : { "type" : "string", "deprecated" : false, "description" : "Name of the city.\n", "maxLength" : 50, "example" : null }, "state_code" : { "type" : "string", "deprecated" : false, "description" : "The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code)\nwithout the country prefix. Currently supported for USA, Canada, India and UAE. For instance, for Arizona (USA), set `state_code`\nas `AZ`\n(not `US-AZ`\n). For Tamil Nadu (India), set as `TN`\n(not `IN-TN`\n). For British Columbia (Canada), set as `BC`\n(not `CA-BC`\n). For Dubai (UAE), set as `DU`\n(not `AE-DU`\n).\n", "maxLength" : 50, "example" : null }, "state" : { "type" : "string", "deprecated" : false, "description" : "The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `state_code`\nis provided.\n", "maxLength" : 50, "example" : null }, "zip" : { "type" : "string", "deprecated" : false, "description" : "Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address)\n.\n", "maxLength" : 20, "example" : null }, "country" : { "type" : "string", "deprecated" : false, "description" : "The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html)\n.\n\n**Note**:\nIf you enter an invalid country code, the system will return an error. \n**Brexit**\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.\n\n.\n", "maxLength" : 50, "example" : null }, "validation_status" : { "type" : "string", "default" : "not_validated", "deprecated" : false, "description" : "The address verification status.\n\n* partially_valid - The address is valid for taxability but has not been validated for shipping.\n* not_validated - Address is not yet validated.\n* invalid - Address is invalid.\n* valid - Address was validated successfully.\n", "enum" : [ "not_validated", "valid", "partially_valid", "invalid" ], "example" : null } }, "required" : [ "label", "subscription_id" ], "example" : null }, "encoding" : { } } } }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { "type" : "object", "properties" : { "address" : { "$ref" : "#/components/schemas/Address", "description" : "Resource object representing address
" } }, "required" : [ "address" ], "example" : null } } } }, "400" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/400" } } } }, "401" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/401" } } } }, "403" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/403" } } } }, "404" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/404" } } } }, "405" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/405" } } } }, "409" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/409" } } } }, "422" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/422" } } } }, "429" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/429" } } } }, "500" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/500" } } } }, "503" : { "description" : "on error", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/503" } } } } }, "deprecated" : false, "security" : [ { "BasicAuth" : [ ] } ] } }, "/events" : { "get" : { "summary" : "List events", "description" : "Retrieves list of events.\n", "operationId" : "list_events", "parameters" : [ { "name" : "chargebee-request-origin-device", "in" : "header", "description" : "The device from which the customer has made the request", "required" : false, "deprecated" : false, "$ref" : "#/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])\\.)*([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0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" } }, { "name" : "limit", "in" : "query", "description" : "The number of resources to be returned.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10, "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.\n", "required" : false, "deprecated" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "maxLength" : 1000, "example" : null } }, { "name" : "id", "in" : "query", "description" : "optional, string filter\n\nUniquely identifies a event.\n**Supported operators :**\nis, is_not, starts_with, in, not_in\n\n**Example →**\n*id\\[is_not\\] = \"8ndk0hbKm\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "8ndk0hbKm", "properties" : { "is" : { "type" : "string", "minLength" : 1, "example" : null }, "is_not" : { "type" : "string", "minLength" : 1, "example" : null }, "starts_with" : { "type" : "string", "minLength" : 1, "example" : null }, "in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null }, "not_in" : { "type" : "string", "pattern" : "^\\[(.*)(,.*)*\\]$", "example" : null } } } }, { "name" : "webhook_status", "in" : "query", "description" : "optional, enumerated string filter\n\nReturns the events (occurred in the past 6 days) which has this status in any of the events' webhooks.\n**Note**:\nTo retrieve events which have occurred before the 6 day period, use the occurred_at(start_time/end_time) attribute. Possible values are : not_configured, scheduled, succeeded, re_scheduled, failed, skipped, not_applicable.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*webhook_status\\[is\\] = \"succeeded\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "succeeded", "properties" : { "is" : { "type" : "string", "description" : "* `not_configured` - Webhook was not configured when this event occurred\n* `scheduled` - Webhook call has been scheduled.\n* `succeeded` - Webhook call was successful.\n* `re_scheduled` - Webhook call has been rescheduled due failure(s) in previous call(s)\n* `failed` - Webhook call has been suspended after the all retries have resulted in failure.\n* `skipped` - Skipped as specified in request\n* `not_applicable` - Webhook call is not applicable for this event.\n* `disabled` - Disabled as no longer used\n* `rate_limited` - Webhook call was rate limited.", "enum" : [ "not_configured", "scheduled", "succeeded", "re_scheduled", "failed", "skipped", "not_applicable", "disabled", "rate_limited" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `not_configured` - Webhook was not configured when this event occurred\n* `scheduled` - Webhook call has been scheduled.\n* `succeeded` - Webhook call was successful.\n* `re_scheduled` - Webhook call has been rescheduled due failure(s) in previous call(s)\n* `failed` - Webhook call has been suspended after the all retries have resulted in failure.\n* `skipped` - Skipped as specified in request\n* `not_applicable` - Webhook call is not applicable for this event.\n* `disabled` - Disabled as no longer used\n* `rate_limited` - Webhook call was rate limited.", "enum" : [ "not_configured", "scheduled", "succeeded", "re_scheduled", "failed", "skipped", "not_applicable", "disabled", "rate_limited" ], "example" : null }, "in" : { "type" : "string", "description" : "* `not_configured` - Webhook was not configured when this event occurred\n* `scheduled` - Webhook call has been scheduled.\n* `succeeded` - Webhook call was successful.\n* `re_scheduled` - Webhook call has been rescheduled due failure(s) in previous call(s)\n* `failed` - Webhook call has been suspended after the all retries have resulted in failure.\n* `skipped` - Skipped as specified in request\n* `not_applicable` - Webhook call is not applicable for this event.\n* `disabled` - Disabled as no longer used\n* `rate_limited` - Webhook call was rate limited.", "enum" : [ "not_configured", "scheduled", "succeeded", "re_scheduled", "failed", "skipped", "not_applicable", "disabled", "rate_limited" ], "pattern" : "^\\[(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable|disabled|rate_limited)(,(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable|disabled|rate_limited))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `not_configured` - Webhook was not configured when this event occurred\n* `scheduled` - Webhook call has been scheduled.\n* `succeeded` - Webhook call was successful.\n* `re_scheduled` - Webhook call has been rescheduled due failure(s) in previous call(s)\n* `failed` - Webhook call has been suspended after the all retries have resulted in failure.\n* `skipped` - Skipped as specified in request\n* `not_applicable` - Webhook call is not applicable for this event.\n* `disabled` - Disabled as no longer used\n* `rate_limited` - Webhook call was rate limited.", "enum" : [ "not_configured", "scheduled", "succeeded", "re_scheduled", "failed", "skipped", "not_applicable", "disabled", "rate_limited" ], "pattern" : "^\\[(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable|disabled|rate_limited)(,(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable|disabled|rate_limited))*\\]$", "example" : null } } } }, { "name" : "event_type", "in" : "query", "description" : "optional, enumerated string filter\n\nSpecify it if you need to fetch events of a particular type. Possible values are : plan_created, plan_updated, plan_deleted, addon_created, addon_updated, addon_deleted, coupon_created, coupon_updated, coupon_deleted, coupon_set_created, coupon_set_updated, coupon_set_deleted, coupon_codes_added, coupon_codes_deleted, coupon_codes_updated, customer_created, customer_changed, customer_deleted, customer_moved_out, customer_moved_in, promotional_credits_added, promotional_credits_deducted, subscription_created, subscription_created_with_backdating, subscription_started, subscription_trial_end_reminder, subscription_activated, subscription_activated_with_backdating, subscription_changed, mrr_updated, subscription_changed_with_backdating, subscription_cancellation_scheduled, subscription_cancellation_reminder, subscription_cancelled, subscription_canceled_with_backdating, subscription_reactivated, subscription_reactivated_with_backdating, subscription_renewed, subscription_scheduled_cancellation_removed, subscription_changes_scheduled, subscription_scheduled_changes_removed, subscription_shipping_address_updated, subscription_deleted, subscription_paused, subscription_pause_scheduled, subscription_scheduled_pause_removed, subscription_resumed, subscription_resumption_scheduled, subscription_scheduled_resumption_removed, subscription_advance_invoice_schedule_added, subscription_advance_invoice_schedule_updated, subscription_advance_invoice_schedule_removed, pending_invoice_created, pending_invoice_updated, invoice_generated, invoice_generated_with_backdating, invoice_updated, invoice_deleted, credit_note_created, credit_note_created_with_backdating, credit_note_updated, credit_note_deleted, subscription_renewal_reminder, transaction_created, transaction_updated, transaction_deleted, payment_succeeded, payment_failed, payment_refunded, payment_initiated, refund_initiated, authorization_succeeded, authorization_voided, card_added, card_updated, card_expiry_reminder, card_expired, card_deleted, payment_source_added, payment_source_updated, payment_source_deleted, payment_source_expiring, payment_source_expired, virtual_bank_account_added, virtual_bank_account_updated, virtual_bank_account_deleted, token_created, token_consumed, token_expired, unbilled_charges_created, unbilled_charges_voided, unbilled_charges_deleted, unbilled_charges_invoiced, order_created, order_updated, order_cancelled, order_delivered, order_returned, order_ready_to_process, order_ready_to_ship, order_deleted, order_resent, quote_created, quote_updated, quote_deleted, tax_withheld_recorded, tax_withheld_deleted, tax_withheld_refunded, gift_scheduled, gift_unclaimed, gift_claimed, gift_expired, gift_cancelled, gift_updated, hierarchy_created, hierarchy_deleted, payment_intent_created, payment_intent_updated, contract_term_created, contract_term_renewed, contract_term_terminated, contract_term_completed, contract_term_cancelled.\n\n**Supported operators :**\nis, is_not, in, not_in\n\n**Example →**\n*event_type\\[is\\] = \"customer_created\"*\n", "required" : false, "deprecated" : false, "style" : "deepObject", "explode" : true, "schema" : { "type" : "object", "deprecated" : false, "example" : "customer_created", "properties" : { "is" : { "type" : "string", "description" : "* `plan_created` - Sent when a plan is created. \n* `plan_updated` - Sent when a plan is changed. \n* `plan_deleted` - Sent when a plan is deleted. \n* `addon_created` - Sent when a addon is created. \n* `addon_updated` - Sent when a addon is changed. \n* `addon_deleted` - Sent when a addon is deleted. \n* `coupon_created` - Sent when a coupon is created. \n* `coupon_updated` - Sent when a coupon is changed. \n* `coupon_deleted` - Sent when a coupon is deleted. \n* `coupon_set_created` - Sent when a coupon set is created\n* `coupon_set_updated` - Sent when a coupon set is changed\n* `coupon_set_deleted` - Sent when a coupon set is deleted\n* `coupon_codes_added` - Sent when coupon codes are added in coupon set\n* `coupon_codes_deleted` - Sent when coupon codes are deleted in coupon set\n* `coupon_codes_updated` - Sent when coupon codes are updated\n* `customer_created` - Sent when a customer is created. This event happens when only a new customer is created or when a customer is automatically created during new subscription creation.\n* `customer_changed` - Sent when a customer is changed\n* `customer_deleted` - Sent when a customer is deleted\n* `customer_moved_out` - Sent when a customer is copied to another site\n* `customer_moved_in` - Sent when a customer is copied from another site\n* `promotional_credits_added` - Sent when a customer prmotion credits added\n* `promotional_credits_deducted` - Sent when a customer prmotion credits deducted\n* `subscription_created` - Sent when a new subscription is created.\n* `subscription_created_with_backdating` - Sent when a new subscription is created with backdating.\n* `subscription_started` - Sent when a 'future' subscription gets started at the scheduled date.\n* `subscription_trial_end_reminder` - Sent when the customer's trial period is about to end.\n* `subscription_activated` - Sent after the subscription has been moved from trial to active state\n* `subscription_activated_with_backdating` - Sent after the subscription changes to `active` from another `status`, while the change is backdated.\n* `subscription_changed` - Sent after the subscription's recurring items have been changed\n* `subscription_trial_extended` - Trial Extension\n* `mrr_updated` - Sent when either of MRR or CMRR of a subscription changes\n* `subscription_changed_with_backdating` - Sent after the subscription's recurring items have been changed with backdated date\n* `subscription_cancellation_scheduled` - Sent when subscription is scheduled to cancel at end of current term\n* `subscription_cancellation_reminder` - Sent when the customer's subscription is nearing it's scheduled cancellation date.\n* `subscription_cancelled` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'.\n* `subscription_canceled_with_backdating` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'.\n* `subscription_reactivated` - Sent when the subscription is moved from cancelled state to active or in_trial state\n* `subscription_reactivated_with_backdating` - Sent when the subscription is moved from cancelled state to active or in_trial state with past date\n* `subscription_renewed` - Sent when the subscription is renewed from the current term.\n* `subscription_items_renewed` - Sent when one or more Subscription Items are renewed\n* `subscription_scheduled_cancellation_removed` - Sent when scheduled cancellation is removed for the subscription.\n* `subscription_changes_scheduled` - Sent when subscription changes are scheduled for later. Changes will be applied at the end of current term.\n* `subscription_scheduled_changes_removed` - Sent when scheduled change for the subscription is removed.\n* `subscription_shipping_address_updated` - Triggered when shipping address is added or updated for a subscription.\n* `subscription_deleted` - Sent when a subscription has been deleted\n* `subscription_paused` - Sent when the subscription is paused.\n* `subscription_pause_scheduled` - Sent when the subscription is scheduled to pause.\n* `subscription_scheduled_pause_removed` - Triggered when scheduled pause is removed for the subscription.\n* `subscription_resumed` - Sent when the subscription is moved from paused state to active state\n* `subscription_resumption_scheduled` - Triggered when the subscription resumption is scheduled.\n* `subscription_scheduled_resumption_removed` - Triggered when scheduled resumption is removed for the subscription.\n* `subscription_advance_invoice_schedule_added` - Triggered when advance invoice is scheduled for a subscription.\n* `subscription_advance_invoice_schedule_updated` - Triggered when scheduled advance invoice is updated for a subscription.\n* `subscription_advance_invoice_schedule_removed` - Triggered when scheduled advance invoice is removed for a subscription.\n* `pending_invoice_created` - Event triggered (in the case of metered billing) when a \"Pending\" invoice is created that has usage related charges or line items to be added, before being closed. This is triggered only when the “Notify for Pending Invoices” option is enabled.\n* `pending_invoice_updated` - Event triggered when the option \"Notify and wait to close invoices\" is enabled, and the 'Pending' invoice is updated.\n* `invoice_generated` - Event triggered when a new invoice is generated. In case of metered billing, this event is triggered when a \"Pending\" invoice is closed.\n* `invoice_generated_with_backdating` - Event triggered when a new invoice is generated with past date as invoice date.\n* `invoice_updated` - Triggered when the invoice’s shipping/billing address is updated, if the invoice is voided, or when the amount due is modified due to payments applied/removed.\n* `invoice_deleted` - Event triggered when an invoice is deleted.\n* `credit_note_created` - Sent when a credit note is created\n* `credit_note_created_with_backdating` - Sent when a credit note is created with past date as credit note date\n* `credit_note_updated` - Sent when a credit note is updated\n* `credit_note_deleted` - Sent when a credit note is deleted\n* `subscription_renewal_reminder` - Sent before each subscription's renewal based on plan's period\n* `transaction_created` - Triggered when a transaction is recorded\n* `transaction_updated` - Triggered when a transaction is updated. E.g. (1) When a transaction is removed, (2) or when an excess payment is applied on an invoice, (3) or when amount_capturable gets updated.\n* `transaction_deleted` - Triggered when a transaction is deleted. \n* `payment_succeeded` - Sent when the payment is successfully collected\n* `payment_failed` - Sent when attempt to charge customer's credit card fails\n* `dunning_updated` - Sent when dunning is paused for an invoice\n* `payment_refunded` - Sent when a payment refund is made\n* `payment_initiated` - Sent when a payment is initiated via direct debit\n* `refund_initiated` - Sent when a refund is initiated via direct debit\n* `netd_payment_due_reminder` - **(Deprecated)** Sent when a invoice's due period is about to end\n* `authorization_succeeded` - Triggered when a authorization transaction is created.\n* `authorization_voided` - Triggered when a authorization transaction is voided. Authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time.\n* `card_added` - Sent when a card is added for a customer.\n* `card_updated` - Sent when the card is updated for a customer.\n* `card_expiry_reminder` - Sent when the customer's credit card is expiring soon. Sent 30 days before the expiry date.\n* `card_expired` - Sent when a card for a customer is expired\n* `card_deleted` - Sent when a card is deleted for a customer\n* `payment_source_added` - Sent when a payment source is added for a customer.\n* `payment_source_updated` - Sent when the payment source is updated for a customer or when role is assigned to the payment source.\n* `payment_source_deleted` - Sent when a payment source is deleted for a customer\n* `payment_source_expiring` - Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date.\n* `payment_source_expired` - Sent when a payment source for a customer is expired\n* `payment_source_locally_deleted` - Sent when a payment source for a customer removed from Chargebee\n* `virtual_bank_account_added` - Sent when a virtual bank account is added for a customer.\n* `virtual_bank_account_updated` - Sent when the virtual bank account is updated for a customer.\n* `virtual_bank_account_deleted` - Sent when a virtual bank account is deleted for a customer.\n* `token_created` - Sent when a Token is created\n* `token_consumed` - Sent when a Token is consumed\n* `token_expired` - Sent when a Token is expired\n* `unbilled_charges_created` - Triggered when unbilled charges are created\n* `unbilled_charges_voided` - Triggered when unbilled charges are voided\n* `unbilled_charges_deleted` - Triggered when unbilled charges are deleted\n* `unbilled_charges_invoiced` - Triggered when unbilled charges are invoiced\n* `order_created` - Triggered when order is created\n* `order_updated` - Triggered when order is updated\n* `order_cancelled` - Triggered when order is cancelled\n* `order_delivered` - Triggered when order is marked as delivered\n* `order_returned` - Triggered when order is marked as returned\n* `order_ready_to_process` - Triggered when order reaches it's order date\n* `order_ready_to_ship` - Triggered when order reaches it's shipping date\n* `order_deleted` - Triggered when order is deleted\n* `order_resent` - Triggered when order is resent\n* `quote_created` - Triggered when quote is created\n* `quote_updated` - Triggered when quote is updated\n* `quote_deleted` - Triggered when quote is deleted\n* `tax_withheld_recorded` - Triggered when a tax withheld is recorded for an invoice\n* `tax_withheld_deleted` - Triggered when a tax withheld is deleted\n* `tax_withheld_refunded` - Sent when a tax withheld refund is made\n* `gift_scheduled` - Triggered when a new gift is created\n* `gift_unclaimed` - Triggered when a new gift is unclaimed and is ready to be claimed\n* `gift_claimed` - Triggered when a gift is claimed\n* `gift_expired` - Triggered when a gift expires\n* `gift_cancelled` - Triggered when a gift is cancelled.\n* `gift_updated` - Triggered when a gift is updated\n* `hierarchy_created` - Triggered when a hierarchy is created\n* `hierarchy_deleted` - Triggered when a hierarchy is deleted\n* `payment_intent_created` - Sent when a Payment intent is created\n* `payment_intent_updated` - Sent when a Payment intent is updated\n* `contract_term_created` - Triggered when new contract term is created\n* `contract_term_renewed` - Triggered when new contract term is renewed\n* `contract_term_terminated` - Triggered when contract term is terminated\n* `contract_term_completed` - Triggered when contract term is completed\n* `contract_term_cancelled` - Triggered when contract term is cancelled\n* `voucher_created` - Triggered when a payment voucher is created\n* `voucher_expired` - Triggered when a payment voucher is expired\n* `voucher_create_failed` - Triggered when a payment voucher creation is failed\n* `subscription_ramp_created` - Triggered when a subscription ramp is created.\n* `subscription_ramp_deleted` - Triggered when a subscription ramp is deleted.\n* `subscription_ramp_applied` - Triggered when a subscription ramp is applied.\n* `subscription_ramp_drafted` - Triggered when a subscription ramp is moved to draft status.\n* `subscription_ramp_updated` - Triggered when a subscription ramp is updated.\n* `subscription_moved_in` - Triggered when a subscription moved from other customer\n* `subscription_moved_out` - Triggered when a subscription moved to other customer\n* `subscription_movement_failed` - Triggered when a subscription movement failed\n* `omnichannel_subscription_created` - Triggered when an omnichannel subscription is created\n* `omnichannel_subscription_item_renewed` - Triggered when an omnichannel subscription item is renewed\n* `omnichannel_subscription_item_downgrade_scheduled` - **(Deprecated)** Triggered when an omnichannel subscription item is downgrade is scheduled\n* `omnichannel_subscription_item_scheduled_downgrade_removed` - **(Deprecated)** Triggered when an omnichannel subscription item scheduled downgrade is removed\n* `omnichannel_subscription_item_downgraded` - Triggered when an omnichannel subscription item is downgraded\n* `omnichannel_subscription_item_expired` - Triggered when an omnichannel subscription item is expired\n* `omnichannel_subscription_item_cancellation_scheduled` - Triggered when an omnichannel subscription item is scheduled for cancellation\n* `omnichannel_subscription_item_scheduled_cancellation_removed` - Triggered when an omnichannel subscription item scheduled cancellation is removed\n* `omnichannel_subscription_item_resubscribed` - Triggered when an omnichannel subscription item is resubscribed\n* `omnichannel_subscription_item_upgraded` - Triggered when an omnichannel subscription item is upgraded\n* `omnichannel_subscription_item_cancelled` - Triggered when an omnichannel subscription item is cancelled\n* `omnichannel_subscription_imported` - Triggered when an omnichannel subscription item is imported\n* `omnichannel_subscription_item_grace_period_started` - Triggered when an omnichannel subscription item's grace period has started\n* `omnichannel_subscription_item_grace_period_expired` - Triggered when an omnichannel subscription item's grace period has expired\n* `omnichannel_subscription_item_dunning_started` - Triggered when an omnichannel subscription item's dunning has started\n* `omnichannel_subscription_item_dunning_expired` - Triggered when an omnichannel subscription item's dunning has expired\n* `rule_created` - Triggered when a rule is created\n* `rule_updated` - Triggered when a rule is updated\n* `rule_deleted` - Triggered when a rule is deleted\n* `record_purchase_failed` - Triggered when an omnichannel record purchase is failed\n* `omnichannel_subscription_item_change_scheduled` - Triggered when an omnichannel subscription item change is scheduled\n* `omnichannel_subscription_item_scheduled_change_removed` - Triggered when an omnichannel subscription item scheduled change is removed\n* `omnichannel_subscription_item_reactivated` - Triggered when an omnichannel subscription item's refund is reversed\n* `sales_order_created` - Triggered when sales order is created\n* `sales_order_updated` - Triggered when sales order is updated\n* `omnichannel_subscription_item_changed` - Triggered when an omnichannel subscription item is changed\n* `omnichannel_subscription_item_paused` - Triggered when an omnichannel subscription item is paused\n* `omnichannel_subscription_item_resumed` - Triggered when an omnichannel subscription item is resumed\n* `omnichannel_one_time_order_created` - Triggered when an omnichannel one time order is created\n* `omnichannel_one_time_order_item_cancelled` - Triggered when an omnichannel one time order item is cancelled\n* `omnichannel_subscription_item_pause_scheduled` - Triggered when an omnichannel subscription item scheduled for pause\n* `vault_token_created` - Triggered when a payment method is tokenized and stored in the vault.\n* `vault_token_updated` - Triggered when a vaulted payment method is updated.\n* `vault_token_deleted` - Triggered when a vaulted payment method is deleted from the vault.", "enum" : [ "plan_created", "plan_updated", "plan_deleted", "addon_created", "addon_updated", "addon_deleted", "coupon_created", "coupon_updated", "coupon_deleted", "coupon_set_created", "coupon_set_updated", "coupon_set_deleted", "coupon_codes_added", "coupon_codes_deleted", "coupon_codes_updated", "customer_created", "customer_changed", "customer_deleted", "customer_moved_out", "customer_moved_in", "promotional_credits_added", "promotional_credits_deducted", "subscription_created", "subscription_created_with_backdating", "subscription_started", "subscription_trial_end_reminder", "subscription_activated", "subscription_activated_with_backdating", "subscription_changed", "subscription_trial_extended", "mrr_updated", "subscription_changed_with_backdating", "subscription_cancellation_scheduled", "subscription_cancellation_reminder", "subscription_cancelled", "subscription_canceled_with_backdating", "subscription_reactivated", "subscription_reactivated_with_backdating", "subscription_renewed", "subscription_items_renewed", "subscription_scheduled_cancellation_removed", "subscription_changes_scheduled", "subscription_scheduled_changes_removed", "subscription_shipping_address_updated", "subscription_deleted", "subscription_paused", "subscription_pause_scheduled", "subscription_scheduled_pause_removed", "subscription_resumed", "subscription_resumption_scheduled", "subscription_scheduled_resumption_removed", "subscription_advance_invoice_schedule_added", "subscription_advance_invoice_schedule_updated", "subscription_advance_invoice_schedule_removed", "pending_invoice_created", "pending_invoice_updated", "invoice_generated", "invoice_generated_with_backdating", "invoice_updated", "invoice_deleted", "credit_note_created", "credit_note_created_with_backdating", "credit_note_updated", "credit_note_deleted", "subscription_renewal_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", "voucher_created", "voucher_expired", "voucher_create_failed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_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", "omnichannel_subscription_item_pause_scheduled", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "example" : null }, "is_not" : { "type" : "string", "description" : "* `plan_created` - Sent when a plan is created. \n* `plan_updated` - Sent when a plan is changed. \n* `plan_deleted` - Sent when a plan is deleted. \n* `addon_created` - Sent when a addon is created. \n* `addon_updated` - Sent when a addon is changed. \n* `addon_deleted` - Sent when a addon is deleted. \n* `coupon_created` - Sent when a coupon is created. \n* `coupon_updated` - Sent when a coupon is changed. \n* `coupon_deleted` - Sent when a coupon is deleted. \n* `coupon_set_created` - Sent when a coupon set is created\n* `coupon_set_updated` - Sent when a coupon set is changed\n* `coupon_set_deleted` - Sent when a coupon set is deleted\n* `coupon_codes_added` - Sent when coupon codes are added in coupon set\n* `coupon_codes_deleted` - Sent when coupon codes are deleted in coupon set\n* `coupon_codes_updated` - Sent when coupon codes are updated\n* `customer_created` - Sent when a customer is created. This event happens when only a new customer is created or when a customer is automatically created during new subscription creation.\n* `customer_changed` - Sent when a customer is changed\n* `customer_deleted` - Sent when a customer is deleted\n* `customer_moved_out` - Sent when a customer is copied to another site\n* `customer_moved_in` - Sent when a customer is copied from another site\n* `promotional_credits_added` - Sent when a customer prmotion credits added\n* `promotional_credits_deducted` - Sent when a customer prmotion credits deducted\n* `subscription_created` - Sent when a new subscription is created.\n* `subscription_created_with_backdating` - Sent when a new subscription is created with backdating.\n* `subscription_started` - Sent when a 'future' subscription gets started at the scheduled date.\n* `subscription_trial_end_reminder` - Sent when the customer's trial period is about to end.\n* `subscription_activated` - Sent after the subscription has been moved from trial to active state\n* `subscription_activated_with_backdating` - Sent after the subscription changes to `active` from another `status`, while the change is backdated.\n* `subscription_changed` - Sent after the subscription's recurring items have been changed\n* `subscription_trial_extended` - Trial Extension\n* `mrr_updated` - Sent when either of MRR or CMRR of a subscription changes\n* `subscription_changed_with_backdating` - Sent after the subscription's recurring items have been changed with backdated date\n* `subscription_cancellation_scheduled` - Sent when subscription is scheduled to cancel at end of current term\n* `subscription_cancellation_reminder` - Sent when the customer's subscription is nearing it's scheduled cancellation date.\n* `subscription_cancelled` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'.\n* `subscription_canceled_with_backdating` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'.\n* `subscription_reactivated` - Sent when the subscription is moved from cancelled state to active or in_trial state\n* `subscription_reactivated_with_backdating` - Sent when the subscription is moved from cancelled state to active or in_trial state with past date\n* `subscription_renewed` - Sent when the subscription is renewed from the current term.\n* `subscription_items_renewed` - Sent when one or more Subscription Items are renewed\n* `subscription_scheduled_cancellation_removed` - Sent when scheduled cancellation is removed for the subscription.\n* `subscription_changes_scheduled` - Sent when subscription changes are scheduled for later. Changes will be applied at the end of current term.\n* `subscription_scheduled_changes_removed` - Sent when scheduled change for the subscription is removed.\n* `subscription_shipping_address_updated` - Triggered when shipping address is added or updated for a subscription.\n* `subscription_deleted` - Sent when a subscription has been deleted\n* `subscription_paused` - Sent when the subscription is paused.\n* `subscription_pause_scheduled` - Sent when the subscription is scheduled to pause.\n* `subscription_scheduled_pause_removed` - Triggered when scheduled pause is removed for the subscription.\n* `subscription_resumed` - Sent when the subscription is moved from paused state to active state\n* `subscription_resumption_scheduled` - Triggered when the subscription resumption is scheduled.\n* `subscription_scheduled_resumption_removed` - Triggered when scheduled resumption is removed for the subscription.\n* `subscription_advance_invoice_schedule_added` - Triggered when advance invoice is scheduled for a subscription.\n* `subscription_advance_invoice_schedule_updated` - Triggered when scheduled advance invoice is updated for a subscription.\n* `subscription_advance_invoice_schedule_removed` - Triggered when scheduled advance invoice is removed for a subscription.\n* `pending_invoice_created` - Event triggered (in the case of metered billing) when a \"Pending\" invoice is created that has usage related charges or line items to be added, before being closed. This is triggered only when the “Notify for Pending Invoices” option is enabled.\n* `pending_invoice_updated` - Event triggered when the option \"Notify and wait to close invoices\" is enabled, and the 'Pending' invoice is updated.\n* `invoice_generated` - Event triggered when a new invoice is generated. In case of metered billing, this event is triggered when a \"Pending\" invoice is closed.\n* `invoice_generated_with_backdating` - Event triggered when a new invoice is generated with past date as invoice date.\n* `invoice_updated` - Triggered when the invoice’s shipping/billing address is updated, if the invoice is voided, or when the amount due is modified due to payments applied/removed.\n* `invoice_deleted` - Event triggered when an invoice is deleted.\n* `credit_note_created` - Sent when a credit note is created\n* `credit_note_created_with_backdating` - Sent when a credit note is created with past date as credit note date\n* `credit_note_updated` - Sent when a credit note is updated\n* `credit_note_deleted` - Sent when a credit note is deleted\n* `subscription_renewal_reminder` - Sent before each subscription's renewal based on plan's period\n* `transaction_created` - Triggered when a transaction is recorded\n* `transaction_updated` - Triggered when a transaction is updated. E.g. (1) When a transaction is removed, (2) or when an excess payment is applied on an invoice, (3) or when amount_capturable gets updated.\n* `transaction_deleted` - Triggered when a transaction is deleted. \n* `payment_succeeded` - Sent when the payment is successfully collected\n* `payment_failed` - Sent when attempt to charge customer's credit card fails\n* `dunning_updated` - Sent when dunning is paused for an invoice\n* `payment_refunded` - Sent when a payment refund is made\n* `payment_initiated` - Sent when a payment is initiated via direct debit\n* `refund_initiated` - Sent when a refund is initiated via direct debit\n* `netd_payment_due_reminder` - **(Deprecated)** Sent when a invoice's due period is about to end\n* `authorization_succeeded` - Triggered when a authorization transaction is created.\n* `authorization_voided` - Triggered when a authorization transaction is voided. Authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time.\n* `card_added` - Sent when a card is added for a customer.\n* `card_updated` - Sent when the card is updated for a customer.\n* `card_expiry_reminder` - Sent when the customer's credit card is expiring soon. Sent 30 days before the expiry date.\n* `card_expired` - Sent when a card for a customer is expired\n* `card_deleted` - Sent when a card is deleted for a customer\n* `payment_source_added` - Sent when a payment source is added for a customer.\n* `payment_source_updated` - Sent when the payment source is updated for a customer or when role is assigned to the payment source.\n* `payment_source_deleted` - Sent when a payment source is deleted for a customer\n* `payment_source_expiring` - Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date.\n* `payment_source_expired` - Sent when a payment source for a customer is expired\n* `payment_source_locally_deleted` - Sent when a payment source for a customer removed from Chargebee\n* `virtual_bank_account_added` - Sent when a virtual bank account is added for a customer.\n* `virtual_bank_account_updated` - Sent when the virtual bank account is updated for a customer.\n* `virtual_bank_account_deleted` - Sent when a virtual bank account is deleted for a customer.\n* `token_created` - Sent when a Token is created\n* `token_consumed` - Sent when a Token is consumed\n* `token_expired` - Sent when a Token is expired\n* `unbilled_charges_created` - Triggered when unbilled charges are created\n* `unbilled_charges_voided` - Triggered when unbilled charges are voided\n* `unbilled_charges_deleted` - Triggered when unbilled charges are deleted\n* `unbilled_charges_invoiced` - Triggered when unbilled charges are invoiced\n* `order_created` - Triggered when order is created\n* `order_updated` - Triggered when order is updated\n* `order_cancelled` - Triggered when order is cancelled\n* `order_delivered` - Triggered when order is marked as delivered\n* `order_returned` - Triggered when order is marked as returned\n* `order_ready_to_process` - Triggered when order reaches it's order date\n* `order_ready_to_ship` - Triggered when order reaches it's shipping date\n* `order_deleted` - Triggered when order is deleted\n* `order_resent` - Triggered when order is resent\n* `quote_created` - Triggered when quote is created\n* `quote_updated` - Triggered when quote is updated\n* `quote_deleted` - Triggered when quote is deleted\n* `tax_withheld_recorded` - Triggered when a tax withheld is recorded for an invoice\n* `tax_withheld_deleted` - Triggered when a tax withheld is deleted\n* `tax_withheld_refunded` - Sent when a tax withheld refund is made\n* `gift_scheduled` - Triggered when a new gift is created\n* `gift_unclaimed` - Triggered when a new gift is unclaimed and is ready to be claimed\n* `gift_claimed` - Triggered when a gift is claimed\n* `gift_expired` - Triggered when a gift expires\n* `gift_cancelled` - Triggered when a gift is cancelled.\n* `gift_updated` - Triggered when a gift is updated\n* `hierarchy_created` - Triggered when a hierarchy is created\n* `hierarchy_deleted` - Triggered when a hierarchy is deleted\n* `payment_intent_created` - Sent when a Payment intent is created\n* `payment_intent_updated` - Sent when a Payment intent is updated\n* `contract_term_created` - Triggered when new contract term is created\n* `contract_term_renewed` - Triggered when new contract term is renewed\n* `contract_term_terminated` - Triggered when contract term is terminated\n* `contract_term_completed` - Triggered when contract term is completed\n* `contract_term_cancelled` - Triggered when contract term is cancelled\n* `voucher_created` - Triggered when a payment voucher is created\n* `voucher_expired` - Triggered when a payment voucher is expired\n* `voucher_create_failed` - Triggered when a payment voucher creation is failed\n* `subscription_ramp_created` - Triggered when a subscription ramp is created.\n* `subscription_ramp_deleted` - Triggered when a subscription ramp is deleted.\n* `subscription_ramp_applied` - Triggered when a subscription ramp is applied.\n* `subscription_ramp_drafted` - Triggered when a subscription ramp is moved to draft status.\n* `subscription_ramp_updated` - Triggered when a subscription ramp is updated.\n* `subscription_moved_in` - Triggered when a subscription moved from other customer\n* `subscription_moved_out` - Triggered when a subscription moved to other customer\n* `subscription_movement_failed` - Triggered when a subscription movement failed\n* `omnichannel_subscription_created` - Triggered when an omnichannel subscription is created\n* `omnichannel_subscription_item_renewed` - Triggered when an omnichannel subscription item is renewed\n* `omnichannel_subscription_item_downgrade_scheduled` - **(Deprecated)** Triggered when an omnichannel subscription item is downgrade is scheduled\n* `omnichannel_subscription_item_scheduled_downgrade_removed` - **(Deprecated)** Triggered when an omnichannel subscription item scheduled downgrade is removed\n* `omnichannel_subscription_item_downgraded` - Triggered when an omnichannel subscription item is downgraded\n* `omnichannel_subscription_item_expired` - Triggered when an omnichannel subscription item is expired\n* `omnichannel_subscription_item_cancellation_scheduled` - Triggered when an omnichannel subscription item is scheduled for cancellation\n* `omnichannel_subscription_item_scheduled_cancellation_removed` - Triggered when an omnichannel subscription item scheduled cancellation is removed\n* `omnichannel_subscription_item_resubscribed` - Triggered when an omnichannel subscription item is resubscribed\n* `omnichannel_subscription_item_upgraded` - Triggered when an omnichannel subscription item is upgraded\n* `omnichannel_subscription_item_cancelled` - Triggered when an omnichannel subscription item is cancelled\n* `omnichannel_subscription_imported` - Triggered when an omnichannel subscription item is imported\n* `omnichannel_subscription_item_grace_period_started` - Triggered when an omnichannel subscription item's grace period has started\n* `omnichannel_subscription_item_grace_period_expired` - Triggered when an omnichannel subscription item's grace period has expired\n* `omnichannel_subscription_item_dunning_started` - Triggered when an omnichannel subscription item's dunning has started\n* `omnichannel_subscription_item_dunning_expired` - Triggered when an omnichannel subscription item's dunning has expired\n* `rule_created` - Triggered when a rule is created\n* `rule_updated` - Triggered when a rule is updated\n* `rule_deleted` - Triggered when a rule is deleted\n* `record_purchase_failed` - Triggered when an omnichannel record purchase is failed\n* `omnichannel_subscription_item_change_scheduled` - Triggered when an omnichannel subscription item change is scheduled\n* `omnichannel_subscription_item_scheduled_change_removed` - Triggered when an omnichannel subscription item scheduled change is removed\n* `omnichannel_subscription_item_reactivated` - Triggered when an omnichannel subscription item's refund is reversed\n* `sales_order_created` - Triggered when sales order is created\n* `sales_order_updated` - Triggered when sales order is updated\n* `omnichannel_subscription_item_changed` - Triggered when an omnichannel subscription item is changed\n* `omnichannel_subscription_item_paused` - Triggered when an omnichannel subscription item is paused\n* `omnichannel_subscription_item_resumed` - Triggered when an omnichannel subscription item is resumed\n* `omnichannel_one_time_order_created` - Triggered when an omnichannel one time order is created\n* `omnichannel_one_time_order_item_cancelled` - Triggered when an omnichannel one time order item is cancelled\n* `omnichannel_subscription_item_pause_scheduled` - Triggered when an omnichannel subscription item scheduled for pause\n* `vault_token_created` - Triggered when a payment method is tokenized and stored in the vault.\n* `vault_token_updated` - Triggered when a vaulted payment method is updated.\n* `vault_token_deleted` - Triggered when a vaulted payment method is deleted from the vault.", "enum" : [ "plan_created", "plan_updated", "plan_deleted", "addon_created", "addon_updated", "addon_deleted", "coupon_created", "coupon_updated", "coupon_deleted", "coupon_set_created", "coupon_set_updated", "coupon_set_deleted", "coupon_codes_added", "coupon_codes_deleted", "coupon_codes_updated", "customer_created", "customer_changed", "customer_deleted", "customer_moved_out", "customer_moved_in", "promotional_credits_added", "promotional_credits_deducted", "subscription_created", "subscription_created_with_backdating", "subscription_started", "subscription_trial_end_reminder", "subscription_activated", "subscription_activated_with_backdating", "subscription_changed", "subscription_trial_extended", "mrr_updated", "subscription_changed_with_backdating", "subscription_cancellation_scheduled", "subscription_cancellation_reminder", "subscription_cancelled", "subscription_canceled_with_backdating", "subscription_reactivated", "subscription_reactivated_with_backdating", "subscription_renewed", "subscription_items_renewed", "subscription_scheduled_cancellation_removed", "subscription_changes_scheduled", "subscription_scheduled_changes_removed", "subscription_shipping_address_updated", "subscription_deleted", "subscription_paused", "subscription_pause_scheduled", "subscription_scheduled_pause_removed", "subscription_resumed", "subscription_resumption_scheduled", "subscription_scheduled_resumption_removed", "subscription_advance_invoice_schedule_added", "subscription_advance_invoice_schedule_updated", "subscription_advance_invoice_schedule_removed", "pending_invoice_created", "pending_invoice_updated", "invoice_generated", "invoice_generated_with_backdating", "invoice_updated", "invoice_deleted", "credit_note_created", "credit_note_created_with_backdating", "credit_note_updated", "credit_note_deleted", "subscription_renewal_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", "voucher_created", "voucher_expired", "voucher_create_failed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_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", "omnichannel_subscription_item_pause_scheduled", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "example" : null }, "in" : { "type" : "string", "description" : "* `plan_created` - Sent when a plan is created. \n* `plan_updated` - Sent when a plan is changed. \n* `plan_deleted` - Sent when a plan is deleted. \n* `addon_created` - Sent when a addon is created. \n* `addon_updated` - Sent when a addon is changed. \n* `addon_deleted` - Sent when a addon is deleted. \n* `coupon_created` - Sent when a coupon is created. \n* `coupon_updated` - Sent when a coupon is changed. \n* `coupon_deleted` - Sent when a coupon is deleted. \n* `coupon_set_created` - Sent when a coupon set is created\n* `coupon_set_updated` - Sent when a coupon set is changed\n* `coupon_set_deleted` - Sent when a coupon set is deleted\n* `coupon_codes_added` - Sent when coupon codes are added in coupon set\n* `coupon_codes_deleted` - Sent when coupon codes are deleted in coupon set\n* `coupon_codes_updated` - Sent when coupon codes are updated\n* `customer_created` - Sent when a customer is created. This event happens when only a new customer is created or when a customer is automatically created during new subscription creation.\n* `customer_changed` - Sent when a customer is changed\n* `customer_deleted` - Sent when a customer is deleted\n* `customer_moved_out` - Sent when a customer is copied to another site\n* `customer_moved_in` - Sent when a customer is copied from another site\n* `promotional_credits_added` - Sent when a customer prmotion credits added\n* `promotional_credits_deducted` - Sent when a customer prmotion credits deducted\n* `subscription_created` - Sent when a new subscription is created.\n* `subscription_created_with_backdating` - Sent when a new subscription is created with backdating.\n* `subscription_started` - Sent when a 'future' subscription gets started at the scheduled date.\n* `subscription_trial_end_reminder` - Sent when the customer's trial period is about to end.\n* `subscription_activated` - Sent after the subscription has been moved from trial to active state\n* `subscription_activated_with_backdating` - Sent after the subscription changes to `active` from another `status`, while the change is backdated.\n* `subscription_changed` - Sent after the subscription's recurring items have been changed\n* `subscription_trial_extended` - Trial Extension\n* `mrr_updated` - Sent when either of MRR or CMRR of a subscription changes\n* `subscription_changed_with_backdating` - Sent after the subscription's recurring items have been changed with backdated date\n* `subscription_cancellation_scheduled` - Sent when subscription is scheduled to cancel at end of current term\n* `subscription_cancellation_reminder` - Sent when the customer's subscription is nearing it's scheduled cancellation date.\n* `subscription_cancelled` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'.\n* `subscription_canceled_with_backdating` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'.\n* `subscription_reactivated` - Sent when the subscription is moved from cancelled state to active or in_trial state\n* `subscription_reactivated_with_backdating` - Sent when the subscription is moved from cancelled state to active or in_trial state with past date\n* `subscription_renewed` - Sent when the subscription is renewed from the current term.\n* `subscription_items_renewed` - Sent when one or more Subscription Items are renewed\n* `subscription_scheduled_cancellation_removed` - Sent when scheduled cancellation is removed for the subscription.\n* `subscription_changes_scheduled` - Sent when subscription changes are scheduled for later. Changes will be applied at the end of current term.\n* `subscription_scheduled_changes_removed` - Sent when scheduled change for the subscription is removed.\n* `subscription_shipping_address_updated` - Triggered when shipping address is added or updated for a subscription.\n* `subscription_deleted` - Sent when a subscription has been deleted\n* `subscription_paused` - Sent when the subscription is paused.\n* `subscription_pause_scheduled` - Sent when the subscription is scheduled to pause.\n* `subscription_scheduled_pause_removed` - Triggered when scheduled pause is removed for the subscription.\n* `subscription_resumed` - Sent when the subscription is moved from paused state to active state\n* `subscription_resumption_scheduled` - Triggered when the subscription resumption is scheduled.\n* `subscription_scheduled_resumption_removed` - Triggered when scheduled resumption is removed for the subscription.\n* `subscription_advance_invoice_schedule_added` - Triggered when advance invoice is scheduled for a subscription.\n* `subscription_advance_invoice_schedule_updated` - Triggered when scheduled advance invoice is updated for a subscription.\n* `subscription_advance_invoice_schedule_removed` - Triggered when scheduled advance invoice is removed for a subscription.\n* `pending_invoice_created` - Event triggered (in the case of metered billing) when a \"Pending\" invoice is created that has usage related charges or line items to be added, before being closed. This is triggered only when the “Notify for Pending Invoices” option is enabled.\n* `pending_invoice_updated` - Event triggered when the option \"Notify and wait to close invoices\" is enabled, and the 'Pending' invoice is updated.\n* `invoice_generated` - Event triggered when a new invoice is generated. In case of metered billing, this event is triggered when a \"Pending\" invoice is closed.\n* `invoice_generated_with_backdating` - Event triggered when a new invoice is generated with past date as invoice date.\n* `invoice_updated` - Triggered when the invoice’s shipping/billing address is updated, if the invoice is voided, or when the amount due is modified due to payments applied/removed.\n* `invoice_deleted` - Event triggered when an invoice is deleted.\n* `credit_note_created` - Sent when a credit note is created\n* `credit_note_created_with_backdating` - Sent when a credit note is created with past date as credit note date\n* `credit_note_updated` - Sent when a credit note is updated\n* `credit_note_deleted` - Sent when a credit note is deleted\n* `subscription_renewal_reminder` - Sent before each subscription's renewal based on plan's period\n* `transaction_created` - Triggered when a transaction is recorded\n* `transaction_updated` - Triggered when a transaction is updated. E.g. (1) When a transaction is removed, (2) or when an excess payment is applied on an invoice, (3) or when amount_capturable gets updated.\n* `transaction_deleted` - Triggered when a transaction is deleted. \n* `payment_succeeded` - Sent when the payment is successfully collected\n* `payment_failed` - Sent when attempt to charge customer's credit card fails\n* `dunning_updated` - Sent when dunning is paused for an invoice\n* `payment_refunded` - Sent when a payment refund is made\n* `payment_initiated` - Sent when a payment is initiated via direct debit\n* `refund_initiated` - Sent when a refund is initiated via direct debit\n* `netd_payment_due_reminder` - **(Deprecated)** Sent when a invoice's due period is about to end\n* `authorization_succeeded` - Triggered when a authorization transaction is created.\n* `authorization_voided` - Triggered when a authorization transaction is voided. Authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time.\n* `card_added` - Sent when a card is added for a customer.\n* `card_updated` - Sent when the card is updated for a customer.\n* `card_expiry_reminder` - Sent when the customer's credit card is expiring soon. Sent 30 days before the expiry date.\n* `card_expired` - Sent when a card for a customer is expired\n* `card_deleted` - Sent when a card is deleted for a customer\n* `payment_source_added` - Sent when a payment source is added for a customer.\n* `payment_source_updated` - Sent when the payment source is updated for a customer or when role is assigned to the payment source.\n* `payment_source_deleted` - Sent when a payment source is deleted for a customer\n* `payment_source_expiring` - Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date.\n* `payment_source_expired` - Sent when a payment source for a customer is expired\n* `payment_source_locally_deleted` - Sent when a payment source for a customer removed from Chargebee\n* `virtual_bank_account_added` - Sent when a virtual bank account is added for a customer.\n* `virtual_bank_account_updated` - Sent when the virtual bank account is updated for a customer.\n* `virtual_bank_account_deleted` - Sent when a virtual bank account is deleted for a customer.\n* `token_created` - Sent when a Token is created\n* `token_consumed` - Sent when a Token is consumed\n* `token_expired` - Sent when a Token is expired\n* `unbilled_charges_created` - Triggered when unbilled charges are created\n* `unbilled_charges_voided` - Triggered when unbilled charges are voided\n* `unbilled_charges_deleted` - Triggered when unbilled charges are deleted\n* `unbilled_charges_invoiced` - Triggered when unbilled charges are invoiced\n* `order_created` - Triggered when order is created\n* `order_updated` - Triggered when order is updated\n* `order_cancelled` - Triggered when order is cancelled\n* `order_delivered` - Triggered when order is marked as delivered\n* `order_returned` - Triggered when order is marked as returned\n* `order_ready_to_process` - Triggered when order reaches it's order date\n* `order_ready_to_ship` - Triggered when order reaches it's shipping date\n* `order_deleted` - Triggered when order is deleted\n* `order_resent` - Triggered when order is resent\n* `quote_created` - Triggered when quote is created\n* `quote_updated` - Triggered when quote is updated\n* `quote_deleted` - Triggered when quote is deleted\n* `tax_withheld_recorded` - Triggered when a tax withheld is recorded for an invoice\n* `tax_withheld_deleted` - Triggered when a tax withheld is deleted\n* `tax_withheld_refunded` - Sent when a tax withheld refund is made\n* `gift_scheduled` - Triggered when a new gift is created\n* `gift_unclaimed` - Triggered when a new gift is unclaimed and is ready to be claimed\n* `gift_claimed` - Triggered when a gift is claimed\n* `gift_expired` - Triggered when a gift expires\n* `gift_cancelled` - Triggered when a gift is cancelled.\n* `gift_updated` - Triggered when a gift is updated\n* `hierarchy_created` - Triggered when a hierarchy is created\n* `hierarchy_deleted` - Triggered when a hierarchy is deleted\n* `payment_intent_created` - Sent when a Payment intent is created\n* `payment_intent_updated` - Sent when a Payment intent is updated\n* `contract_term_created` - Triggered when new contract term is created\n* `contract_term_renewed` - Triggered when new contract term is renewed\n* `contract_term_terminated` - Triggered when contract term is terminated\n* `contract_term_completed` - Triggered when contract term is completed\n* `contract_term_cancelled` - Triggered when contract term is cancelled\n* `voucher_created` - Triggered when a payment voucher is created\n* `voucher_expired` - Triggered when a payment voucher is expired\n* `voucher_create_failed` - Triggered when a payment voucher creation is failed\n* `subscription_ramp_created` - Triggered when a subscription ramp is created.\n* `subscription_ramp_deleted` - Triggered when a subscription ramp is deleted.\n* `subscription_ramp_applied` - Triggered when a subscription ramp is applied.\n* `subscription_ramp_drafted` - Triggered when a subscription ramp is moved to draft status.\n* `subscription_ramp_updated` - Triggered when a subscription ramp is updated.\n* `subscription_moved_in` - Triggered when a subscription moved from other customer\n* `subscription_moved_out` - Triggered when a subscription moved to other customer\n* `subscription_movement_failed` - Triggered when a subscription movement failed\n* `omnichannel_subscription_created` - Triggered when an omnichannel subscription is created\n* `omnichannel_subscription_item_renewed` - Triggered when an omnichannel subscription item is renewed\n* `omnichannel_subscription_item_downgrade_scheduled` - **(Deprecated)** Triggered when an omnichannel subscription item is downgrade is scheduled\n* `omnichannel_subscription_item_scheduled_downgrade_removed` - **(Deprecated)** Triggered when an omnichannel subscription item scheduled downgrade is removed\n* `omnichannel_subscription_item_downgraded` - Triggered when an omnichannel subscription item is downgraded\n* `omnichannel_subscription_item_expired` - Triggered when an omnichannel subscription item is expired\n* `omnichannel_subscription_item_cancellation_scheduled` - Triggered when an omnichannel subscription item is scheduled for cancellation\n* `omnichannel_subscription_item_scheduled_cancellation_removed` - Triggered when an omnichannel subscription item scheduled cancellation is removed\n* `omnichannel_subscription_item_resubscribed` - Triggered when an omnichannel subscription item is resubscribed\n* `omnichannel_subscription_item_upgraded` - Triggered when an omnichannel subscription item is upgraded\n* `omnichannel_subscription_item_cancelled` - Triggered when an omnichannel subscription item is cancelled\n* `omnichannel_subscription_imported` - Triggered when an omnichannel subscription item is imported\n* `omnichannel_subscription_item_grace_period_started` - Triggered when an omnichannel subscription item's grace period has started\n* `omnichannel_subscription_item_grace_period_expired` - Triggered when an omnichannel subscription item's grace period has expired\n* `omnichannel_subscription_item_dunning_started` - Triggered when an omnichannel subscription item's dunning has started\n* `omnichannel_subscription_item_dunning_expired` - Triggered when an omnichannel subscription item's dunning has expired\n* `rule_created` - Triggered when a rule is created\n* `rule_updated` - Triggered when a rule is updated\n* `rule_deleted` - Triggered when a rule is deleted\n* `record_purchase_failed` - Triggered when an omnichannel record purchase is failed\n* `omnichannel_subscription_item_change_scheduled` - Triggered when an omnichannel subscription item change is scheduled\n* `omnichannel_subscription_item_scheduled_change_removed` - Triggered when an omnichannel subscription item scheduled change is removed\n* `omnichannel_subscription_item_reactivated` - Triggered when an omnichannel subscription item's refund is reversed\n* `sales_order_created` - Triggered when sales order is created\n* `sales_order_updated` - Triggered when sales order is updated\n* `omnichannel_subscription_item_changed` - Triggered when an omnichannel subscription item is changed\n* `omnichannel_subscription_item_paused` - Triggered when an omnichannel subscription item is paused\n* `omnichannel_subscription_item_resumed` - Triggered when an omnichannel subscription item is resumed\n* `omnichannel_one_time_order_created` - Triggered when an omnichannel one time order is created\n* `omnichannel_one_time_order_item_cancelled` - Triggered when an omnichannel one time order item is cancelled\n* `omnichannel_subscription_item_pause_scheduled` - Triggered when an omnichannel subscription item scheduled for pause\n* `vault_token_created` - Triggered when a payment method is tokenized and stored in the vault.\n* `vault_token_updated` - Triggered when a vaulted payment method is updated.\n* `vault_token_deleted` - Triggered when a vaulted payment method is deleted from the vault.", "enum" : [ "plan_created", "plan_updated", "plan_deleted", "addon_created", "addon_updated", "addon_deleted", "coupon_created", "coupon_updated", "coupon_deleted", "coupon_set_created", "coupon_set_updated", "coupon_set_deleted", "coupon_codes_added", "coupon_codes_deleted", "coupon_codes_updated", "customer_created", "customer_changed", "customer_deleted", "customer_moved_out", "customer_moved_in", "promotional_credits_added", "promotional_credits_deducted", "subscription_created", "subscription_created_with_backdating", "subscription_started", "subscription_trial_end_reminder", "subscription_activated", "subscription_activated_with_backdating", "subscription_changed", "subscription_trial_extended", "mrr_updated", "subscription_changed_with_backdating", "subscription_cancellation_scheduled", "subscription_cancellation_reminder", "subscription_cancelled", "subscription_canceled_with_backdating", "subscription_reactivated", "subscription_reactivated_with_backdating", "subscription_renewed", "subscription_items_renewed", "subscription_scheduled_cancellation_removed", "subscription_changes_scheduled", "subscription_scheduled_changes_removed", "subscription_shipping_address_updated", "subscription_deleted", "subscription_paused", "subscription_pause_scheduled", "subscription_scheduled_pause_removed", "subscription_resumed", "subscription_resumption_scheduled", "subscription_scheduled_resumption_removed", "subscription_advance_invoice_schedule_added", "subscription_advance_invoice_schedule_updated", "subscription_advance_invoice_schedule_removed", "pending_invoice_created", "pending_invoice_updated", "invoice_generated", "invoice_generated_with_backdating", "invoice_updated", "invoice_deleted", "credit_note_created", "credit_note_created_with_backdating", "credit_note_updated", "credit_note_deleted", "subscription_renewal_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", "voucher_created", "voucher_expired", "voucher_create_failed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_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", "omnichannel_subscription_item_pause_scheduled", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "pattern" : "^\\[(plan_created|plan_updated|plan_deleted|addon_created|addon_updated|addon_deleted|coupon_created|coupon_updated|coupon_deleted|coupon_set_created|coupon_set_updated|coupon_set_deleted|coupon_codes_added|coupon_codes_deleted|coupon_codes_updated|customer_created|customer_changed|customer_deleted|customer_moved_out|customer_moved_in|promotional_credits_added|promotional_credits_deducted|subscription_created|subscription_created_with_backdating|subscription_started|subscription_trial_end_reminder|subscription_activated|subscription_activated_with_backdating|subscription_changed|subscription_trial_extended|mrr_updated|subscription_changed_with_backdating|subscription_cancellation_scheduled|subscription_cancellation_reminder|subscription_cancelled|subscription_canceled_with_backdating|subscription_reactivated|subscription_reactivated_with_backdating|subscription_renewed|subscription_items_renewed|subscription_scheduled_cancellation_removed|subscription_changes_scheduled|subscription_scheduled_changes_removed|subscription_shipping_address_updated|subscription_deleted|subscription_paused|subscription_pause_scheduled|subscription_scheduled_pause_removed|subscription_resumed|subscription_resumption_scheduled|subscription_scheduled_resumption_removed|subscription_advance_invoice_schedule_added|subscription_advance_invoice_schedule_updated|subscription_advance_invoice_schedule_removed|pending_invoice_created|pending_invoice_updated|invoice_generated|invoice_generated_with_backdating|invoice_updated|invoice_deleted|credit_note_created|credit_note_created_with_backdating|credit_note_updated|credit_note_deleted|subscription_renewal_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|dunning_updated|payment_refunded|payment_initiated|refund_initiated|netd_payment_due_reminder|authorization_succeeded|authorization_voided|card_added|card_updated|card_expiry_reminder|card_expired|card_deleted|payment_source_added|payment_source_updated|payment_source_deleted|payment_source_expiring|payment_source_expired|payment_source_locally_deleted|virtual_bank_account_added|virtual_bank_account_updated|virtual_bank_account_deleted|token_created|token_consumed|token_expired|unbilled_charges_created|unbilled_charges_voided|unbilled_charges_deleted|unbilled_charges_invoiced|order_created|order_updated|order_cancelled|order_delivered|order_returned|order_ready_to_process|order_ready_to_ship|order_deleted|order_resent|quote_created|quote_updated|quote_deleted|tax_withheld_recorded|tax_withheld_deleted|tax_withheld_refunded|gift_scheduled|gift_unclaimed|gift_claimed|gift_expired|gift_cancelled|gift_updated|hierarchy_created|hierarchy_deleted|payment_intent_created|payment_intent_updated|contract_term_created|contract_term_renewed|contract_term_terminated|contract_term_completed|contract_term_cancelled|voucher_created|voucher_expired|voucher_create_failed|subscription_ramp_created|subscription_ramp_deleted|subscription_ramp_applied|subscription_ramp_drafted|subscription_ramp_updated|subscription_moved_in|subscription_moved_out|subscription_movement_failed|omnichannel_subscription_created|omnichannel_subscription_item_renewed|omnichannel_subscription_item_downgrade_scheduled|omnichannel_subscription_item_scheduled_downgrade_removed|omnichannel_subscription_item_downgraded|omnichannel_subscription_item_expired|omnichannel_subscription_item_cancellation_scheduled|omnichannel_subscription_item_scheduled_cancellation_removed|omnichannel_subscription_item_resubscribed|omnichannel_subscription_item_upgraded|omnichannel_subscription_item_cancelled|omnichannel_subscription_imported|omnichannel_subscription_item_grace_period_started|omnichannel_subscription_item_grace_period_expired|omnichannel_subscription_item_dunning_started|omnichannel_subscription_item_dunning_expired|rule_created|rule_updated|rule_deleted|record_purchase_failed|omnichannel_subscription_item_change_scheduled|omnichannel_subscription_item_scheduled_change_removed|omnichannel_subscription_item_reactivated|sales_order_created|sales_order_updated|omnichannel_subscription_item_changed|omnichannel_subscription_item_paused|omnichannel_subscription_item_resumed|omnichannel_one_time_order_created|omnichannel_one_time_order_item_cancelled|omnichannel_subscription_item_pause_scheduled|vault_token_created|vault_token_updated|vault_token_deleted)(,(plan_created|plan_updated|plan_deleted|addon_created|addon_updated|addon_deleted|coupon_created|coupon_updated|coupon_deleted|coupon_set_created|coupon_set_updated|coupon_set_deleted|coupon_codes_added|coupon_codes_deleted|coupon_codes_updated|customer_created|customer_changed|customer_deleted|customer_moved_out|customer_moved_in|promotional_credits_added|promotional_credits_deducted|subscription_created|subscription_created_with_backdating|subscription_started|subscription_trial_end_reminder|subscription_activated|subscription_activated_with_backdating|subscription_changed|subscription_trial_extended|mrr_updated|subscription_changed_with_backdating|subscription_cancellation_scheduled|subscription_cancellation_reminder|subscription_cancelled|subscription_canceled_with_backdating|subscription_reactivated|subscription_reactivated_with_backdating|subscription_renewed|subscription_items_renewed|subscription_scheduled_cancellation_removed|subscription_changes_scheduled|subscription_scheduled_changes_removed|subscription_shipping_address_updated|subscription_deleted|subscription_paused|subscription_pause_scheduled|subscription_scheduled_pause_removed|subscription_resumed|subscription_resumption_scheduled|subscription_scheduled_resumption_removed|subscription_advance_invoice_schedule_added|subscription_advance_invoice_schedule_updated|subscription_advance_invoice_schedule_removed|pending_invoice_created|pending_invoice_updated|invoice_generated|invoice_generated_with_backdating|invoice_updated|invoice_deleted|credit_note_created|credit_note_created_with_backdating|credit_note_updated|credit_note_deleted|subscription_renewal_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|dunning_updated|payment_refunded|payment_initiated|refund_initiated|netd_payment_due_reminder|authorization_succeeded|authorization_voided|card_added|card_updated|card_expiry_reminder|card_expired|card_deleted|payment_source_added|payment_source_updated|payment_source_deleted|payment_source_expiring|payment_source_expired|payment_source_locally_deleted|virtual_bank_account_added|virtual_bank_account_updated|virtual_bank_account_deleted|token_created|token_consumed|token_expired|unbilled_charges_created|unbilled_charges_voided|unbilled_charges_deleted|unbilled_charges_invoiced|order_created|order_updated|order_cancelled|order_delivered|order_returned|order_ready_to_process|order_ready_to_ship|order_deleted|order_resent|quote_created|quote_updated|quote_deleted|tax_withheld_recorded|tax_withheld_deleted|tax_withheld_refunded|gift_scheduled|gift_unclaimed|gift_claimed|gift_expired|gift_cancelled|gift_updated|hierarchy_created|hierarchy_deleted|payment_intent_created|payment_intent_updated|contract_term_created|contract_term_renewed|contract_term_terminated|contract_term_completed|contract_term_cancelled|voucher_created|voucher_expired|voucher_create_failed|subscription_ramp_created|subscription_ramp_deleted|subscription_ramp_applied|subscription_ramp_drafted|subscription_ramp_updated|subscription_moved_in|subscription_moved_out|subscription_movement_failed|omnichannel_subscription_created|omnichannel_subscription_item_renewed|omnichannel_subscription_item_downgrade_scheduled|omnichannel_subscription_item_scheduled_downgrade_removed|omnichannel_subscription_item_downgraded|omnichannel_subscription_item_expired|omnichannel_subscription_item_cancellation_scheduled|omnichannel_subscription_item_scheduled_cancellation_removed|omnichannel_subscription_item_resubscribed|omnichannel_subscription_item_upgraded|omnichannel_subscription_item_cancelled|omnichannel_subscription_imported|omnichannel_subscription_item_grace_period_started|omnichannel_subscription_item_grace_period_expired|omnichannel_subscription_item_dunning_started|omnichannel_subscription_item_dunning_expired|rule_created|rule_updated|rule_deleted|record_purchase_failed|omnichannel_subscription_item_change_scheduled|omnichannel_subscription_item_scheduled_change_removed|omnichannel_subscription_item_reactivated|sales_order_created|sales_order_updated|omnichannel_subscription_item_changed|omnichannel_subscription_item_paused|omnichannel_subscription_item_resumed|omnichannel_one_time_order_created|omnichannel_one_time_order_item_cancelled|omnichannel_subscription_item_pause_scheduled|vault_token_created|vault_token_updated|vault_token_deleted))*\\]$", "example" : null }, "not_in" : { "type" : "string", "description" : "* `plan_created` - Sent when a plan is created. \n* `plan_updated` - Sent when a plan is changed. \n* `plan_deleted` - Sent when a plan is deleted. \n* `addon_created` - Sent when a addon is created. \n* `addon_updated` - Sent when a addon is changed. \n* `addon_deleted` - Sent when a addon is deleted. \n* `coupon_created` - Sent when a coupon is created. \n* `coupon_updated` - Sent when a coupon is changed. \n* `coupon_deleted` - Sent when a coupon is deleted. \n* `coupon_set_created` - Sent when a coupon set is created\n* `coupon_set_updated` - Sent when a coupon set is changed\n* `coupon_set_deleted` - Sent when a coupon set is deleted\n* `coupon_codes_added` - Sent when coupon codes are added in coupon set\n* `coupon_codes_deleted` - Sent when coupon codes are deleted in coupon set\n* `coupon_codes_updated` - Sent when coupon codes are updated\n* `customer_created` - Sent when a customer is created. This event happens when only a new customer is created or when a customer is automatically created during new subscription creation.\n* `customer_changed` - Sent when a customer is changed\n* `customer_deleted` - Sent when a customer is deleted\n* `customer_moved_out` - Sent when a customer is copied to another site\n* `customer_moved_in` - Sent when a customer is copied from another site\n* `promotional_credits_added` - Sent when a customer prmotion credits added\n* `promotional_credits_deducted` - Sent when a customer prmotion credits deducted\n* `subscription_created` - Sent when a new subscription is created.\n* `subscription_created_with_backdating` - Sent when a new subscription is created with backdating.\n* `subscription_started` - Sent when a 'future' subscription gets started at the scheduled date.\n* `subscription_trial_end_reminder` - Sent when the customer's trial period is about to end.\n* `subscription_activated` - Sent after the subscription has been moved from trial to active state\n* `subscription_activated_with_backdating` - Sent after the subscription changes to `active` from another `status`, while the change is backdated.\n* `subscription_changed` - Sent after the subscription's recurring items have been changed\n* `subscription_trial_extended` - Trial Extension\n* `mrr_updated` - Sent when either of MRR or CMRR of a subscription changes\n* `subscription_changed_with_backdating` - Sent after the subscription's recurring items have been changed with backdated date\n* `subscription_cancellation_scheduled` - Sent when subscription is scheduled to cancel at end of current term\n* `subscription_cancellation_reminder` - Sent when the customer's subscription is nearing it's scheduled cancellation date.\n* `subscription_cancelled` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'.\n* `subscription_canceled_with_backdating` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'.\n* `subscription_reactivated` - Sent when the subscription is moved from cancelled state to active or in_trial state\n* `subscription_reactivated_with_backdating` - Sent when the subscription is moved from cancelled state to active or in_trial state with past date\n* `subscription_renewed` - Sent when the subscription is renewed from the current term.\n* `subscription_items_renewed` - Sent when one or more Subscription Items are renewed\n* `subscription_scheduled_cancellation_removed` - Sent when scheduled cancellation is removed for the subscription.\n* `subscription_changes_scheduled` - Sent when subscription changes are scheduled for later. Changes will be applied at the end of current term.\n* `subscription_scheduled_changes_removed` - Sent when scheduled change for the subscription is removed.\n* `subscription_shipping_address_updated` - Triggered when shipping address is added or updated for a subscription.\n* `subscription_deleted` - Sent when a subscription has been deleted\n* `subscription_paused` - Sent when the subscription is paused.\n* `subscription_pause_scheduled` - Sent when the subscription is scheduled to pause.\n* `subscription_scheduled_pause_removed` - Triggered when scheduled pause is removed for the subscription.\n* `subscription_resumed` - Sent when the subscription is moved from paused state to active state\n* `subscription_resumption_scheduled` - Triggered when the subscription resumption is scheduled.\n* `subscription_scheduled_resumption_removed` - Triggered when scheduled resumption is removed for the subscription.\n* `subscription_advance_invoice_schedule_added` - Triggered when advance invoice is scheduled for a subscription.\n* `subscription_advance_invoice_schedule_updated` - Triggered when scheduled advance invoice is updated for a subscription.\n* `subscription_advance_invoice_schedule_removed` - Triggered when scheduled advance invoice is removed for a subscription.\n* `pending_invoice_created` - Event triggered (in the case of metered billing) when a \"Pending\" invoice is created that has usage related charges or line items to be added, before being closed. This is triggered only when the “Notify for Pending Invoices” option is enabled.\n* `pending_invoice_updated` - Event triggered when the option \"Notify and wait to close invoices\" is enabled, and the 'Pending' invoice is updated.\n* `invoice_generated` - Event triggered when a new invoice is generated. In case of metered billing, this event is triggered when a \"Pending\" invoice is closed.\n* `invoice_generated_with_backdating` - Event triggered when a new invoice is generated with past date as invoice date.\n* `invoice_updated` - Triggered when the invoice’s shipping/billing address is updated, if the invoice is voided, or when the amount due is modified due to payments applied/removed.\n* `invoice_deleted` - Event triggered when an invoice is deleted.\n* `credit_note_created` - Sent when a credit note is created\n* `credit_note_created_with_backdating` - Sent when a credit note is created with past date as credit note date\n* `credit_note_updated` - Sent when a credit note is updated\n* `credit_note_deleted` - Sent when a credit note is deleted\n* `subscription_renewal_reminder` - Sent before each subscription's renewal based on plan's period\n* `transaction_created` - Triggered when a transaction is recorded\n* `transaction_updated` - Triggered when a transaction is updated. E.g. (1) When a transaction is removed, (2) or when an excess payment is applied on an invoice, (3) or when amount_capturable gets updated.\n* `transaction_deleted` - Triggered when a transaction is deleted. \n* `payment_succeeded` - Sent when the payment is successfully collected\n* `payment_failed` - Sent when attempt to charge customer's credit card fails\n* `dunning_updated` - Sent when dunning is paused for an invoice\n* `payment_refunded` - Sent when a payment refund is made\n* `payment_initiated` - Sent when a payment is initiated via direct debit\n* `refund_initiated` - Sent when a refund is initiated via direct debit\n* `netd_payment_due_reminder` - **(Deprecated)** Sent when a invoice's due period is about to end\n* `authorization_succeeded` - Triggered when a authorization transaction is created.\n* `authorization_voided` - Triggered when a authorization transaction is voided. Authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time.\n* `card_added` - Sent when a card is added for a customer.\n* `card_updated` - Sent when the card is updated for a customer.\n* `card_expiry_reminder` - Sent when the customer's credit card is expiring soon. Sent 30 days before the expiry date.\n* `card_expired` - Sent when a card for a customer is expired\n* `card_deleted` - Sent when a card is deleted for a customer\n* `payment_source_added` - Sent when a payment source is added for a customer.\n* `payment_source_updated` - Sent when the payment source is updated for a customer or when role is assigned to the payment source.\n* `payment_source_deleted` - Sent when a payment source is deleted for a customer\n* `payment_source_expiring` - Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date.\n* `payment_source_expired` - Sent when a payment source for a customer is expired\n* `payment_source_locally_deleted` - Sent when a payment source for a customer removed from Chargebee\n* `virtual_bank_account_added` - Sent when a virtual bank account is added for a customer.\n* `virtual_bank_account_updated` - Sent when the virtual bank account is updated for a customer.\n* `virtual_bank_account_deleted` - Sent when a virtual bank account is deleted for a customer.\n* `token_created` - Sent when a Token is created\n* `token_consumed` - Sent when a Token is consumed\n* `token_expired` - Sent when a Token is expired\n* `unbilled_charges_created` - Triggered when unbilled charges are created\n* `unbilled_charges_voided` - Triggered when unbilled charges are voided\n* `unbilled_charges_deleted` - Triggered when unbilled charges are deleted\n* `unbilled_charges_invoiced` - Triggered when unbilled charges are invoiced\n* `order_created` - Triggered when order is created\n* `order_updated` - Triggered when order is updated\n* `order_cancelled` - Triggered when order is cancelled\n* `order_delivered` - Triggered when order is marked as delivered\n* `order_returned` - Triggered when order is marked as returned\n* `order_ready_to_process` - Triggered when order reaches it's order date\n* `order_ready_to_ship` - Triggered when order reaches it's shipping date\n* `order_deleted` - Triggered when order is deleted\n* `order_resent` - Triggered when order is resent\n* `quote_created` - Triggered when quote is created\n* `quote_updated` - Triggered when quote is updated\n* `quote_deleted` - Triggered when quote is deleted\n* `tax_withheld_recorded` - Triggered when a tax withheld is recorded for an invoice\n* `tax_withheld_deleted` - Triggered when a tax withheld is deleted\n* `tax_withheld_refunded` - Sent when a tax withheld refund is made\n* `gift_scheduled` - Triggered when a new gift is created\n* `gift_unclaimed` - Triggered when a new gift is unclaimed and is ready to be claimed\n* `gift_claimed` - Triggered when a gift is claimed\n* `gift_expired` - Triggered when a gift expires\n* `gift_cancelled` - Triggered when a gift is cancelled.\n* `gift_updated` - Triggered when a gift is updated\n* `hierarchy_created` - Triggered when a hierarchy is created\n* `hierarchy_deleted` - Triggered when a hierarchy is deleted\n* `payment_intent_created` - Sent when a Payment intent is created\n* `payment_intent_updated` - Sent when a Payment intent is updated\n* `contract_term_created` - Triggered when new contract term is created\n* `contract_term_renewed` - Triggered when new contract term is renewed\n* `contract_term_terminated` - Triggered when contract term is terminated\n* `contract_term_completed` - Triggered when contract term is completed\n* `contract_term_cancelled` - Triggered when contract term is cancelled\n* `voucher_created` - Triggered when a payment voucher is created\n* `voucher_expired` - Triggered when a payment voucher is expired\n* `voucher_create_failed` - Triggered when a payment voucher creation is failed\n* `subscription_ramp_created` - Triggered when a subscription ramp is created.\n* `subscription_ramp_deleted` - Triggered when a subscription ramp is deleted.\n* `subscription_ramp_applied` - Triggered when a subscription ramp is applied.\n* `subscription_ramp_drafted` - Triggered when a subscription ramp is moved to draft status.\n* `subscription_ramp_updated` - Triggered when a subscription ramp is updated.\n* `subscription_moved_in` - Triggered when a subscription moved from other customer\n* `subscription_moved_out` - Triggered when a subscription moved to other customer\n* `subscription_movement_failed` - Triggered when a subscription movement failed\n* `omnichannel_subscription_created` - Triggered when an omnichannel subscription is created\n* `omnichannel_subscription_item_renewed` - Triggered when an omnichannel subscription item is renewed\n* `omnichannel_subscription_item_downgrade_scheduled` - **(Deprecated)** Triggered when an omnichannel subscription item is downgrade is scheduled\n* `omnichannel_subscription_item_scheduled_downgrade_removed` - **(Deprecated)** Triggered when an omnichannel subscription item scheduled downgrade is removed\n* `omnichannel_subscription_item_downgraded` - Triggered when an omnichannel subscription item is downgraded\n* `omnichannel_subscription_item_expired` - Triggered when an omnichannel subscription item is expired\n* `omnichannel_subscription_item_cancellation_scheduled` - Triggered when an omnichannel subscription item is scheduled for cancellation\n* `omnichannel_subscription_item_scheduled_cancellation_removed` - Triggered when an omnichannel subscription item scheduled cancellation is removed\n* `omnichannel_subscription_item_resubscribed` - Triggered when an omnichannel subscription item is resubscribed\n* `omnichannel_subscription_item_upgraded` - Triggered when an omnichannel subscription item is upgraded\n* `omnichannel_subscription_item_cancelled` - Triggered when an omnichannel subscription item is cancelled\n* `omnichannel_subscription_imported` - Triggered when an omnichannel subscription item is imported\n* `omnichannel_subscription_item_grace_period_started` - Triggered when an omnichannel subscription item's grace period has started\n* `omnichannel_subscription_item_grace_period_expired` - Triggered when an omnichannel subscription item's grace period has expired\n* `omnichannel_subscription_item_dunning_started` - Triggered when an omnichannel subscription item's dunning has started\n* `omnichannel_subscription_item_dunning_expired` - Triggered when an omnichannel subscription item's dunning has expired\n* `rule_created` - Triggered when a rule is created\n* `rule_updated` - Triggered when a rule is updated\n* `rule_deleted` - Triggered when a rule is deleted\n* `record_purchase_failed` - Triggered when an omnichannel record purchase is failed\n* `omnichannel_subscription_item_change_scheduled` - Triggered when an omnichannel subscription item change is scheduled\n* `omnichannel_subscription_item_scheduled_change_removed` - Triggered when an omnichannel subscription item scheduled change is removed\n* `omnichannel_subscription_item_reactivated` - Triggered when an omnichannel subscription item's refund is reversed\n* `sales_order_created` - Triggered when sales order is created\n* `sales_order_updated` - Triggered when sales order is updated\n* `omnichannel_subscription_item_changed` - Triggered when an omnichannel subscription item is changed\n* `omnichannel_subscription_item_paused` - Triggered when an omnichannel subscription item is paused\n* `omnichannel_subscription_item_resumed` - Triggered when an omnichannel subscription item is resumed\n* `omnichannel_one_time_order_created` - Triggered when an omnichannel one time order is created\n* `omnichannel_one_time_order_item_cancelled` - Triggered when an omnichannel one time order item is cancelled\n* `omnichannel_subscription_item_pause_scheduled` - Triggered when an omnichannel subscription item scheduled for pause\n* `vault_token_created` - Triggered when a payment method is tokenized and stored in the vault.\n* `vault_token_updated` - Triggered when a vaulted payment method is updated.\n* `vault_token_deleted` - Triggered when a vaulted payment method is deleted from the vault.", "enum" : [ "plan_created", "plan_updated", "plan_deleted", "addon_created", "addon_updated", "addon_deleted", "coupon_created", "coupon_updated", "coupon_deleted", "coupon_set_created", "coupon_set_updated", "coupon_set_deleted", "coupon_codes_added", "coupon_codes_deleted", "coupon_codes_updated", "customer_created", "customer_changed", "customer_deleted", "customer_moved_out", "customer_moved_in", "promotional_credits_added", "promotional_credits_deducted", "subscription_created", "subscription_created_with_backdating", "subscription_started", "subscription_trial_end_reminder", "subscription_activated", "subscription_activated_with_backdating", "subscription_changed", "subscription_trial_extended", "mrr_updated", "subscription_changed_with_backdating", "subscription_cancellation_scheduled", "subscription_cancellation_reminder", "subscription_cancelled", "subscription_canceled_with_backdating", "subscription_reactivated", "subscription_reactivated_with_backdating", "subscription_renewed", "subscription_items_renewed", "subscription_scheduled_cancellation_removed", "subscription_changes_scheduled", "subscription_scheduled_changes_removed", "subscription_shipping_address_updated", "subscription_deleted", "subscription_paused", "subscription_pause_scheduled", "subscription_scheduled_pause_removed", "subscription_resumed", "subscription_resumption_scheduled", "subscription_scheduled_resumption_removed", "subscription_advance_invoice_schedule_added", "subscription_advance_invoice_schedule_updated", "subscription_advance_invoice_schedule_removed", "pending_invoice_created", "pending_invoice_updated", "invoice_generated", "invoice_generated_with_backdating", "invoice_updated", "invoice_deleted", "credit_note_created", "credit_note_created_with_backdating", "credit_note_updated", "credit_note_deleted", "subscription_renewal_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", "voucher_created", "voucher_expired", "voucher_create_failed", "subscription_ramp_created", "subscription_ramp_deleted", "subscription_ramp_applied", "subscription_ramp_drafted", "subscription_ramp_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", "omnichannel_subscription_item_pause_scheduled", "vault_token_created", "vault_token_updated", "vault_token_deleted" ], "pattern" : "^\\[(plan_created|plan_updated|plan_deleted|addon_created|addon_updated|addon_deleted|coupon_created|coupon_updated|coupon_deleted|coupon_set_created|coupon_set_updated|coupon_set_deleted|coupon_codes_added|coupon_codes_deleted|coupon_codes_updated|customer_created|customer_changed|customer_deleted|customer_moved_out|customer_moved_in|promotional_credits_added|promotional_credits_deducted|subscription_created|subscription_created_with_backdating|subscription_started|subscription_trial_end_reminder|subscription_activated|subscription_activated_with_backdating|subscription_changed|subscription_trial_extended|mrr_updated|subscription_changed_with_backdating|subscription_cancellation_scheduled|subscription_