# Maxio Advanced Billing ## Getting Started ### Overview Source: https://developers.maxio.com/http/getting-started/overview Landing Page
Integrate Maxio into your workflow Understand how we enable your subscription management workflow through these commonly used API endpoints
Subscriptions Learn more
Components Learn more
Allocations Learn more
Price Points Learn more
Events Learn more
Best-in-class tooling to get you up and running Explore our security, reliability, and building tools
99.9% uptime Maxio guarantees security and reliability to launch a world-class billing experience
Learn more
Ecosystem Advanced Billing has partnered with many SaaS solutions to help you manage your business.
Learn more
Security A winning combination of enterprise-grade security to protect your customers.
Learn more
Maxio.js (formerly Chargify.js) Streamline your existing API-based workflows in Maxio's Advanced Billing module.
Learn more
Frequently Asked Questions
What is the application’s uptime SLA?
Maxio will use commercially reasonable efforts to ensure that the Services will be available 99.6% of the time each month other than during scheduled maintenance.
Which methodologies are used to monitor API usage and limits?
Our API limits are described here. We log all incoming traffic, and have alerts when the limits are triggered too often. We use one of the best-in-class APM tools to monitor app performance.
How many out-of-the-box webhooks do you support?
We currently support 33 out-of-the-box webhooks.
How many API calls do your largest customers make per day?
  • 1st largest customer: 2.5M
  • 2nd largest customer: 1.2M
  • 3rd largest customer: 1M
  • 4th largest customer: 1M
  • 5th largest customer: 900K
### How to Get Started Source: https://developers.maxio.com/http/getting-started/how-to-get-started # Introduction Maxio Advanced Billing (formerly Chargify) provides an HTTP-based API that conforms to the principles of REST. One of the many reasons to use Advanced Billing is the immense feature set and [client libraries](https://developers.maxio.com/http/development-tools/using-the-developer-portal). The Maxio API returns JSON responses as the primary and recommended format, but XML is also provided as a backwards compatible option for merchants who require it. ## Steps to make your first Maxio Advanced Billing API call 1. [Sign-up](https://app.chargify.com/signup/maxio-billing-sandbox) or [log-in](https://app.chargify.com/login.html) to your [test site](https://maxio.zendesk.com/hc/en-us/articles/24250712113165-Testing-Overview) account. 2. [Setup authentication](https://maxio.zendesk.com/hc/en-us/articles/24294819360525-API-Keys) credentials. 3. [Submit an API request and verify the response](https://developers.maxio.com/http/development-tools/using-the-developer-portal#make-your-first-maxio-advanced-billing-api-request). 4. Test the Advanced Billing [integrations](https://www.maxio.com/integrations). Next, you can explore [authentication methods](https://developers.maxio.com/http/getting-started/authentication), [basic concepts](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/sites) for interacting with Advanced Billing via the API, and the entire set of [application-based documentation](https://docs.maxio.com/hc/en-us) to aid in your discovery of the product. ### Request Example The following example uses the curl command-line tool to make an API request. **Request** curl -u :x -H Accept:application/json -H Content-Type:application/json https://acme.chargify.com/subscriptions.json # Environments This API has support for the following environment(s). Each environment has one or more base URIs defined. ## US Default Advanced Billing environment hosted in US. Valid for the majority of our customers. | Server | Base URI | | --- | --- | | production | `https://{site}.chargify.com` | | ebb | `https://events.chargify.com/{site}` | ## EU Advanced Billing environment hosted in EU. Use only when you requested EU hosting for your AB account. | Server | Base URI | | --- | --- | | production | `https://{site}.ebilling.maxio.com` | | ebb | `https://events.chargify.com/{site}` | The default environment is **US** and the default server is **production**. ## Template Parameters in Base URI Some of the base URI have template parameters. | Name | Type | Description | | --- | --- | --- | | site | `String` | The subdomain for your Advanced Billing site.
*Default: subdomain* | # Authorization This API uses the following authentication schemes. * [`BasicAuth (Basic Authentication)`](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) ## BasicAuth (Basic Authentication) HTTP Basic Authentication will need client credentials. The client credentials are concatenated with a colon (:) and base64-encoded before being sent in the *Authorization* header. ```bash curl {BASEURI} -u '{BASIC_AUTH_USER_NAME}:{BASIC_AUTH_PASSWORD}' ``` ```http GET / HTTP/1.1 Host: {HOST} Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ= ``` ### Authentication Source: https://developers.maxio.com/http/getting-started/authentication # Authentication Learn how to use API authentication to communicate directly with Advanced Billing from any programming language that you wish. --- There are two methods of authentication, depending on what you are accessing: - [Maxio API](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/create-subscription) - [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview) Both methods of authentication assume you have previously generated API keys and securely stored them for later use. For more information, see this help article on [Advanced Billing API Keys](https://maxio.zendesk.com/hc/en-us/articles/24294819360525-API-Keys). ## API The first method of interaction is through the API. API Authentication is implemented as HTTP Basic Authentication over TLS (HTTPS). Your API login credentials are not the same as the credentials you use to log in to the web interface. You must obtain your API credentials separately, and you must connect to the API via TLS 1.2 (or better). > Advanced Billing no longer supports TLS 1.0 or TLS 1.1 over HTTPS on the chargify.com domain. Any older browsers or API clients that do not support TLS 1.2 will no longer work. This change is mandated by the PCI Security Council and affects all merchants and service providers processing or transmitting credit card data. For more information, see our help article on [Security](https://maxio.zendesk.com/hc/en-us/articles/24183963101069-Security). One of the most common calls you will make via the API is to retrieve a list of subscriptions to retrieve additional information, such as the status of a specific subscription. A simple way to authenticate is to use the API Key as the _username_ and "X" as the _password_, like the following: ``` curl https://{subdomain}.chargify.com/subscriptions.{format} \ -u '{API_key}:X' \ -H 'content-type: application/json' \ -X GET ``` If passing the Basic Authentication header, the API key and password require base64 encoding: ``` curl --request GET \ --url 'https:///{subdomain}.chargify.com/subscriptions.{format}' \ --header 'authorization: Basic PDxhcGlfa2V5Pj46...' \ --header 'content-type: application/json' ``` > ❗️ The API is case-sensitive. --- # What's next? After completing authentication setup, review the following articles: - Managing [sites](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/sites) - Creating [products](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/product-catalog#product) and how they control what you bill customers - Creating [subscriptions](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup) (i.e., signing up customers) ### Advanced Billing Concepts #### Sites Source: https://developers.maxio.com/http/getting-started/advanced-billing-concepts/sites # Site Subdomains Learn how to use sites to organize your business and configure access for API calls. --- Your first site is created automatically after you choose a currency. Sites are simply "containers" for your products, customers, and subscriptions. A single site is sufficient for some use cases, though most merchants use at least two — one for **testing** and one for **production.** ## Site Access [Log in to manage your sites](https://app.chargify.com/login). You have the following options for managing sites: - Creating a new site - Viewing a site dashboard - Cloning a site (i.e., making a copy of the site structure, including products, components, families, etc.) - Editing a site (currency, name, date/time format, timezone, etc) - Deleting a site To begin, create a site (make sure to put it in test mode) and pick a subdomain that you will remember for use in your API calls. For more information about sites, including: switching sites, clearing site data, cloning - see the [Sites](https://maxio.zendesk.com/hc/en-us/articles/24250614702221-Sites-Overview) help article. ## Site API Subdomain Every site has the ability to have one or more API keys associated with it to allow API access. The subdomain name is used in API calls to direct what site should be used in the context of the API call. For example, if you have a site called "Acme, Inc." with the subdomain "acme," you would use a call similar to: ```perl curl -u :X -H Accept:application/json -X GET https://acme.chargify.com/subscriptions.json ``` The host is always in the form `https://.chargify.com` followed by the URI for the API resource you are trying to access. In this last example, that would be `/subscriptions.json` as that is the URI of the resource to get a list of subscriptions in JSON. ## Clearing Site Data Clearing your site data is very useful in specific circumstances: - When in **development/test**, clearing your site data allows you to remove records that you added in for testing. - When moving to **production/live mode**, clearing your site data is necessary for allowing your gateway to actually process real money. Clearing your site data can be done in the following methods: 1. Clearing site data via the website. 2. Clearing site data via the API. ### Clearing via Website To clear your site data via the website, see the [Clearing Site Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) help article. ### Clearing via API There are a few options for clearing your site data, which match the settings available if you perform this action through the website. The most basic is clearing _all your data_: ```perl curl -u :X -H Accept:application/json -X POST https://acme.chargify.com/sites/clear_data.json ``` For more information about the parameters for clearing your site data using the API, see [Clear Site](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sites/clear-site). --- # What's next? After you've created a new site, you should check out the following articles: - [Products](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/product-catalog#product) - [Subscriptions](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup) #### Product Catalog Source: https://developers.maxio.com/http/getting-started/advanced-billing-concepts/product-catalog Learn how to setup products and components for use when creating subscriptions. Products control what is charged and how often charges are assessed/billed to a subscription. If you need help after reading this, [let us know](https://developers.maxio.com/http/help/getting-support) so we can help and also improve this documentation. --- With regards to products, there are three important aspects that are required for using products when interacting with the API: - Creating the [product family](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/product-catalog#product-family) - Creating the [product](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/product-catalog#product) Before delving into this section, we recommend reviewing our [Products Introduction](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview) help article. # Product Family Products have to belong to a product family. Think of them as a logical grouping of products. In our Acme, Inc. example - one possible product family would be "Acme Projects". To create a product family using the API you need to do the following: Input attributes: - `name` (required) - The product family name. For example, if your app had two levels of service, "Basic" and "Premium" then these might be the product names. - `handle` (optional) - The handle of the product family. This is generated automatically if not specified. - `description` (optional) - A quick description of what the product family is. An example of our input attributes might look like the following: ```json // product_family.json { "product_family": { "name": "Acme Projects", "description": "Amazing project management tool" } } ``` That data should be posted to the [Create Product Family](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-families/create-product-family) endpoint. A simple curl example would be the following: ```perl curl -u :X -H Accept:application/json -d @product_family.json -X POST https://.chargify.com/product_families.json ``` To create a product family using the application, refer to the [Creating Product Families](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-Families) help article for more information. See [Create Product Family](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-families/create-product-family) for a complete listing of input/output schema, along with code examples in multiple programming languages. # Product In Advanced Billing, you sell Subscriptions to your Products. You must first create and configure a Product before you can sell anything to a Customer. In your app or business, you might call these products your “Plans” or “Feature Levels”. For example, if you have “Basic”, “Pro”, and “Max” plans, each of these would be a separate Product within Advanced Billing. You can create a product using the Create Product endpoint: ```json { "product": { "name": "Basic Plan", "handle": "basic", "description": "This is our basic plan.", "accounting_code": "123", "request_credit_card": true, "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "auto_create_signup_page": true } } ``` That data is posted to the [Create Product](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/create-product) endpoint. # Product Price Points Product price points allow you to charge customers different amounts and at different frequencies for the same product. See the [Product Price Points](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points) help article. # Components Components are a great way to customize how your customers can use your products or services, and provide an excellent mechanism for increasing the [MRR](https://www.maxio.com/saaspedia#saaspedia_mrr-articles) per subscription through new features you might develop. --- Components allow you to introduce additional line items to your products that are often expressed as add-ons, premium features, or pay-per-use items. There are two basic concepts needed to use components that we will discuss: 1. [Creating](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/product-catalog#creating-components) components 2. The [usage/allocation](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/product-catalog#usage-allocation) of components For more information about components, see our [Component](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview) help article. ## Creating Components To use components, you must first create them. You can do this in a number of ways: by creating them via the Advanced Billing user interface, or by creating them via the API. In the following example, let's create a component called "Text Messages" that costs $0.0075 per message: ```json { "metered_component": { "name": "Text messages", "unit_name": "text message", "taxable": true, "pricing_scheme": "per_unit", "unit_price": 0.0075 } } ``` The response for the creation of this component would provide you the ID necessary to use the component in all further subsequent API usage requests. If you need to display component pricing to your customers, we recommend caching this information in your application rather than making repeated API calls for it, since the pricing structure of a component does not usually change very often. For more information on components, see the following: - About [Components](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview) help article - Creating components [via the API](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/create-metered-component) ## Usage/Allocation Associating components with a subscription is done by allocating (or adding usage, depending on the type of component). - For metered components which reset to zero at each billing period, you would be adding "usage". For example, if your customer sent 10 text messages today, you would add usage for 10 units of the "text message" component (see above). - For quantity components, you would be "allocating" use. For example, if you had a component that represented the number of seats covered under their license, you would allocate that amount: i.e., the customer is allocated 10 seats covered by their license to use your software. - For "on/off" components, you would be turning them on or off. For example, let's say your customer could have "premium support" for an extra $25/month. That component, "premium support" could be turned on or off at will during the life time of the subscription - including prorating it during changes to the subscription plan. The following is an example that adds 5 text messages as "usage": ```json { "usage": { "quantity": 5, "memo": "Extra text messages" } } ``` Components can be used in a huge number of varying ways to cover your business model - it's just up to you on how you want it to work. ## Coupons Are you looking to offer current or potential customers a discount? Advanced Billing handles all of your promotional codes, discounts, and coupons with ease. Simply name the promotion, set your desired promo code, and enter the discount. You even have the power to control the expiration date and how long the promotion runs for in conjunction with your products. Let's create a coupon that we can then use when creating our next subscription. ```json // POST /coupons.json { "coupon": { "name": "15% off", "code": "15OFF", "description": "15% off for life", "percentage": "15", "allow_negative_balance": "false", "recurring": "false", "end_date": "2012-08-29T12:00:00-04:00", "product_family_id": "2" } } ``` For more information on coupons, see the following: - Create a coupon [via the API](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/create-coupon). - Use a coupon when creating a new subscription [via the API](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/create-subscription). #### Hybrid Pricing Source: https://developers.maxio.com/http/getting-started/advanced-billing-concepts/hybrid-pricing Hybrid Pricing lets a single Component bill a primary tiered, volume, or stairstep pricing model together with a secondary pricing model for usage above an included threshold, as a single invoice line item. --- # How it works Hybrid Pricing combines a Component's primary pricing model with a secondary pricing model, and bills both together as one invoice line item instead of multiple. The primary model covers usage up to an included threshold, and the secondary model takes over for usage beyond that threshold. # Requirements Hybrid Pricing only applies when all of the following are true for a given Price Point: | Requirement | Details | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Site feature | Hybrid Pricing must be enabled for the Site, and requires Invoice-Centric Billing to also be enabled. This is not a self-service toggle. Contact your Maxio account team to enable it. | | Component type | Only Quantity-Based and Metered Components support Hybrid Pricing. Metered Components configured for event-based billing (metric, meter, or formula) are not eligible. | | Primary pricing model | Must be `volume`, `tiered`, or `stairstep`. `per_unit` cannot be the primary model. | | Primary pricing brackets | The primary model's highest bracket must have a finite `ending_quantity` (the included threshold). An open-ended top bracket disqualifies the Price Point from Hybrid Pricing. | | Secondary pricing model | A secondary pricing model must be configured on the Price Point (the `overage_pricing_scheme` and `overage_pricing` parameters). | There is no explicit `hybrid` flag anywhere in the API. A Price Point becomes a hybrid Price Point automatically once the requirements above are satisfied. Configure it the same way you would configure any Component with a secondary pricing model. # Configuring Hybrid Pricing via the API Hybrid Pricing is configured through the existing Components and Price Points endpoints. There is no dedicated Hybrid Pricing endpoint or parameter. ## Creating the Component Create a Quantity-Based or Metered Component with a bracketed primary `pricing_scheme` and a secondary pricing block (the `overage_pricing` parameter): ```json // POST /product_families/{product_family_id}/quantity_based_components.json { "quantity_based_component": { "name": "Seats", "unit_name": "seat", "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 1, "ending_quantity": 10, "unit_price": 500 } ], "overage_pricing": { "pricing_scheme": "per_unit", "prices": [{ "starting_quantity": 1, "unit_price": 8 }] } } } ``` This creates a Component whose default Price Point charges a flat $500 for up to 10 seats, then $8 per seat beyond that. Post this to the [Create Quantity Based Component](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/create-quantity-based-component) endpoint. Since the site has Hybrid Pricing enabled and the primary model (`stairstep`) has a finite included threshold, this Price Point is a hybrid Price Point. `overage_pricing.prices` is its own self-contained bracket set: `starting_quantity` always starts at `1`, not at the primary model's `ending_quantity`. The secondary model still only takes effect once usage crosses the primary model's included threshold. ## Adding or updating a Price Point The same secondary pricing structure (the `overage_pricing` parameter) applies when creating or updating additional Price Points on an existing Component: ```json // POST /components/{component_id}/price_points.json { "price_point": { "name": "Enterprise", "pricing_scheme": "tiered", "prices": [ { "starting_quantity": 1, "ending_quantity": 50, "unit_price": 4 } ], "overage_pricing_scheme": "per_unit", "overage_pricing": { "prices": [{ "starting_quantity": 1, "unit_price": 2 }] } } } ``` See [Create Component Price Point](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/create-component-price-point) and [Update Component Price Point](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/update-component-price-point) for the complete input/output schema. ## Common validation errors | Error | Cause | | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `Pricing scheme cannot be per_unit for hybrid pricing` | The primary `pricing_scheme` was set to `per_unit` while a secondary pricing model was also configured on a hybrid-eligible Component. Use `volume`, `tiered`, or `stairstep` for the primary model instead. | | `Prices primary pricing must have a finite included threshold for hybrid pricing` | The primary model's highest bracket did not specify an `ending_quantity`. Add one to define where the secondary model takes over. | `overage_pricing_scheme` is required for Hybrid Pricing to take effect, but omitting it does not raise a validation error: the entire `overage_pricing` block is silently ignored and the Price Point is created as a normal, non-hybrid Price Point using only the primary pricing. Always confirm `overage_pricing_scheme` is present in your request when you expect a Price Point to be hybrid. # Invoicing Hybrid Price Points bill through the same Invoices you already use. No separate resource is introduced. The customer sees one line item per billing period for the Component, combining the primary and secondary charges instead of billing them as separate line items. # Best Practices - **Confirm Invoice-Centric Billing and the Hybrid Pricing feature are both enabled for the Site** before configuring a hybrid Price Point. Otherwise the Price Point falls back to billing the primary and secondary pricing as separate invoice line items, even with an identical `overage_pricing` configuration. - **Always set a finite `ending_quantity`** on the primary model's top bracket to indicate where the primary model ends and the secondary model begins. - **Cache pricing structure in your application** rather than re-fetching it on every request, consistent with our general guidance for [Components](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/product-catalog#components). #### Subscription Signup Source: https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup You can create signups (also called subscriptions) by signing up customers to products on your site. This guide focuses on the basics of creating subscriptions, though Advanced Billing can almost handle any scenario using API integration. - Advanced Billing [signup methods](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup#signup-methods) - The [payment methods](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup#payment-methods) available for subscriptions - How to handle customers with [multiple subscriptions](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup#multiple-subscriptions) - Component [quantities](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup#components) and how they can be used to customize billing --- You can review our product documentation for more details: - [Subscriptions Reference](https://maxio.zendesk.com/hc/en-us/articles/24251526991757-Subscription-Overview) - [Subscriptions Actions](https://maxio.zendesk.com/hc/en-us/articles/24251983024653-Subscription-Actions-Overview) - [Subscription Cancellation](https://maxio.zendesk.com/hc/en-us/articles/24251957778829-Cancel-Subscriptions) - [Subscription Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) - [Subscription Import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports) - [Product Options](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing). # Signup Methods There are a number of methods of actually signing up customers to your business. Explore the following help articles and see how they might be used in your business: - [Manually (within Advanced Billing)](https://maxio.zendesk.com/hc/en-us/articles/24181202779149-Create-Subscriptions-Inside-Advanced-Billing) - [With Public Signup Pages (PSP)](https://maxio.zendesk.com/hc/en-us/articles/24181172242957-Accept-Signups-with-Public-Signup-Pages?method=themes) - [Via the API](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup#api) ## Manually (within Advanced Billing) The easiest way to create simple subscriptions is directly within your Advanced Billing account. Before you begin, ensure that you have at least one Product available for use in the example below. For step-by-step instructions, see the [Create Subscriptions Inside Advanced Billing quick start guide](https://maxio.zendesk.com/hc/en-us/articles/24181202779149-Create-Subscriptions-Inside-Advanced-Billing). This sign-up method is ideal for businesses with a low volume of subscriptions. It is the fastest way to get started, as it requires no integration. While this method is simple and effective for initial setup, manually signing up customers is not scalable. Fortunately, there are more robust solutions available to automate and streamline the process. ## Public Signup Pages (PSP) Public Signup Pages are fully customizable, white-labeled pages that serve as the public-facing side of your subscription business. They provide a fast, code-free way to integrate with Advanced Billing without handling payment information or building a custom integration. All Advanced Billing plans include access to two types of Public Signup Pages: 1. A Public Signup Page is automatically created for each new product and allows people to sign up for any of your current active products. 2. A [Self-Service Page](https://maxio.zendesk.com/hc/en-us/articles/24261425318541-Self-Service-Pages#example-self-service-page) is automatically created for each active subscription and allows the customer to manage payment methods. For details on configuring the appearance and behavior of your Public Page, see [Public Page Default Settings](https://maxio.zendesk.com/hc/en-us/articles/24261337051789-Default-Page-Settings) and [Individual Page Settings](https://maxio.zendesk.com/hc/en-us/articles/24261368332557-Individual-Page-Settings). When using Public Signup Pages, you have a specific URL to which customers can be sent that will allow them to sign themselves up - creating the subscription that is then added to your site. We recommend reviewing how [Public Signup Pages work](https://maxio.zendesk.com/hc/en-us/articles/24181202779149-Create-Subscriptions-Inside-Advanced-Billing) to better understand the many ways Advanced Billing can be integrated with your systems. Public Signup Pages can also be a useful tool during development to test a simple signup with our pre-made forms versus your form in order to troubleshoot. In some cases, the Public Signup Pages can't quite handle the specific scenario that you might need in your integration with Advanced Billing - that's why we expose a public API for you to consume by your application. ## API You can create a basic subscription through the Advanced Billing API by providing just a few key details: 1. The **product** - A subscription links a customer to a product available on your site, so it needs to be specified when creating a subscription. 2. The **customer** - A customer is the person who is consuming your product/service. This can either be a reference to an existing customer in your site, or a completely new customer. 3. The **payment method** - Required for paid Products or any product with a billable component. This specifies how payment is collected. > **Note:** > Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox. Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information. - For [automatic](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup#payment-methods) billing, payments are collected through a credit card or Automated Clearing House (ACH) details. > **Note:** > Use [Maxio.js (formerly Chargify.js)](https://developers.maxio.com/#/http/x-redirect/JTI0ZSUyRmRldmVsb3BtZW50LXRvb2xzJTJGY2hhcmdpZnktanMtb3ZlcnZpZXc) to easily construct signup and payment profile update forms directly on your existing sites. This approach ensures that you meet the latest [PCI compliance requirements](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance). - For [invoice](https://maxio.zendesk.com/hc/en-us/articles/24302160124173-Invoices-Overview-Statements) billing, the payment does not happen automatically but can still be done manually either through: non-electronic means and marked manually, or by using a credit card. For example, the following `POST` to the Create Subscription API endpoint creates a subscription: ```json { "subscription": { "product_handle": "pro-plan", "customer_attributes": { "first_name": "Joe", "last_name": "Smith", "email": "j.smith@example.com" }, "credit_card_attributes": { "chargify_token": "tok_cwhvpfcnbtgkd8nfkzf9dnjn", "payment_type": "credit_card" } } } ``` For more information, see the [Create Subscription endpoint documentation](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/create-subscription). For advanced subscription creation scenarios, see [Advanced Subscription Creation Examples](https://developers.maxio.com/http/getting-started/about-the-api/expert-usage#advanced-signup-examples). # Payment Methods The payment method for a customer can be either Automatic or Remittance. With Automatic billing, the customer is automatically charged when a subscription renews. With Remittance, the customer is not automatically charged. Instead, an invoice is generated at renewal and can be sent to the customer. You can then record the payment manually once it is received. For more information, see the [Payment Methods](https://maxio.zendesk.com/hc/en-us/articles/24181238764685-Overview-Subscription-Management?method=paymenttype) help article. # Taxes If you intend to charge your subscribers tax via [Avalara taxes](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax) or [custom taxes](https://maxio.zendesk.com/hc/en-us/articles/24287044212749-Custom-Taxes), there are a few considerations regarding collecting subscription data. For subscribers to be eligible to be taxed, the following information for the `customer` object or `payment_profile` object must be supplied: - A subscription to a [taxable product](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing#tax-settings) - [Full valid billing or shipping address](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax#full-address-required-for-taxable-subscriptions) to identify the tax locale - The portion of the address that houses the [state information](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax#required-state-format-for-taxable-subscriptions) of either address must adhere to the ISO standard of a 2-3 character limit/format. The portion of the address that houses the [country information](https://maxio.zendesk.com/hc/en-us/articles/24287008131853-Advanced-Billing-Managed-Sales-Tax#required-country-format-for-taxable-subscriptions) must adhere to the ISO standard of a 2 character limit/format. # Multiple Subscriptions Advanced Billing doesn't limit you to only allowing one single subscription per customer, you can have multiple subscriptions for a single customer using separate or linked payment methods. In the following example, the existing customer with `reference` (shown as `customer_reference` below) value `1234-AB` will be subscribed to the product specified. You may also specify the customer_id, but it's far more useful to map a user on your system to a customer on Advanced Billing using this reference value. It's commonly filled with the user's unique identifier (i.e., the userID), which makes referencing the customer in Advanced Billing very simple as there are customer reference value filters in many methods. ```json { "subscription": { "product_handle": "basic", "customer_reference": "1234-AB", "credit_card_attributes": { "chargify_token": "tok_cwhvpfcnbtgkd8nfkzf9dnjn", "payment_type": "credit_card" } } } ``` For more information about the `customer_reference` and `customer_id` values, see [Create Subscription](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/create-subscription). # Subscription in a Customer Hierarchy For sites using the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays) features, it is possible to create subscriptions within a customer hierarchy. This functionality is available through the API by including `group` parameters in the create subscription request. The `group` parameters are optional and consist of the required `target` parameter and the optional `billing` parameter. When the `target` parameter specifies a customer that is already part of a hierarchy, the new subscription becomes a member of the customer hierarchy. If the target customer is not part of a hierarchy, Maxio creates a new customer hierarchy, and both the target customer and the new subscription become part of the hierarchy with the specified target customer designated as the responsible payer for all subscriptions in that hierarchy. Rather than specifying a customer, the `target` parameter can a value of `self`, which indicates the subscription is paid for by the subscribing customer. This is true whether the customer is being created new, already part of a hierarchy, or already exists outside a hierarchy. A valid payment method must also be specified in the subscription parameters. When creating subscriptions in a customer hierarchy, if the hierarchy does not already have a payment method, passing a payment method makes that payment method the default for the customer hierarchy, regardless of the responsible payer. # Subscription in a Subscription Group For sites making use of [relationship billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) you can create a subscription as part of a [subscription group](https://maxio.zendesk.com/hc/en-us/articles/24252172565005-Subscription-Groups-Overview) to use [invoice consolidation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). You can achieve this through the API by passing group parameters in the create subscription request. The `group` parameters are optional and consist of the required `target` and optional `billing` parameters. The `target` parameters specify an existing subscription with which the newly created subscription should be grouped. If the target subscription is already part of a group, the new subscription becomes a member of the group as well. If the target subscription is not part of a group, a new group is created and both the target and the new subscription become part of the group with the target as the group's primary subscription. ## Billing Parameters for Group and Customer Hierarchy Subscriptions The optional `billing` parameters control how billing is handled for new subscription in a customer hierarchy or group: - Use the `accrue` parameter to defer payment capture and accrue charges until the next assessment date. - Use the `align_date` parameter to align the billing date of the new Subscription with the target Subscription. - When aligning dates, you can also specify the `prorate` parameter so that charges for the new Subscription are prorated according to the target Subscription’s billing period. # Components A common first step during signup is to allocate one or more components that match the initial state of the customer’s subscription. Consider a subscription service that ships a set number of widgets each month. If the Customer signs up for the “5 widgets per month” Product, you would allocate five units of the widget component, as shown below: ```json { "subscription": { "product_handle": "basic", "customer_attributes": { "first_name": "Alysa", "last_name": "Test", "email": "alysa@example.com", "reference": "1234-AB" }, "credit_card_attributes": { "chargify_token": "tok_cwhvpfcnbtgkd8nfkzf9dnjn", "payment_type": "credit_card" }, "components": [ { "component_id": 1, "allocated_quantity": 5 } ] } } ``` For more information about components and how to use this great feature to customize your signup process - see [components](https://developers.maxio.com/#/http/x-redirect/cGFnZSUzQWNvcmUtY29uY2VwdHMlMkZwcm9kdWN0LWNhdGFsb2clMjNjb21wb25lbnRz). See the following articles for a deep dive into how components function within Advanced Billing: - [Setting component allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) - [Building components in Advanced Billing](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview) # Managing Subscriptions After a Subscription is created, you or your customer will likely need to manage it in various ways. The following sections outline common subscription management tasks. --- ## One-Time Charges Advanced Billing allows you to add charges to a subscription outside of the regular recurring billing cycle. This is called a ["one-time" charge](https://maxio.zendesk.com/hc/en-us/articles/24302079003533-One-time-Charges) A one-time charge is a charge that happens once either by submitting the charge via the API or by creating the charge manually in the app. This example posts a $1 charge to a subscription: ```json // POST /subscriptions/{subscription_id}/charges.json { "charge": { "amount_in_cents": 100, "memo": "This is the description of the reason for the $1 charge." } } ``` For more information, see [the API details for creating charges](https://developers.maxio.com/legacy/http/api-endpoints/legacy-subscription-balance/create-subscription-charge). ## Billing Dates It is common for a subscription’s billing date to change. The billing date is the next date the subscription is processed or assessed, and when charges may be captured from its payment method. Changes to the billing date are typically made to extend or shorten trials, process a Subscription immediately, or adjust the date for [calendar billing](https://maxio.zendesk.com/hc/en-us/articles/24286596359949-Calendar-Billing) scenarios. This example updates the billing date for a subscription: ```json /// POST /subscriptions/{subscription_id}.json { "subscription": { "next_billing_at": "2016-08-29T12:00:00-04:00" } } ``` See the full API documentation for [updating subscription assessment date](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/update-subscription) for more information. ## Updating Payment Details Updating the payment details allows you to change the card used for a subscription or update the card’s expiration date. > If your customer pays taxes on their purchased product, and you are attempting to update the `payment_profile`, complete address information is required. For information on required address formatting to allow your subscriber to be taxed, see the section on [sign-up taxes](https://developers.maxio.com/#/http/x-redirect/cGFnZSUzQWludHJvZHVjdGlvbiUyRmJhc2ljLWNvbmNlcHRzJTJGU2lnbnVwcyUyM3RheGVz). You can update the payment details via: - [Self-Service Pages](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup#updating-via-self-service-pages) - [API](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup#updating-via-api) - [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview) ### Updating via Self-Service Pages You can allow your users to update their information themselves, using the self-service public hosted pages or even the new billing portal. For the public service page card update, you merely direct them to a specific URL: `https://{subdomain}.chargify.com/update_payment/{subscription_id}/{token}` - The `subdomain` is just your subdomain. Our imaginary company "Acme"'s URL would start like the following: `https://acme.chargify.com` - The `subscription_id` would be the integer ID of the subscription as it is in the Advanced Billing site/subdomain. - The `token` is calculated using the first 10 characters of the SHA-1 hex digest of this message: ``` message = "update_payment--{subscription_id}--{shared_key}" token = SHA1(message)[0..9] ``` For more information about the self-service card update public page, see the [Obtaining the Self-Service Page URL](https://maxio.zendesk.com/hc/en-us/articles/24261425318541-Self-Service-Pages#obtaining-the-self-service-page-url) article. Your users can also self-service update their payment method if using the Advanced Billing Portal feature, see [Updating Payment Information via the Billing Portal](https://maxio.zendesk.com/hc/en-us/articles/24261425318541-Self-Service-Pages#updating-payment-information-via-the-billing-portal) for more information. ### Updating via API Updating payment profiles via the API is useful in situations where you are more directly integrating with Advanced Billing. There are many methods of performing this action via the API, you can: 1. Update the payment profile indirectly through a subscription update 2. Update the payment profile directly See [Update Payment Profile](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/update-payment-profile) and [Update Subscription](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/update-subscription) for more complete documentation about updating payment profiles via the API. ## Cancelling Cancelling subscriptions is another common task that customers can perform, or that is performed on their behalf when payment cannot be captured. This example cancels a subscription: ```json // DELETE /subscriptions/{subscription_id}.json { "subscription": { "cancellation_message": "Canceling the subscription via the API" } } ``` You can also cancel a subscription at the end of the current billing period, which is called a delayed cancellation. This is an example of a delayed cancellation request: ```json // DELETE /subscriptions/{subscription_id}.json { "subscription": { "cancel_at_end_of_period": 1, "cancellation_message": "Canceling the subscription via the API" } } ``` For information about cancelling using the API, see [Cancelling via API](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/cancel-subscription). For information about cancelling subscriptions in general, see the [Cancellations](https://maxio.zendesk.com/hc/en-us/articles/24252133729165-Cancellations) help article. ## Refunds With Advanced Billing you have the ability to apply a refund to payments that have been processed at the gateway. Refunds are only supported for the gateways listed in the [Issuing Refunds in Statement-Based Sites](https://maxio.zendesk.com/hc/en-us/articles/24302120115213-Refunds) help article. For gateways like Bambora, you need to perform a "manual refund" in that you record the refund as a transaction directly after you perform the actual refund in your gateway account. You can perform a non-manual refund using the API, as shown in the following example: ```json { "refund": { "payment_id": "{payment_id}", "amount": "4.00", "memo": "Your memo here." } } ``` You will substitute values for `payment_id`, `amount` and `memo` in this example. The `payment_id` is the ID of the payment transaction that the credit will be applied to. For more information, see [API refunds](https://developers.maxio.com/legacy/http/api-endpoints/legacy-subscription-balance/create-refund). For a manual or external refund, you also supply a value for `external`: ```json { "refund": { "payment_id": "{payment_id}", "amount": "4.00", "memo": "Your memo here." }, "external": 1 } ``` For a manual or external refund, there is nothing passed through to your gateway - it is simply added to the subscription, modifying the balance and adding a transaction record. For more information, see [API Refunds (External)](https://developers.maxio.com/legacy/http/api-endpoints/legacy-subscription-balance/create-refund). ## Subscription Updates via Billing Portal Subscriptions can also be updated by the subscriber via the Billing Portal. The Billing Portal allows your subscribers to perform certain managerial actions on their current subscription. As a merchant, you have the ability to also restrict what actions can be performed by a subscriber. Here are a few examples of actions that can be performed via the Billing Portal: - Plan changes - Subscription cancellation - Credit card updates - Component purchase / allocation updates For more information on the Advanced Billing Portal, see the [Billing Portal](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-Portal-Overview) help articles. #### Entitlements Source: https://developers.maxio.com/http/getting-started/advanced-billing-concepts/entitlements Entitlements let you define features once — like Single Sign-On, a monthly API call limit, or a support tier — and grant them to subscribers through the products and components they already have. At runtime, Entitlements answers a simple question: **what is this subscription actually allowed to do, and how much of it?** --- There are three steps to using Entitlements: - Defining a [feature template](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/entitlements#feature-templates) - Attaching that feature template to a [product or component](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/entitlements#attaching-features-to-products-and-components) - Reading a subscriber's [aggregated entitlements](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/entitlements#reading-a-subscribers-entitlements) # Feature Templates A feature template is defined once, at the site level, and describes a feature you might want to grant to subscribers. Every feature template has a `kind`, which determines how its value behaves: - **`access_right`** — a boolean entitlement. A subscriber either has access or does not (for example, Single Sign-On). - **`usage_limit`** — a quantified allowance measured over a recurring period (for example, "10,000 API calls per month"). - **`service_right`** — a free-form value (text, boolean, or number) that isn't a simple access flag or a metered limit (for example, a support tier of `"gold"`). ```json // POST /features.json { "feature": { "key": "sso", "name": "Single Sign-On", "kind": "access_right" } } ``` That data is posted to the [Create Feature Template](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/create-feature-template) endpoint. `key` is immutable once set, and `kind` can't be changed once the feature template has been attached to any product or component. # Attaching Features to Products and Components A feature template isn't granted to anyone on its own — it has to be attached to a product or component (or to one of their price points) as a **feature catalog item**, with a concrete value: ```json // POST /products/{product_id}/features.json { "feature": { "feature_template_id": 1001, "value": "true" } } ``` That data is posted to the [Create Product Feature Catalog Item](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-features/create-product-feature) endpoint (or [Create Component Feature Catalog Item](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-features/create-component-feature) for a component). Once attached, subscribers on that product/component are provisioned an entitlement automatically the next time their subscription changes — for example, on signup, a plan change, or a component allocation. You can scope a feature catalog item to a single price point instead of the whole product/component by passing `price_point_type` and `price_point_id` — see [Create Product Feature Catalog Item](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-features/create-product-feature) for details. Removing a feature catalog item defaults to a soft removal: the feature is taken out of the catalog, but subscribers who already have it keep their existing entitlement (they're "grandfathered in"). Pass `destroy_entitlements=true` to instead revoke access immediately. Archiving a feature template with [Archive Feature Template](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/archive-feature-template) has the same default/override shape, using its own query parameter, `remove_from_catalog=true` — restoring an archived feature template never restores entitlements removed this way. # Reading a Subscriber's Entitlements To find out what a specific subscription is entitled to, call [Read Subscription Entitlements](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/entitlements/read-subscription-entitlements). It collapses every product and component on the subscription into one entry per feature key and periodicity window — so a `usage_limit` feature granted monthly by one product and daily by another comes back as two entries, each identified by its own `periodicity_key`: ```json // GET /subscriptions/{subscription_id}/entitlements.json { "subscription_id": 12345, "customer_id": 678, "status": "active", "entitlements": [ { "feature_key": "feature.sso", "periodicity_key": "feature.sso", "name": "SSO", "type": "access_right", "value": true, "enabled": true, "periodicity": null, "source_products": ["Gold Plan"] }, { "feature_key": "usage.api_calls", "periodicity_key": "usage.api_calls:1:month", "name": "API Calls", "type": "usage_limit", "value": 50000, "enabled": true, "periodicity": { "interval": 1, "unit": "month" }, "source_products": ["Gold Plan"] } ] } ``` `enabled` reflects both the aggregated value and the subscription's state — it's `false` whenever the subscription isn't in a live state (`active`, `trialing`, `assessing`, `past_due`, or `soft_failure`), regardless of the value. Note that entitlements stay enabled while a subscription is in dunning. This is the field most integrations should check before granting access in their own application. If you're already fetching products or components and want their features embedded directly in that response instead of making a separate call, pass `include_features=true` to [List Products](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/list-products), [Read Product](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/read-product), or [Read Component](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/read-component). List Components does not support it. ### About the API #### Tips and Best Practices Source: https://developers.maxio.com/http/getting-started/about-the-api/tips-and-best-practices > Maxio Advanced Billing provides an HTTP-based API that conforms to the principles of REST. > Advanced Billing also offers a broad feature set and official [client libraries](https://developers.maxio.com/http/development-tools/using-the-developer-portal#code-language-selection-and-sdk-access) for common languages. > The API returns JSON responses as the primary and recommended format, but XML is also provided as a backwards compatible option for merchants who require it. API access is included on all plans at no charge, so you always have direct access to your own data. You can use the API for a wide range of purposes. As you build your integration, keep request volume in mind. Because API traffic involves little or no user interaction, a program or routine can send far more requests than it needs. Runaway usage places unnecessary load on the platform, slows your own integration, and can trigger throttling or blocked requests. The following tips and best practices help you keep your integration efficient and reliable. # Client Libraries and SDKs Maxio maintains official Advanced Billing SDKs for Python, Ruby, PHP, C#/.NET, TypeScript, Java, and Go. Before writing your own client, check whether an SDK covers your stack. Select your language in the developer portal, and then click **Get SDK** to install it from your package manager. For more information, see [Code language selection and SDK access](https://developers.maxio.com/http/development-tools/using-the-developer-portal#code-language-selection-and-sdk-access). # Development If you have difficulty sending a request, try the simplest approach first and send the request with the curl command-line tool. Add the `--verbose` flag to receive additional debugging information. [Webhook.site](https://webhook.site/) is another useful tool. If you are unsure what your integration is sending, post the request to a temporary Webhook.site URL instead of to the API so you can inspect the payload. # Getting Subscription States Most integrations need to know whether a customer has an active subscription, has canceled, or is behind on payments. The best approach is to keep a locally cached copy of the subscription state in your own database, then use [webhooks](https://developers.maxio.com/http/getting-started/webhooks/webhooks) to stay up to date in near real time as changes occur. Caching keeps your site available, reduces coupling to the API, and keeps both applications fast. Avoid querying the API inline as part of a customer's request to your site. Inline queries can result in: - Slowing down your own site while the customer waits for a check to the API on every request. - Breaking your site during a network connectivity issue or in the unlikely event that the API is unavailable. - Consuming large numbers of API requests as your customer base grows and becomes more active, which can lead to blocked requests from automatic abuse prevention. There are three basic ways to track the state of a customer's subscription: - Retrieve [subscription state](https://developers.maxio.com/http/getting-started/about-the-api/tips-and-best-practices#subscription-state) through the API - Receive [webhooks](https://developers.maxio.com/http/getting-started/webhooks/webhooks#responding-to-a-webhook) - Download a manual [export](https://maxio.zendesk.com/hc/en-us/articles/24285931839757-Exporting-Data#locating-exports) One of the easiest methods is to have your application request the current state (or history) of a subscription through the API, which returns the state of the subscription at the time of the request. ## Subscription State To get the current state of a subscription, send the following request: ``` HTTP GET https://{subdomain}.chargify.com/subscriptions/{subscription_id}.{format} ``` The response contains the current information about the subscription, including (but not limited to): - Subscription details, such as subscription state, creation date, balance, next assessment date, and cancellation information - Customer details - Payment details For more information, see [Read Subscription](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/read-subscription). ## Best Practices Keep the following practices in mind as you synchronize your application with your Advanced Billing data: - Do not let your application depend on another service to control access directly. If an API call fails for any reason, your customer may not receive the best user experience, depending on how you have implemented the check. - Limit direct calls where possible. The API limits how quickly and how often it responds to rapid, numerous calls. For more information, see [Error Handling & Rate Limiting](https://developers.maxio.com/http/getting-started/about-the-api/error-handling-rate-limiting). # Synchronizing Your Database Normally, [webhooks](https://developers.maxio.com/http/getting-started/webhooks/webhooks) keep your local customer database in sync. If your database does fall out of sync with Advanced Billing, checking the state of all subscriptions through the API may be the only way to restore consistency. A full reconciliation is fine when you need it. Reserve the practice for exceptional circumstances or for periodic reconciliation, usually no more than once a month. Avoid pulling your entire subscriber base on every reconciliation run. The subscriptions list endpoint supports filtering, so you can request only what has changed since your last sync: - `date_field=updated_at` combined with `start_date` and `end_date` returns only subscriptions modified in that window. - `state` filters to specific subscription states (for example, `active`, `canceled`, or `past_due`), and accepts a comma-separated list of values. - `page` and `per_page` paginate the results. See [List Subscriptions](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/list-subscriptions) for the current per-page limit for your account. Filtering a routine reconciliation job this way, instead of pulling every subscription each time, can reduce a full-account sync to a fraction of the API calls and keeps you well clear of rate limits. The same date-field filtering is available when listing invoices. This filtering is not currently available on the customers list endpoint, so a customer-record reconciliation still requires pulling the full list. # Reporting Usage When reporting component usage, avoid sending many tiny usage amounts. For example, if you charge by the minute for phone calls: - **Don't** send a usage report for every minute or every phone call individually. - **Don't** send all usage for all customers at once. Spread the reports out, or wait a short period of time between each request. Instead: - **Do** send one usage report per day with how much each customer used for the whole day. For more information on reporting component usage or allocations, see the endpoint descriptions for the type of component used: - [Create Usage](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/create-usage) for metered components - [Allocate Component](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/allocate-component) for quantity-based components ## Handling Retries Safely Advanced Billing supports a `uniqueness_token` parameter on any POST or PUT request to protect against duplicate submissions, such as when a request times out and you cannot tell whether it was received. Supply a long, random value such as a UUID. If a second request with the same token arrives within 60 minutes, it is rejected with a `409 Conflict` and a duplicate submission error instead of being processed again. This applies to usage reports, component allocations, and subscription creation alike. Use a `uniqueness_token` any time your integration might retry a request after a timeout or an ambiguous failure, so that a retried usage report does not double-count a customer's usage for that period. For full details, including how to recover when the outcome of the original request is unknown, see [Duplicate Prevention](https://developers.maxio.com/http/getting-started/about-the-api/duplicate-prevention). # Downloading Bulk Data Periodically exporting transaction, subscription, or customer data is a common use case. Where possible, use the built-in [export](https://maxio.zendesk.com/hc/en-us/articles/24285931839757-Exporting-Data) functions inside Advanced Billing to generate reports and download the data. Exports are often much faster and significantly lower your API usage. For subscription, invoice, or proforma invoice data specifically, you can automate exports instead of using the UI. Use [Create Subscriptions Export](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/export-subscriptions) (or the Invoices and Proforma Invoices equivalents) to start an export job, and then poll its status and retrieve the result with the corresponding Read and List endpoints. This lets you schedule exports without manual steps. # Secure Applications API requests cannot be made directly from the customer's browser or device. A client-side request would expose your API key, and anyone who has that key has full access to all of your Advanced Billing data. Instead, tokenize sensitive information with [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview) or a similar JavaScript library provided by your gateway. Post the token and any other information to your own server, and then make the API call from there. ## CORS and Browser Requests If you attempt to make an API request directly from the customer's browser, you may see an error such as: ``` Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. ``` or ``` Origin 'https://example.com' is therefore not allowed access.` `The response had HTTP status code 404. ``` These errors mean you need to move the API call server-side, as described above. The API does not support Cross-Origin Resource Sharing (CORS) for requests made directly from a browser. This is by design, and CORS cannot be enabled for your site or domain. # Large Imports If you plan to import a large amount of data through the API, send a heads-up to [support@maxio.com](mailto:support@maxio.com) ahead of time. The Maxio team can then coordinate with you to make sure your import process goes smoothly. #### Data Types Source: https://developers.maxio.com/http/getting-started/about-the-api/data-types # Dates and Time Zones API responses from Advanced Billing are sent with the timezone of the current Advanced Billing site. Alternately, webhooks sent from Advanced Billing globally use EST (Eastern Standard Time) as the timezone for all content in the body of the payload. For requests, If only a date is provided: Advanced Billing uses noon in the site’s time zone If date and time are provided, Advanced Billing uses the time of day in the site’s time zone. If date/time/timezone is provided, Advanced Billing uses that absolute date and displays it in the site’s time zone. # Decimal Numbers In order to prevent losing precision, we serialize decimal numbers as strings instead of as JSON numbers. We recommend parsing these strings into their decimal equivalent using a decimal number library in your programming language (for example, `BigDecimal` in Ruby) instead of relying on floating point values or arithmetic. # Amount Fields and Currency Fields holding amount values are given as a string representing a decimal whole currency amount. For example, `"1.23"` in currency `"USD"` would equate to `$1.23`. Not all fields will be rounded to the smallest currency denomination. Intermediate results, such as those that derive from line-level tax calculations, may hold precision up to 8 decimal places. However, the top-level totals we provide (e.g., `total_amount`) will be rounded to the smallest currency denomination. It is up to API consumers to parse the string into a decimal number representation and do any rounding necessary for your application. #### Request and Response Data Source: https://developers.maxio.com/http/getting-started/about-the-api/request-and-response-data # URL The URL for API requests includes the subdomain of the Site you are working with: `https://.chargify.com/` # Response Data Response data is sent as either XML or JSON, depending on the type of data requested (`HTTP Content-Type` header) or the type specified as being accepted (HTTP `Accept` header). GETs for individual statements and invoices may also be requested as PDF using `application/pdf` or appending `.pdf` to the resource URI. Response codes are sent via the normal HTTP Response Code, and are documented separately for each resource. For boolean fields, note that a value of `null` may be considered as false. However, this is not true across all cases. Exercise good judgement here, or contact support with any questions. For example: - `null` can define that there's no data available for that attribute # Request Data POST and PUT request data may be formatted as either XML (`application/xml`) or JSON (`application/json`). For best results, you should set your HTTP `Content-Type` request header accordingly, although you may also specify your format by appending `.xml` or `.json` extensions on to the resource URI. Note: Advanced Billing does not accept PUT or POST data sent as query parameters or form-encoded data – data must be sent as either XML or JSON. If you fail to set your `Content-Type` to either `application/xml` or `application/json`, your request may fail due to triggering of forgery protection mechanisms. #### Error Handling & Rate Limiting Source: https://developers.maxio.com/http/getting-started/about-the-api/error-handling-rate-limiting # Rate Limits and Blocks There are two different types of limits/blocks you may encounter: rate-based and account-based. Be sure to familiarize yourself with both types of limits, as they are vastly different. Our rate limiting rules are primarily intended to prevent runaway scripts, infinite loops, or crushing amounts of concurrency. Working, good-hygiene code should not experience any blocks. The single most important guidelines are to write code that will properly handle 429 responses by slowing or pausing requests without crashing, and to not parallelize into simultaneous requests that will compete for resources and flood our systems. Advanced Billing uses a custom algorithmic slot-based limiting that isn't based on typical rate limits per second. Rather, we handle call limiting based on concurrency, and a maximum of 4 concurrent API calls can be made. This does not mean that only 4 requests are allowed per second; rather, 4 server threads or workers can be running concurrently per subdomain at a time. Any concurrency that goes above 4 is at risk for being queued for processing after the concurrency once again drops to acceptable ranges. As such, we recommend when building out your API processes to focus on the number of concurrent calls rather than the actual rate of calls per hour. To help illustrate this, we've provided a diagram below. Presume that each API call takes a full minute. While this will likely not be the case for your own processes, it does illustrate the limitations for calls. | ![Concurrency Graphic](static/images/about-the-api/concurrency_graphic.jpg) | | --------------------------------------------------------------------------------------- | | **Diagram of concurrency-based rate limiting presuming a limit of 2 threads at a time** | ## Rate-based Blocks When performing a large synchronization or retrieving a large amount of data, you may trigger a security failsafe used to prevent abuse and protect our site from attacks. We don’t want to block small bursts in usage; so instead of immediately rejecting your requests, Advanced Billing will slow and throttle requests. > ❗️ If you see your responses coming in slower, do not parallelize your requests or try to make more concurrent requests to speed things up. You’ll only have to wait longer for your requests to get through. If you have too many slowed requests, or your individual account queue gets too full with too many concurrent requests, you’ll likely receive an HTTP `429 Too Many Requests` response code with a message and a reference code: `Your request was denied due to a usage violation. You can track this request with support by referencing …` If you receive a `429 Too Many Requests` response, your code should be prepared to handle it by pausing its queries, waiting a few minutes, and then proceeding slower (or with less concurrency). Feel free to [open a support ticket](https://maxio.zendesk.com/hc/en-us/requests/new) so we can investigate what happened and why the request was blocked. ## Account-based Blocks There are a few scenarios that could cause a request to be blocked even with correct credentials. You can read about them [here](https://developers.maxio.com/http/getting-started/about-the-api/error-handling-rate-limiting#api-access-limitations). If you have a request blocked with a `422` status code and an error message, it may be due to this account-based blocking. ## Prioritization of Endpoints We consider certain endpoints as "critical", such as new customer signups and component allocations. We first and foremost want to ensure that we don't prevent a new signup except under the most extreme situations. Many merchants have a mix of all different types of calls. By dynamically balancing, we can slow down "low priority" requests (reports and exports), while still handling large unexpected surges in signups. ## Endpoint Variances Each endpoint is different within Advanced Billing. Expensive endpoints have lower limits than fast endpoints. But in general, your requests will slow down because of sending too many simultaneous requests to the same endpoint(s). When you do that, your requests will be "queued" behind yourself. One request must wait for the one in front of it to finish. In that way, we 'level out' spikes of requests over a longer period of time so that it doesn't cause a negative impact for other merchants. This is why you'd see requests be processed at a slower rate. ## Timeout Limitation Advanced Billing imposes a cut-off time of 120 seconds for all requests to all endpoints. It's important to note that when you make requests for specific actions, Advanced Billing is also sending these requests off to your associated gateway. If a request is not processed by the combination of Advanced Billing and your gateway within the 120 second guideline, the request will time out. Keep in mind that if you encounter a timeout issue, it is worth inspecting your gateway's [current status](https://maxio.zendesk.com/hc/en-us/articles/24286964853261-Gateway-Errors). This is also important to do if you feel there is a processing issue, outside of Advanced Billing's control, that is affecting your requests. # API Access Limitations There are a few scenarios that may end up causing an API request to be blocked even with correct credentials. > ❗️ All relevant API requests will be blocked if any of the below conditions are true. Those scenarios are as follows: - Your Advanced Billing subscription is canceled. - Your Advanced Billing trial has reached an end. - The site you're making a request for is in the process of ["clearing site data"](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) - _Note: any API request for another site that is in a good state will NOT be blocked_ - The site you're making a request for has been deleted. - _Note: any API request for another site that is in a good state will NOT be blocked_ Read more about your Advanced Billing subscription [here](https://maxio.zendesk.com/hc/en-us/articles/24183861526541-Advanced-Billing-Subscription) ### What happens when an API request is blocked The request will fail with a `422` http status code. The response will also include a message explaining the reason for the request being blocked. For example: - If your Advanced Billing subscription is canceled: ```json { "errors" => [ [0] "Your Advanced Billing account has been canceled. Please contact support@maxio.com to reactivate." ] } ``` - If your Advanced Billing trial has reached an end and you attempted to make an API request, the response body will look like: ```json { "errors" => [ [0] "Your trial has ended, please contact sales." ] } ``` - If the site you're making a request for is in the process of ["clearing site data"](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data): ```json { "errors" => [ [0] "Site data clearing is in progress. Please try later." ] } ``` - If the site you're making a request for has been deleted: ```json { "errors" => [ [0] "This site has been deleted." ] } ``` #### List Operations Source: https://developers.maxio.com/http/getting-started/about-the-api/list-operations # Pagination When an endpoint returns a list of items, it will be paginated. Usually, 20 items will be returned by default, and you may request up to a maximum of 200 at a time. Pagination is done with query string parameters, for example: `?page=5&per_page=200` #### Versioning Source: https://developers.maxio.com/http/getting-started/about-the-api/versioning # Backwards Compatibility We consider the following changes to be backwards compatible and may make them without advance notice: - Adding new API endpoints, or adding new attributes in the responses of existing endpoints - Adding new optional parameters to be sent to existing API endpoints - Adding new fields to exported data - Changing the type or length of any of the ID attributes - For example, most IDs are currently integers, but you should not assume that this will always be the case. In addition, you should not depend on the order of attributes within the API response as this may change. Advanced Billing does not provide notifications for additions that are clearly defined as backwards compatible. #### Duplicate Prevention Source: https://developers.maxio.com/http/getting-started/about-the-api/duplicate-prevention When making API requests, it is possible to receive an error even though your request actually completed successfully. For example, if you submit an API request and it times out, you can’t be sure whether your request was received by Advanced Billing, or not. If you simply retry the request, you _might_ end up with a duplicate transaction. # Uniqueness Token In order to prevent these duplicates, Advanced Billing allows you to supply a `uniqueness_token` parameter in any `POST` or `PUT` request. The value you supply for the `uniqueness_token` should be long and random, like a UUID. The exact format of the value is up to you. If a subsequent request with the same uniqueness_token is received within 60 minutes, it will be rejected with a `409 Conflict` response code and a duplicate error message. # Example For example, suppose you are making an adjustment on a subscription. Using curl, you send the following POST request, including a `uniqueness_token`. ```json curl --verbose -u $CHARGIFY_API_KEY:x -H Accept:application/json -H Content-Type:application/json -X POST \ -d @adjustment.json https://$CHARGIFY_SUBDOMAIN.chargify.com/subscriptions/$SUBSCRIPTION_ID/adjustments.json adjustment.json: {"adjustment": { "amount": "-12.43", "memo": "Credit for outage on 1/31" }, "uniqueness_token": "2731FB23-98AD-4489-BAF6-7D5CE916F766" } ``` After you send your request, there is some problem, and the request times out without a valid response instead of the `201 Created` you were hoping for. Since you have supplied a `uniqueness_token`, you can safely retry the request. If you receive the expected `201 Created` (or `422 Unprocessable Entity`) response, you can continue as usual knowing that Advanced Billing never received your first request. If you receive a `409 Conflict` and a duplicate error message for the retry, then you know that the first request was received and responded to. Example 409 Conflict response: ``` < Status: 409 Conflict {"errors":["DuplicatePrevention::DuplicateSubmissionError"]} ``` Unfortunately, it is not possible to know what the outcome of the first request was, so you cannot automatically assume it was successful. Depending on what type of request you were making, it might be possible to gracefully recover by recording some information about the original request, listening for webhooks, and matching up the webhook payload to find out whether the request succeeded or not. In other cases, human intervention will be necessary. # Summary We hope this feature will help you prevent duplicate transactions during error handling. That said, if you are experiencing repeated timeouts, [email Maxio support](mailto:support@maxio.com) so we can investigate. #### Expert Usage Source: https://developers.maxio.com/http/getting-started/about-the-api/expert-usage The following are some additional useful topics that you might need to handle or read up on, and are here as reference. These generally are topics which may be useful for expert usage of Advanced Billing. # Advanced Signup Examples The following are a few advanced/expert examples of new signups/subscriptions that you might encounter. These may be common, but it entirely depends on what features of Advanced Billing you use and how you integrate your use of Advanced Billing. See [Create Subscription](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/create-subscription) for details. 1. Import as new signup/subscription **Example** ```json // POST /subscriptions.json { "subscription": { "product_handle": "basic", "next_billing_at": "2010-08-29T12:00:00-04:00", "customer_attributes": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com", "reference": "123", "organization": "Acme Widgets" }, "payment_profile_attributes": { "vault_token": "12345", "customer_vault_token": "67890", "current_vault": "authorizenet", "expiration_year": "2020", "expiration_month": "12", "card_type": "visa", "last_four": "1111" } } } ``` 2. New Subscription with Coupon/Trial/Component Signups can implement coupons, custom trial periods and components right from the initial creation of the subscription, like in the following: **Example** ```json { "subscription": { "product_handle": "basic", "customer_attributes": { "first_name": "John", "last_name": "Smith", "email": "john@example.com" }, "credit_card_attributes": { "masked_card_number": "XXXX-XXXX-XXXX-1111", "expiration_month": "10", "expiration_year": "2020" }, "coupon_code": "SUB111", "next_billing_at": "2020-06-01", "components": [ { "component_id": 123456, "unit_balance": 20 } ] } } ``` 3. New Subscription with Existing Payment Profile # Metafields and Metadata Metafields allow you to create custom fields that store information in a customer or subscription resource in Advanced Billing. Metafields and metadata are called [Custom Fields](https://docs.maxio.com/hc/en-us/articles/24178993762317-Custom-Fields) in the application and product documentation. The following example creates a metafield, and then sets the metadata value for it. **Example** First, create a metafield. In this example, a color field is applied to the Customers resource: ```json // POST /customers/metafields.json { "metafields": { "name": "Color", "scope": { "csv": "1", "invoices": "1", "portal": "1" } } } ``` The options for `scope` set here would show this metafield on Public Signup Pages, show the metadata on invoices, and allow the metadata to be exported via CSV. Next, set the color for a particular customer: ```json // POST /customers/{customer_id}/metadata.json { "metadata": { "name": "Color", "value": "Blue" } } ``` The particular customer would have the metadata for the metafield "Color" set to "Blue". For more API information about metafields (the containers of your metadata), see [Create Metafields](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/create-metafields). # Communication Advanced Billing enables you to communicate with your subscribers through a variety of methods. For more information on these methods, read the given help article: - [Email templating](https://maxio.zendesk.com/hc/en-us/articles/24266086168461-Email-Templates) - The use of [Liquid Syntax](https://maxio.zendesk.com/hc/en-us/articles/24266086916877-Liquid-Examples) in your emails and communications - [HTML/text emails](https://maxio.zendesk.com/hc/en-us/articles/24266101040781-HTML-Emails) - [Mass emailing subscribers](https://maxio.zendesk.com/hc/en-us/articles/24266110860045-Bulk-Email-Mass-Emailing-Subscribers) - [Email archives](https://maxio.zendesk.com/hc/en-us/articles/24266109347853-Email-Archives) # Dunning Dunning is the process of how you communicate with your customers in regards to failed credit card transactions and expiring credit cards. Advanced Billing helps manage the dunning process, or what we like to call the “unhappy path.” Or what happens when a credit card transaction fails. If you’re using Authorize.net, PayPal, or Google Checkout, you have to manually address each credit card issue as it arises. This is both tedious and time consuming and is certainly not the most efficient way to handle problems when executing a large number of transactions. For more information about dunning - including how to setup your dunning plans, see the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) help article. # Referrals Referrals are a great way to reward your customers for sharing information about your application with new potential users. Advanced Billing generates a referral code for each of your subscriptions and rewards the new customer, as well as the referrer, when a new signup is created with the code. If referrals are enabled, then every subscription will have a `ref` (short for "referral code") as part of the available data in the subscription API response. **Example** ```json // GET /subscriptions/{subscription_id}.{format} { "subscription": { "id": "123456789", "state": "active", // ... "ref": "trdgzp" } } ``` To validate the code, you can do the following: HTTP GET: `https://{subdomain}.chargify.com/referral_codes/validate.{format}?code={ref/referral_code}` If the referral code is valid, the response will be `200 OK`. Otherwise, the response will be `404 NOT FOUND`. For more information about referrals, see the [Referrals](https://maxio.zendesk.com/hc/en-us/articles/24287008467725-Referrals-Overview) help article. # Notes You can also enter and manage notes on a subscription. Notes allow you to keep non-structured data associated with individual subscriptions. If you need structured data, consider using [Metafields/Metadata](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/create-metafields). To create a simple note on a subscription, see the following: ```json // POST /subscriptions/{subscription_id}/notes.{format} { "note": { "body": "This is the note that never ends, it just goes on and on ..", "sticky": true } } ``` Setting the value for `sticky` to `true` will show the note prominently when viewing the subscription. For more information about notes, see [Create Subscription Note](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-notes/create-subscription-note). ### Webhooks #### Webhooks Source: https://developers.maxio.com/http/getting-started/webhooks/webhooks Use webhooks to receive notifications or initiate workflows when important events occur, like a payment succeeding, a Subscription status updating, or other relevant changes. You can subscribe to events of interest, and the system will post data to the URL you specify when one of those events occurs. # Using Webhooks To begin using webhooks, you must first create a publicly accessible endpoint that meets the following requirements: 1. Only HTTP endpoints are allowed in test mode. You must switch to HTTPS before moving to live mode. 2. The endpoint must be hosted on port 80 or 443. These are the only supported ports. 3. The endpoint must accept HTTP POST requests with a form-encoded body. Once you have a public URL that Advanced Billing can access, you can begin receiving requests and responding with a `200 OK` status code. In general, the process for using webhooks is: 1. An event to which your webhook URL is subscribed occurs in Advanced Billing. For example, a new Customer signs up, creating a Subscription. 2. Advanced Billing sends a request to your webhook URL containing the event data. 3. Your system receives the event data. 4. You [verify the event](https://developers.maxio.com/http/getting-started/webhooks/webhooks#verifying-events) data using signature validation. 5. You take action based on the event data, such as sending a welcome email or provisioning services. 6. You respond with `200 OK`, completing the webhook transaction. Webhooks are sent as HTTP POST requests with a `Content-Type` of `application/x-www-form-urlencoded`, making them easy to parse in most programming languages. Webhooks contain the following keys: | Key | Description | | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | A unique numeric identifier for the webhook. Use this value to track which webhooks you've already processed. | | `event` | An identifier for the type of event that occurred. See the list of [events](https://developers.maxio.com/http/getting-started/webhooks/webhooks-reference#events)| | `payload` | A “hash” of pertinent data about the event. Keys and sub-keys in the hash are denoted using square bracket notation in the key.
For example, the product name would be included as the following form-encoded key-value pair in the content body of a `signup_success` webhook:

`payload[subscription][product][name]=Basic`
| # Timestamps Timestamps in webhook payloads use the site's configured timezone. Some newer event types (e.g., `component_allocation_change`, `metered_usage`) use ISO 8601 format in UTC for consistency across systems. # Limitations Advanced Billing imposes two limitations on webhooks: - **Data retention**: Controls how long webhook data is stored. - **Endpoint limits**: Restricts the number of webhook endpoints per site. For more information, see [Merchant Limits](https://docs.maxio.com/hc/en-us/articles/24183916903309-Merchant-Limits#merchant-limits-0-0). # Configuring Webhooks You can configure webhooks and test connectivity between your URL and Advanced Billing [in the UI](https://docs.maxio.com/hc/en-us/articles/24286723085197-Webhooks#webhooks-0-0) or through the [API](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/create-endpoint). You can enable or disable webhooks as needed. Each webhook includes: - A URL - A set of [events](https://developers.maxio.com/http/getting-started/webhooks/webhooks-reference#events) you subscribe to # Verifying Events Webhooks include a signature generated using HMAC-SHA-256 with your site’s shared key and the raw body of the POST request. Ruby example: ```ruby OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), site.shared_key, webhook.body) ``` To verify events, validate that the signature included with the request matches exactly what is expected given the content being delivered. You may either retrieve the signature value from the header `X-Chargify-Webhook-Signature-Hmac-Sha-256` or by specifying that the signature should be included in the query string by using the `{signature_hmac_sha_256} `replacement variable: ```http http://example.com/?signature={signature_hmac_sha_256} ``` > **Note**: > When in doubt, verify webhook data by checking the current resource state using the API. ## Finding Your Site Shared Key Your Site’s shared key is created automatically. You can view or update it by selecting **Edit Current Site** from the **Site** drop-down menu in the utility bar. Protect your site’s shared key as you would your password. A compromised shared key could allow malicious actors to generate falsified webhooks that pass signature verification. # Testing Webhooks For initial testing, there are a number of options that you can use. Before you have a publicly accessible endpoint available for troubleshooting, you could use a tool like [Webhook.site](https://webhook.site), which provides a temporary URL that Advanced Billing can send messages to, allowing you to view them within the Webhook.site application. The "bins" are temporary. This can provide insight into the content or headers Advanced Billing will be sending. You can use the [Webhooks Control Panel](https://docs.maxio.com/hc/en-us/articles/24266161680781-Monitor-and-Resend-Webhooks) in the UI to send test webhook data to any configured endpoint. This feature lets you verify the operational status of your endpoint, though the payload may not match production webhooks. Test webhooks include the following payload: `id=123456&event=test&payload[chargify]=testing` For comprehensive testing, use [a sandbox account](https://app.chargify.com/signup/maxio-billing-sandbox) to create test subscriptions and perform actions that trigger webhooks. The following steps represent a typical flow for testing the receipt of webhooks: 1. Setup publicly accessible webhook handler. 2. Enable webhooks at that endpoint, enable events you need to interact with (at the very least `subscription_state_change`, triggered when subscriptions move from active to cancelled). 3. Send a test event. 4. Check your signature verification code, check that you are responding `200 OK`. 5. Add the specific event processing code you need. # Responding to a Webhook Upon receipt of a webhook, accept it by returning an HTTP `200 OK` response as quickly as possible. Sending any other response (i.e. `500 Internal Server Error`, `404 Not Found`, etc.) OR failing to return a response within approximately 15 seconds results in automatic retries of the webhooks. Advanced Billing attempts to send each webhook event up to five times before giving up. The retries follow an approximate backoff schedule: | Attempt | Approximate Timing | | ------- | -------------------------------------------- | | 1 | As soon as possible after the original event | | 2 | \~10 seconds after the most recent failure | | 3 | \~15 seconds after the most recent failure | | 4 | \~90 seconds after the most recent failure | | 5 | \~180 seconds after the most recent failure | If you use the webhook replay feature via the [webhook API](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/replay-webhooks) or the webhook panel, avoid duplicate actions by following these suggestions: - Use the unique webhook ID to track which webhooks you’ve already processed. - Do not replay webhooks until the last_sent_at timestamp is well outside the automatic retry intervals. ## Inoperative Endpoints Temporary or abandoned webhook endpoints can strain the system. If repeated failures occur, Advanced Billing may pause or disable the endpoint. Below are examples of failure counts and their associated states: | Failure Count | State | System Behavior | | ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 1 to 25 | Enabled | Retries proceed automatically | | 26 to 50 | Paused | Webhooks are generated in a paused state and must be manually sent using the webhooks panel. The endpoint is checked every two hours for responsiveness and re-enabled if functional. | | 51 and over | Disabled | Webhooks are no longer generated for this endpoint. | > ❗️If you delete an endpoint from Advanced Billing, any paused webhooks referencing that endpoint cannot be resent and are effectively discarded. # Best Practices Keep in mind the following best practices when using webhooks: - Webhooks are **asynchronous**. Do not rely on them for time-sensitive actions. - Do not block users from signing up or provisioning based on webhook responses. Instead, verify Subscriptions through the API. #### Webhooks Reference Source: https://developers.maxio.com/http/getting-started/webhooks/webhooks-reference Webhook events are triggered by key actions and changes within Advanced Billing, providing notifications about billing, subscription, payment, and account activities. Each event includes a structured payload with relevant data, allowing you to automate workflows, synchronize systems, or log activity for auditing and analysis. If you’re using the [enhanced Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. Event name changes: - subscription_product_change → subscription_plan_change - component_allocation_change → allocation_change - component_billing_date_change → product_billing_date_change Message updates: - “Successful payment for allocation changes to Product on Subscription” - “Failed payment for allocation changes to Product on Subscription” - “Plan changed on Subscription from previous plan to new plan” # Payloads The resource objects sent as payloads typically contain the same information as the corresponding API resource. For example, Site payload objects include the site’s id and subdomain. However, not all values may be populated in the payload. Use discretion to determine whether the data is available and how to handle missing information. For example, the reason_code data is not delivered in a signup_success webhook. Webhooks retain their event and payload data. Refer to the [webhook API](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/list-webhooks) for detailed attribute documentation. ## Webhook metadata Webhook records include metadata about their acceptance or rejection by your application, as well as details about errors encountered during delivery attempts. Metadata attributes include: - **id**: Unique identifier for the webhook, consistent across retries/replays. - **successful**: Boolean indicating whether the webhook was accepted on its last attempt. - **created_at**: Timestamp for when the webhook was created. - **accepted_at**: Timestamp for when the webhook was successfully accepted Once a webhook is accepted, the accepted_at timestamp will be filled. This timestamp can be viewed via the Webhooks API or in the Webhooks panel, if available for your plan. - **last_sent_at**: Timestamp for the most recent delivery attempt. - **last_error_at**: Timestamp for the last failed delivery attempt. - **last_error**: Description of the error from the last failed attempt. # Events ## billing_date_change **Trigger:** Any change to the billing date that is initiated explicitly by altering the billing date through the application or the API. This will not be triggered by a normal renewal and period advancement, or a migration. **Payload Fields:** event_id, site, subscription (with previous_billing_date) The subscription object also contains information on the Customer and Product. > Note > Multiple webhook events may be triggered by a single system event. For example, the creation of a new Subscription will typically fire both a signup_success and payment_success event (if a payment was necessary to start the Subscription). ## Full payload example ```json {"site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "subscription"=> {"id"=>16372192, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Mon, 13 Feb 2025 11:50:57 EST -05:00, "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 13:39:20 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>Thu, 13 Apr 2025 14:28:00 EDT -04:00, "next_assessment_at"=>Thu, 13 Apr 2025 14:28:00 EDT -04:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 13:28:05 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>173961106, "signup_revenue"=>"60.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>22000, "product_price_in_cents"=>5000, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"cz8wdq", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "customer"=> {"id"=>15826583, "first_name"=>"Doris", "last_name"=>"Tester", "organization"=>"Acme", "email"=>"doris@example.com", "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "reference"=>"123456789", "address"=>"123 Anywhere Street", "address_2"=>"", "city"=>"Boston", "state"=>"MA", "zip"=>"02120", "country"=>"US", "phone"=>"555-555-1212", "portal_invite_last_sent_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "portal_invite_last_accepted_at"=>nil, "verified"=>nil, "portal_customer_created_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil}, "product"=> {"id"=>4442358, "name"=>"Gold Product", "handle"=>"gold-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "updated_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "price_in_cents"=>5000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>306012, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"}, {"id"=>310598, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"}, {"id"=>311132, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]}, "credit_card"=> {"id"=>10914352, "first_name"=>"Doris", "last_name"=>"Tester", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>2, "expiration_year"=>2018, "customer_id"=>15826583, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>"", "billing_city"=>"", "billing_state"=>"", "billing_zip"=>"", "billing_country"=>"", "customer_vault_token"=>nil, "billing_address_2"=>"", "payment_type"=>"credit_card"}, "previous_billing_date"=>Mon, 13 Mar 2025 14:28:05 EDT -04:00}, "event_id"=>377604301} ``` ## component_allocation_change **Trigger:** Any change to the Subscription quantity-based component allocation, enabled status of an on/off component, or a purchase of a prepaid component allocation that is made _after_ signup. This webhook does not fire if allocations are configured during the initial Subscription creation (signup). `previous_allocation` and `new_allocation` give the allocation values before and after the change. These will be either `0` or `1` for On/Off Components to represent `off` and `on`, respectively. `timestamp` provides the date and time the allocation was recorded and is listed in ISO8601 format in the UTC timezone. **Payload Fields:** event_id, site, component, subscription, product, previous_allocation, new_allocation, memo, timestamp ## Full payload example for On/Off Component Change ```json "component"=> {"id"=>375117, "kind"=>"on_off_component", "name"=>"Cancellation fee", "unit_name"=>"on/off"}, "subscription"=>{"id"=>16372192, "name"=>"Doris Tester"}, "product"=>{"id"=>4443536, "name"=>"Business Monthly"}, "memo"=>"Adding cancellation fee for Doris", "timestamp"=>"2025-02-13T18:46:49Z", "previous_allocation"=>0, "new_allocation"=>1, "payment"=>nil, "event_id"=>377608723} ``` ## Full payload example for Quantity-based Component Change ```json "component"=> {"id"=>375250, "kind"=>"quantity_based_component", "name"=>"Quantity Component", "unit_name"=>"Quantity Component"}, "subscription"=>{"id"=>16372192, "name"=>"Doris Tester"}, "product"=>{"id"=>4443536, "name"=>"Business Monthly"}, "memo"=>"Adding 90 components for Doris", "timestamp"=>"2025-02-13T18:49:58Z", "previous_allocation"=>10, "new_allocation"=>90, "payment"=> {"id"=>1078634, "success"=>true, "amount_in_cents"=>800, "memo"=>"Payment for: Full-price component allocation changes."}, "event_id"=>377609562} ``` ## Full payload example for Prepaid Component Change ```json "component"=> {"id"=>957864, "kind"=>"prepaid_usage_component", "name"=>"Minutes", "unit_name"=>"minutes", "handle"=>nil}, "subscription"=> {"id"=>32304660, "name"=>"Mario Smith", "organization"=>"", "state"=>"active", "product"=> {"id"=>4607690, "product_price_point_id"=>322106, "product_price_point_handle"=>"uuid:8e1f3840-c44a-0136-fd09-02d0e580fd36", "name"=>"v-1", "interval"=>1, "interval_unit"=>"month"}}, "product"=> {"id"=>4607690, "name"=>"Silver Plan", "interval"=>1, "interval_unit"=>"month"}, "allocation"=> {"id"=>571895482, "proration_upgrade_scheme"=>"full-price-attempt-capture", "proration_downgrade_scheme"=>"no-prorate"}, "previous_allocation"=>0, "new_allocation"=>10, "memo"=>"", "timestamp"=>"2025-04-28T18:34:28Z", "price_point_id"=>821647, "payment"=> {"id"=>381732923, "success"=>true, "amount_in_cents"=>2000, "memo"=>"Payment for: Full-price component allocation changes."}, "allocated_quantity"=>10, "expires_at"=>nil, "renews"=>true, "total_used"=>0, "total_overage"=>0, "event_id"=>1064815277} ``` ## chjs_tokenization_failure **Trigger:** Maxio.js (formerly Chargify.js) failed to tokenize a payment profile at the payment gateway (for example, a declined test card or a gateway error). The event is recorded when tokenization is attempted through `POST /js/tokens` and the gateway returns an error. Failures that occur before tokenization (such as reCAPTCHA, fraud blocking, or an invalid security token) do not trigger this event. **Payload Fields:** event_id, site, errors, payment_profile_params ## Full payload example ```json { "site": { "id": 1, "subdomain": "acme" }, "errors": "Card was declined", "payment_profile_params": { "first_name": "John", "last_name": "Doe", "card_type": "visa" }, "event_id": 12346 } ``` ## chjs_tokenization_success **Trigger:** Maxio.js successfully tokenized a payment profile at the payment gateway. The event is recorded when tokenization completes through `POST /js/tokens` during public signup pages, self-service flows, or other Maxio.js integrations. **Payload Fields:** event_id, site, payment_profile, gateway_customer_id ## Full payload example ```json { "site": { "id": 1, "subdomain": "acme" }, "payment_profile": { "id": 987, "vault_token": "1", "gateway_handle": "default", "customer_vault_token": "cus_example" }, "gateway_customer_id": 456, "event_id": 12345 } ``` ## custom_field_value_change **Trigger:** A change to any custom field value, whether adding a custom field at signup, or updating a custom field on an existing Subscription or Customer record. **Payload Fields:** See full payload example. ## Full payload example ```json {"site"=>{"id"=>60050, "subdomain"=>"chargify-sandbox-141"}, "metafield"=> {"event_type"=>"created", "metafield_name"=>"Device ID", "metafield_id"=>31483, "old_value"=>nil, "new_value"=>"dev_7hbd)jh27gyJ", "resource_type"=>"Subscription", "resource_id"=>63081463}, "event_id"=>2946240555} ``` ## customer_create **Trigger:** A new customer is created. **Payload Fields:** event_id, site, customer ## Full payload example ```json {"address"=>"123 Main St", "address_2"=>"Apt 123", "city"=>"Pleasantville", "country"=>"US", "created_at"=>"2025-09-09 11:38:32 -0400", "email"=>"john@example.com", "first_name"=>"John", "id"=>"0", "last_name"=>"Doe", "organization"=>"Acme, Inc.", "phone"=>"555-555-1234", "reference"=>"johndoe", "state"=>"NC", "updated_at"=>"2025-09-09 11:38:32 -0400", "zip"=>"12345", "parent_id"=>nil}, "site"=>{"id"=>2, "subdomain"=>"acme"}, "event_id"=>855147013} ``` ## customer_delete **Trigger:** When a customer is deleted. _Note_: This webhook is **not** triggered by the deletion of a Subscription and Customer simultaneously; it is only triggered by explicitly deleting the customer as a single action. **Payload Fields:** See full payload example. ## Full payload example ```json {"customer"=> {"id"=>59200671, "first_name"=>"Harrison", "last_name"=>"Ankunding", "organization"=>"Jacobs and Sons", "email"=>"Mellie.Lindgren80@example.org", "created_at"=>Fri, 07 Oct 2025 12:53:42 PDT -07:00, "updated_at"=>Fri, 07 Oct 2025 12:53:58 PDT -07:00, "reference"=>nil, "address"=>"303 Mozell Summit", "address_2"=>"Suite 602", "city"=>"East Emie", "state"=>"CO", "zip"=>"25924", "country"=>"US", "phone"=>"484-328-6314", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>Fri, 07 Oct 2025 12:53:58 PDT -07:00, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "site"=>{"id"=>60050, "subdomain"=>"chargify-sandbox-141"}, "event_id"=>2946257113} ``` ## customer_update **Trigger:** Any change to the following Customer fields: first_name, last_name, organization, email, reference, address, address 2, city, state, zip, country, phone, vat_number, parent_id, cc_email. **Payload Fields:** event_id, site, customer ## Full payload example ```json {"id"=>15826583, "first_name"=>"Doris", "last_name"=>"Tester", "organization"=>"Acme", "email"=>"doristester@example.com", "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 13:42:07 EST -05:00, "reference"=>"123456789", "address"=>"123 Anywhere Street", "address_2"=>"", "city"=>"Boston", "state"=>"MA", "zip"=>"02120", "country"=>"US", "phone"=>"555-555-1212", "portal_invite_last_sent_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "portal_invite_last_accepted_at"=>Mon, 13 Feb 2025 12:50:55 EST -05:00, "verified"=>false, "portal_customer_created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "vat_number"=>737291901, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>7 }, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "event_id"=>377607274} ``` ## delayed_subscription_creation_failure **Trigger:** A failure to create a delayed Subscription. **Payload Fields:** event_id, site, subscription ## Full payload example ```json {"subscription"=> {"id"=>63126445, "state"=>"pending", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>nil, "created_at"=>Fri, 10 Mar 2025 09:19:03 PST -08:00, "updated_at"=>Fri, 10 Mar 2025 09:19:03 PST -08:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>nil, "next_assessment_at"=>nil, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>nil, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Fri, 10 Mar 2025 09:19:03 PST -08:00, "previous_state"=>"pending", "signup_payment_id"=>0, "signup_revenue"=>"0.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>0, "product_price_in_cents"=>10000, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"4t9cnw", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>64300587, "receives_invoice_emails"=>nil, "product_price_point_id"=>898846, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>0, "net_terms"=>nil, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"USD", "on_hold_at"=>nil, "scheduled_cancellation_at"=>nil, "prepaid_dunning"=>false, "product_price_point_type"=>"default", "dunning_communication_delay_enabled"=>false, "dunning_communication_delay_time_zone"=>nil, "customer"=> {"id"=>64300587, "first_name"=>"Summer", "last_name"=>"Bayer", "organization"=>"Fay - Rowe", "email"=>"Carolyn.Gutmann@example.net", "created_at"=>Fri, 10 Mar 2025 09:18:29 PST -08:00, "updated_at"=>Fri, 10 Mar 2025 09:18:29 PST -08:00, "reference"=>nil, "address"=>"407 Bogisich Roads", "address_2"=>"Suite 406", "city"=>"New Daniella", "state"=>"IA", "state_name"=>"Iowa", "zip"=>"17933", "country"=>"US", "country_name"=>"United States", "phone"=>"964-327-5176", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>5209515, "name"=>"Bronze Plan", "handle"=>"bronze_plan", "description"=>"my description", "accounting_code"=>nil, "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>nil, "created_at"=>Fri, 13 Mar 2025 14:32:26 PDT -07:00, "updated_at"=>Fri, 13 Mar 2025 14:32:26 PDT -07:00, "price_in_cents"=>10000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>nil, "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>nil, "taxable"=>false, "update_return_url"=>nil, "tax_code"=>nil, "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>nil, "default_product_price_point_id"=>898846, "request_billing_address"=>false, "require_billing_address"=>false, "require_shipping_address"=>false, "use_site_exchange_rate"=>true, "item_category"=>nil, "product_price_point_id"=>898846, "product_price_point_name"=>"Original", "product_price_point_handle"=>"uuid:0edd1580-47a0-0138-6907-060451d6a6ae", "product_family"=> {"id"=>1513518, "name"=>"import test", "description"=>"", "handle"=>"import-test", "accounting_code"=>nil, "created_at"=>Wed, 11 Mar 2025 09:45:14 PDT -07:00, "updated_at"=>Wed, 11 Mar 2025 09:45:14 PDT -07:00}, "public_signup_pages"=>[]}, "credit_card"=> {"id"=>50327544, "first_name"=>"Gus", "last_name"=>"Terry", "masked_card_number"=>"XXXX-XXXX-XXXX-3", "card_type"=>"bogus", "expiration_month"=>3, "expiration_year"=>2024, "customer_id"=>64300587, "current_vault"=>nil, "vault_token"=>nil, "billing_address"=>"172 Abernathy Mountain", "billing_city"=>"North Lornachester", "billing_state"=>"CA", "billing_zip"=>"63011-5354", "billing_country"=>"US", "customer_vault_token"=>nil, "billing_address_2"=>"Suite 227", "payment_type"=>"credit_card", "disabled"=>false, "site_gateway_setting_id"=>nil, "gateway_handle"=>nil}, "prepaid_configuration"=>nil, "group"=>nil, "initial_billing_at"=>Sat, 01 Apr 2025 05:00:00 PDT -07:00}, "site"=>{"id"=>60050, "subdomain"=>"chargify-sandbox-141"}, "event_id"=>2950983304} ``` ## delayed_subscription_creation_success **Trigger:** Successful creation of a delayed Subscription in an awaiting signup state. **Payload Fields:** event_id, site, subscription ## Full payload example ```json {"subscription"=> {"id"=>63126383, "state"=>"awaiting_signup", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>nil, "created_at"=>Fri, 10 Mar 2025 09:16:28 PST -08:00, "updated_at"=>Fri, 10 Mar 2025 09:16:28 PST -08:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>Sat, 01 Apr 2025 05:00:00 PDT -07:00, "next_assessment_at"=>Sat, 01 Apr 2025 05:00:00 PDT -07:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>nil, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Fri, 10 Mar 2025 09:16:28 PST -08:00, "previous_state"=>"awaiting_signup", "signup_payment_id"=>0, "signup_revenue"=>"0.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>0, "product_price_in_cents"=>10000, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"w376jg", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>64300481, "receives_invoice_emails"=>nil, "product_price_point_id"=>898846, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>0, "net_terms"=>nil, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"USD", "on_hold_at"=>nil, "scheduled_cancellation_at"=>nil, "prepaid_dunning"=>false, "product_price_point_type"=>"default", "dunning_communication_delay_enabled"=>false, "dunning_communication_delay_time_zone"=>nil, "customer"=> {"id"=>64300481, "first_name"=>"Leonie", "last_name"=>"Hickle", "organization"=>"McCullough, Bogisich and Bayer", "email"=>"Cortney.Gulgowski59@example.com", "created_at"=>Fri, 10 Mar 2025 09:15:24 PST -08:00, "updated_at"=>Fri, 10 Mar 2025 09:15:24 PST -08:00, "reference"=>nil, "address"=>"064 Gislason Hollow", "address_2"=>"Suite 099", "city"=>"Lindberg", "state"=>"NC", "state_name"=>"North Carolina", "zip"=>"39203-7738", "country"=>"US", "country_name"=>"United States", "phone"=>"308-857-8585", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>5209515, "name"=>"Bronze Plan", "handle"=>"bronze_plan", "description"=>"my description", "accounting_code"=>nil, "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>nil, "created_at"=>Fri, 13 Mar 2025 14:32:26 PDT -07:00, "updated_at"=>Fri, 13 Mar 2025 14:32:26 PDT -07:00, "price_in_cents"=>10000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>nil, "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>nil, "taxable"=>false, "update_return_url"=>nil, "tax_code"=>nil, "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>nil, "default_product_price_point_id"=>898846, "request_billing_address"=>false, "require_billing_address"=>false, "require_shipping_address"=>false, "use_site_exchange_rate"=>true, "item_category"=>nil, "product_price_point_id"=>898846, "product_price_point_name"=>"Original", "product_price_point_handle"=>"uuid:0edd1580-47a0-0138-6907-060451d6a6ae", "product_family"=> {"id"=>1513518, "name"=>"import test", "description"=>"", "handle"=>"import-test", "accounting_code"=>nil, "created_at"=>Wed, 11 Mar 2025 09:45:14 PDT -07:00, "updated_at"=>Wed, 11 Mar 2025 09:45:14 PDT -07:00}, "public_signup_pages"=>[]}, "credit_card"=> {"id"=>50327479, "first_name"=>"Romaine", "last_name"=>"Grimes", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>3, "expiration_year"=>2024, "customer_id"=>64300481, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>"8193 Abner Greens", "billing_city"=>"Westland", "billing_state"=>"NM", "billing_zip"=>"48592", "billing_country"=>"US", "customer_vault_token"=>nil, "billing_address_2"=>"Suite 544", "payment_type"=>"credit_card", "disabled"=>false, "site_gateway_setting_id"=>nil, "gateway_handle"=>nil}, "prepaid_configuration"=>nil, "group"=>nil, "initial_billing_at"=>Sat, 01 Apr 2025 05:00:00 PDT -07:00, "referred_by"=>nil}, "site"=>{"id"=>60050, "subdomain"=>"chargify-sandbox-141"}, "event_id"=>2950981186} ``` ## direct_debit_payment_paid_out **Trigger:** When Direct Debit Payment was successfully processed in the gateway (currently, only Stripe and GoCardless are supported). **Payload Fields:** event_id, site, subscription, transaction ## Full payload example ```json "subscription"=> {"id"=>102485, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Thu, 25 Feb 2021 03:33:01 EST -05:00, "created_at"=>Thu, 25 Feb 2021 03:32:54 EST -05:00, "updated_at"=>Thu, 25 Feb 2021 03:33:10 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>Thu, 25 Mar 2021 04:32:54 EDT -04:00, "next_assessment_at"=>Thu, 25 Mar 2021 04:32:54 EDT -04:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>nil, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Thu, 25 Feb 2021 03:32:54 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>34793, "signup_revenue"=>"30,00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>3000, "product_price_in_cents"=>3000, "product_version_number"=>1, "payment_type"=>"bank_account", "referral_code"=>nil, "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>nil, "receives_invoice_emails"=>nil, "product_price_point_id"=>466, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>0, "net_terms"=>nil, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"EUR", "on_hold_at"=>nil, "scheduled_cancellation_at"=>nil, "customer"=> {"id"=>4260, "first_name"=>"Test", "last_name"=>"Test", "organization"=>"", "email"=>"test@example.com", "created_at"=>Thu, 25 Feb 2021 03:32:53 EST -05:00, "updated_at"=>Thu, 25 Feb 2021 03:32:53 EST -05:00, "reference"=>nil, "address"=>nil, "address_2"=>nil, "city"=>nil, "state"=>nil, "state_name"=>nil, "zip"=>nil, "country"=>nil, "country_name"=>nil, "phone"=>"", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>372, "name"=>"test", "handle"=>"test", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Wed, 09 Dec 2020 05:06:07 EST -05:00, "updated_at"=>Thu, 21 Jan 2021 09:28:12 EST -05:00, "price_in_cents"=>3000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"", "tax_code"=>"", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"", "default_product_price_point_id"=>466, "request_billing_address"=>false, "require_billing_address"=>false, "require_shipping_address"=>false, "product_price_point_id"=>466, "product_price_point_name"=>"Original", "product_price_point_handle"=>"uuid:14078c50-1c34-0139-f2b7-08e9fe639598", "product_family"=> {"id"=>131, "name"=>"Billing Plans", "description"=>nil, "handle"=>"test-billing-plans", "accounting_code"=>nil, "created_at"=>Wed, 09 Dec 2020 04:37:03 EST -05:00, "updated_at"=>Wed, 09 Dec 2020 04:37:03 EST -05:00}, "public_signup_pages"=> [{"id"=>199, "return_url"=>"", "return_params"=>"", "url"=> "https://test-71.chargifypay.test/subscribe/3gx9xh5z8gj2/test"}]}, "bank_account"=> {"id"=>5847, "first_name"=>"Test", "last_name"=>"Test", "customer_id"=>4260, "current_vault"=>"stripe_connect", "vault_token"=>"cus_J0gewnaw35SKLd", "billing_address"=>nil, "billing_city"=>nil, "billing_state"=>nil, "billing_zip"=>nil, "billing_country"=>nil, "customer_vault_token"=>nil, "billing_address_2"=>nil, "bank_name"=>nil, "masked_bank_routing_number"=>nil, "masked_bank_account_number"=>"XXXX3000", "bank_account_type"=>"checking", "bank_account_holder_type"=>"personal", "payment_type"=>"bank_account", "verified"=>true, "site_gateway_setting_id"=>402}, "group"=>nil}, "transaction"=> {"id"=>34793, "subscription_id"=>102485, "type"=>"Payment", "kind"=>nil, "transaction_type"=>"payment", "success"=>true, "amount_in_cents"=>3000, "memo"=>"Test Test - test: Signup payment", "created_at"=>Thu, 25 Feb 2021 03:33:00 EST -05:00, "starting_balance_in_cents"=>3000, "ending_balance_in_cents"=>0, "gateway_used"=>"stripe_connect", "gateway_transaction_id"=>"pi_1IOfHLKajOcZzbwkfsXCKj1P", "gateway_order_id"=>nil, "payment_id"=>nil, "product_id"=>372, "tax_id"=>nil, "component_id"=>nil, "statement_id"=>24750, "customer_id"=>4260, "item_name"=>nil, "period_range_start"=>nil, "period_range_end"=>nil, "currency"=>"EUR", "exchange_rate"=>1, "component_handle"=>nil, "component_price_point_id"=>nil, "component_price_point_handle"=>nil, "parent_id"=>nil, "role"=>nil, "card_number"=>nil, "card_expiration"=>nil, "card_type"=>nil, "refunded_amount_in_cents"=>0, "invoice_id"=>nil}, "event_id"=>51601} ``` ## direct_debit_payment_pending **Trigger:** When Direct Debit Payment was created in the gateway and is pending processing (currently, only Stripe and GoCardless are supported). **Payload Fields:** event_id, site, subscription, transaction ## Full payload example ```json "subscription"=> {"id"=>102485, "state"=>"pending", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>nil, "created_at"=>Thu, 25 Feb 2021 03:32:54 EST -05:00, "updated_at"=>Thu, 25 Feb 2021 03:33:00 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>nil, "next_assessment_at"=>nil, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>nil, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Thu, 25 Feb 2021 03:32:54 EST -05:00, "previous_state"=>"pending", "signup_payment_id"=>34793, "signup_revenue"=>"30,00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>3000, "product_price_in_cents"=>3000, "product_version_number"=>1, "payment_type"=>"bank_account", "referral_code"=>nil, "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>nil, "receives_invoice_emails"=>nil, "product_price_point_id"=>466, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>0, "net_terms"=>nil, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"EUR", "on_hold_at"=>nil, "scheduled_cancellation_at"=>nil, "customer"=> {"id"=>4260, "first_name"=>"Test", "last_name"=>"Test", "organization"=>"", "email"=>"test@example.com", "created_at"=>Thu, 25 Feb 2021 03:32:53 EST -05:00, "updated_at"=>Thu, 25 Feb 2021 03:32:53 EST -05:00, "reference"=>nil, "address"=>nil, "address_2"=>nil, "city"=>nil, "state"=>nil, "state_name"=>nil, "zip"=>nil, "country"=>nil, "country_name"=>nil, "phone"=>"", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>372, "name"=>"test", "handle"=>"test", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Wed, 09 Dec 2020 05:06:07 EST -05:00, "updated_at"=>Thu, 21 Jan 2021 09:28:12 EST -05:00, "price_in_cents"=>3000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"", "tax_code"=>"", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"", "default_product_price_point_id"=>466, "request_billing_address"=>false, "require_billing_address"=>false, "require_shipping_address"=>false, "product_price_point_id"=>466, "product_price_point_name"=>"Original", "product_price_point_handle"=>"uuid:14078c50-1c34-0139-f2b7-08e9fe639598", "product_family"=> {"id"=>131, "name"=>"Billing Plans", "description"=>nil, "handle"=>"test-billing-plans", "accounting_code"=>nil, "created_at"=>Wed, 09 Dec 2020 04:37:03 EST -05:00, "updated_at"=>Wed, 09 Dec 2020 04:37:03 EST -05:00}, "public_signup_pages"=> [{"id"=>199, "return_url"=>"", "return_params"=>"", "url"=> "https://test-71.chargifypay.test/subscribe/3gx9xh5z8gj2/test"}]}, "bank_account"=> {"id"=>5847, "first_name"=>"Test", "last_name"=>"Test", "customer_id"=>4260, "current_vault"=>"stripe_connect", "vault_token"=>"cus_J0gewnaw35SKLd", "billing_address"=>nil, "billing_city"=>nil, "billing_state"=>nil, "billing_zip"=>nil, "billing_country"=>nil, "customer_vault_token"=>nil, "billing_address_2"=>nil, "bank_name"=>nil, "masked_bank_routing_number"=>nil, "masked_bank_account_number"=>"XXXX3000", "bank_account_type"=>"checking", "bank_account_holder_type"=>"personal", "payment_type"=>"bank_account", "verified"=>true, "site_gateway_setting_id"=>402}, "group"=>nil}, "transaction"=> {"id"=>34793, "subscription_id"=>102485, "type"=>"Payment", "kind"=>nil, "transaction_type"=>"payment", "success"=>true, "amount_in_cents"=>3000, "memo"=>"Test Test - test: Signup payment", "created_at"=>Thu, 25 Feb 2021 03:33:00 EST -05:00, "starting_balance_in_cents"=>3000, "ending_balance_in_cents"=>0, "gateway_used"=>"stripe_connect", "gateway_transaction_id"=>"pi_1IOfHLKajOcZzbwkfsXCKj1P", "gateway_order_id"=>nil, "payment_id"=>nil, "product_id"=>372, "tax_id"=>nil, "component_id"=>nil, "statement_id"=>24750, "customer_id"=>4260, "item_name"=>nil, "period_range_start"=>nil, "period_range_end"=>nil, "currency"=>"EUR", "exchange_rate"=>1, "component_handle"=>nil, "component_price_point_id"=>nil, "component_price_point_handle"=>nil, "parent_id"=>nil, "role"=>nil, "card_number"=>nil, "card_expiration"=>nil, "card_type"=>nil, "refunded_amount_in_cents"=>0, "invoice_id"=>nil}, "event_id"=>51595} ``` ## direct_debit_payment_rejected **Trigger:** When Direct Debit Payment was rejected in the gateway—for example, due to insufficient funds (currently, only Stripe and GoCardless are supported). **Payload Fields:** event_id, site, subscription, transaction ## Full payload example ```json "subscription"=> {"id"=>102493, "state"=>"past_due", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Thu, 25 Feb 2021 05:27:47 EST -05:00, "created_at"=>Thu, 25 Feb 2021 05:27:38 EST -05:00, "updated_at"=>Thu, 25 Feb 2021 05:28:06 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>3000, "current_period_ends_at"=>Thu, 25 Mar 2021 06:27:38 EDT -04:00, "next_assessment_at"=>Fri, 26 Feb 2021 05:28:06 EST -05:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>nil, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Thu, 25 Feb 2021 05:27:38 EST -05:00, "previous_state"=>"past_due", "signup_payment_id"=>34807, "signup_revenue"=>"30,00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>0, "product_price_in_cents"=>3000, "product_version_number"=>1, "payment_type"=>"bank_account", "referral_code"=>nil, "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>nil, "receives_invoice_emails"=>nil, "product_price_point_id"=>466, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>0, "net_terms"=>nil, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"EUR", "on_hold_at"=>nil, "scheduled_cancellation_at"=>nil, "customer"=> {"id"=>4268, "first_name"=>"Test", "last_name"=>"Test", "organization"=>"", "email"=>"test@example.com", "created_at"=>Thu, 25 Feb 2021 05:27:38 EST -05:00, "updated_at"=>Thu, 25 Feb 2021 05:27:38 EST -05:00, "reference"=>nil, "address"=>nil, "address_2"=>nil, "city"=>nil, "state"=>nil, "state_name"=>nil, "zip"=>nil, "country"=>nil, "country_name"=>nil, "phone"=>"", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>372, "name"=>"test", "handle"=>"test", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Wed, 09 Dec 2020 05:06:07 EST -05:00, "updated_at"=>Thu, 21 Jan 2021 09:28:12 EST -05:00, "price_in_cents"=>3000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"", "tax_code"=>"", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"", "default_product_price_point_id"=>466, "request_billing_address"=>false, "require_billing_address"=>false, "require_shipping_address"=>false, "product_price_point_id"=>466, "product_price_point_name"=>"Original", "product_price_point_handle"=>"uuid:14078c50-1c34-0139-f2b7-08e9fe639598", "product_family"=> {"id"=>131, "name"=>"Billing Plans", "description"=>nil, "handle"=>"test-billing-plans", "accounting_code"=>nil, "created_at"=>Wed, 09 Dec 2020 04:37:03 EST -05:00, "updated_at"=>Wed, 09 Dec 2020 04:37:03 EST -05:00}, "public_signup_pages"=> [{"id"=>199, "return_url"=>"", "return_params"=>"", "url"=> "https://test-71.chargifypay.test/subscribe/3gx9xh5z8gj2/test"}]}, "bank_account"=> {"id"=>5855, "first_name"=>"Test", "last_name"=>"Test", "customer_id"=>4268, "current_vault"=>"stripe_connect", "vault_token"=>"cus_J0iV6HHEeYiAX4", "billing_address"=>nil, "billing_city"=>nil, "billing_state"=>nil, "billing_zip"=>nil, "billing_country"=>nil, "customer_vault_token"=>nil, "billing_address_2"=>nil, "bank_name"=>nil, "masked_bank_routing_number"=>nil, "masked_bank_account_number"=>"XXXX3001", "bank_account_type"=>"checking", "bank_account_holder_type"=>"personal", "payment_type"=>"bank_account", "verified"=>true, "site_gateway_setting_id"=>402}, "group"=>nil}, "transaction"=> {"id"=>34807, "subscription_id"=>102493, "type"=>"Payment", "kind"=>nil, "transaction_type"=>"payment", "success"=>false, "amount_in_cents"=>3000, "memo"=>"Test Test - test: Signup payment", "created_at"=>Thu, 25 Feb 2021 05:27:45 EST -05:00, "starting_balance_in_cents"=>3000, "ending_balance_in_cents"=>0, "gateway_used"=>"stripe_connect", "gateway_transaction_id"=>"pi_1IOh4NKajOcZzbwkC2xrThzC", "gateway_order_id"=>nil, "payment_id"=>nil, "product_id"=>372, "tax_id"=>nil, "component_id"=>nil, "statement_id"=>24757, "customer_id"=>4268, "item_name"=>nil, "period_range_start"=>nil, "period_range_end"=>nil, "currency"=>"EUR", "exchange_rate"=>1, "component_handle"=>nil, "component_price_point_id"=>nil, "component_price_point_handle"=>nil, "parent_id"=>nil, "role"=>nil, "card_number"=>nil, "card_expiration"=>nil, "card_type"=>nil, "refunded_amount_in_cents"=>0, "invoice_id"=>nil}, "event_id"=>51655} ``` ## dunning_step_reached **Trigger:** When a subscription reaches any step of the dunning process. **Payload Fields:** event_id, site, subscription, product, dunner, current_step, next_step ## Full payload example ```json "subscription" => { "id" => 37, "state" => "past_due", "trial_started_at" => Wed, 25 Jan 2025 15:48:56 EST -05:00, "trial_ended_at" => Wed, 25 Jan 2025 15:49:35 EST -05:00, "activated_at" => nil, "created_at" => Wed, 25 Jan 2025 15:48:56 EST -05:00, "updated_at" => Wed, 25 Jan 2025 15:49:40 EST -05:00, "expires_at" => nil, "balance_in_cents" => 2400, "current_period_ends_at" => Sat, 25 Feb 2025 15:49:35 EST -05:00, "next_assessment_at" => Wed, 25 Jan 2025 15:49:35 EST -05:00, "canceled_at" => nil, "cancellation_message" => nil, "next_product_id" => nil, "cancel_at_end_of_period" => false, "payment_collection_method" => "automatic", "snap_day" => nil, "cancellation_method" => nil, "current_period_started_at" => Wed, 25 Jan 2025 15:49:35 EST -05:00, "previous_state" => "past_due", "signup_payment_id" => 101, "signup_revenue" => "0.00", "delayed_cancel_at" => nil, "coupon_code" => nil, "total_revenue_in_cents" => 0, "product_price_in_cents" => 2400, "product_version_number" => 1, "payment_type" => nil, "referral_code" => nil, "coupon_use_count" => nil, "coupon_uses_allowed" => nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "customer" => { "id" => 37, "first_name" => "Ella", "last_name" => "Gertrude", "organization" => "", "email" => "ella@example.com", "created_at" => Wed, 25 Jan 2025 15:48:56 EST -05:00, "updated_at" => Wed, 25 Jan 2025 15:48:56 EST -05:00, "reference" => nil, "address" => "", "address_2" => "", "city" => "", "state" => "", "zip" => "", "country" => "", "phone" => "", "portal_invite_last_sent_at" => nil, "portal_invite_last_accepted_at" => nil, "verified" => false, "portal_customer_created_at" => nil, "vat_number"=>"123456789" "cc_emails" => nil, "tax_exempt" => false, "parent_id" => nil}, "product" => { "id" => 24, "name" => "Basic", "handle" => "basic", "description" => "Magni porro sint iste illum. Qui aut reiciendis voluptatum. Est et aut.", "accounting_code" => nil, "request_credit_card" => true, "expiration_interval" => nil, "expiration_interval_unit" => nil, "created_at" => Mon, 23 Jan 2025 15:33:40 EST -05:00, "updated_at" => Mon, 23 Jan 2025 15:33:40 EST -05:00, "price_in_cents" => 2400, "interval" => 1, "interval_unit" => "month", "initial_charge_in_cents" => nil, "trial_price_in_cents" => 0, "trial_interval" => 1, "trial_interval_unit" => "month", "archived_at" => nil, "require_credit_card" => true, "return_params" => nil, "taxable" => false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial" => false, "version_number" => 1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family" => { "id" => 4, "name" => "Acme Online", "description" => nil, "handle" => "acme-online", "accounting_code" => nil}, "public_signup_pages" => [ { "id" => 5, "return_url" => nil, "return_params" => nil, "url" => "http://acme-test.chargify.dev/subscribe/y884dzrgd9r9/basic"}]}}, "dunner" => { "subscription_id" => 37, "state" => "active", "attempts" => 1, "last_attempted_at" => Wed, 25 Jan 2025 15:49:42 EST -05:00, "created_at" => Wed, 25 Jan 2025 15:49:42 EST -05:00, "revenue_at_risk_in_cents" => nil}, "current_step" => { "day_threshold" => 1, "action" => "retry", "email_body" => "Hello ,\n\nWe just tried to process your current amount due of \nfor , but there is no credit card on file for this subscription. \n\nPlease use the following link to quickly and easily update your billing information:\n\n\nWe will attempt to retry the card on file prior to cancellation. If we are unable to successfully charge the outstanding balance of , your account will be canceled in 27 days.\n\nThank you for choosing us!\n\nSincerely,\n\n\n", "email_subject" => "NOTICE: ", "send_email" => true, "send_bcc_email" => false, "send_sms" => false, "sms_body" => nil}, "next_step" => { "day_threshold" => 28, "action" => "cancel", "email_body" => "Hello ,\n\n\nWe've made several attempts to bill you for your account but you have not yet provided us with a valid credit card profile.\n\nAs a result, your account has been canceled.\n\nIf you did not intend to cancel your account, please contact us to reactivate your account and avoid further interruption of your service.\n\nThank you for choosing us!\n\nSincerely,\n\n\n", "email_subject" => "NOTICE: Account Canceled", "send_email" => true, "send_bcc_email" => false, "send_sms" => false, "sms_body" => nil}, "event_id" => 165} ``` ## expiration_date_change **Trigger:** Any change to an existing `expiration_date` for a subscription. **Payload Fields:** event_id, site, subscription ## Full payload example ```json "subscription"=> {"id"=>16945349, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Fri, 03 Mar 2025 13:00:08 EST -05:00, "created_at"=>Fri, 03 Mar 2025 13:00:02 EST -05:00, "updated_at"=>Fri, 03 Mar 2025 13:03:55 EST -05:00, "expires_at"=>Sun, 15 Oct 2025 00:00:00 EDT -04:00, "balance_in_cents"=>0, "current_period_ends_at"=>Sun, 05 Mar 2025 13:00:02 EST -05:00, "next_assessment_at"=>Sat, 04 Mar 2025 13:00:02 EST -05:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Fri, 03 Mar 2025 13:00:02 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>176501894, "signup_revenue"=>"1.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>100, "product_price_in_cents"=>100, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"968js9", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "reason_code"=>nil, "customer"=> {"id"=>16428076, "first_name"=>"Expiring ", "last_name"=>"Subscription", "organization"=>"", "email"=>"expiring@example.com", "created_at"=>Fri, 03 Mar 2025 13:00:02 EST -05:00, "updated_at"=>Fri, 03 Mar 2025 13:00:02 EST -05:00, "reference"=>nil, "address"=>"", "address_2"=>"", "city"=>"", "state"=>"", "zip"=>"", "country"=>"", "phone"=>"", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>nil, "portal_customer_created_at"=>nil, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil}, "product"=> {"id"=>4464208, "name"=>"Product that expires", "handle"=>"product-that-expires", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>1, "expiration_interval_unit"=>"day", "created_at"=>Fri, 03 Mar 2025 12:02:38 EST -05:00, "updated_at"=>Fri, 03 Mar 2025 12:02:38 EST -05:00, "price_in_cents"=>100, "interval"=>2, "interval_unit"=>"day", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>314126, "return_url"=>nil, "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/zs8352q9qtyz/product-that-expires"}]}, "credit_card"=> {"id"=>11380641, "first_name"=>"Expiring ", "last_name"=>"Subscription", "masked_card_number"=>"XXXX-XXXX-XXXX-1", "card_type"=>"bogus", "expiration_month"=>1, "expiration_year"=>2027, "customer_id"=>16428076, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>"", "billing_city"=>"", "billing_state"=>"", "billing_zip"=>"", "billing_country"=>"", "customer_vault_token"=>nil, "billing_address_2"=>"", "payment_type"=>"credit_card"}, "previous_expires_at"=>Wed, 15 Jul 2015 00:00:00 EDT -04:00}, "event_id"=>384446169} ``` ## expiring_card **Trigger:** A periodic event sent by Advanced Billing on the 1st, 15th, and 7 days before the end of the month. These webhooks identify cards expiring in the current month. **Payload Fields:** event_id, site, subscription The subscription object also contains information on the Customer and Product. The expiring_card webhook is sent on the 1st, 15th and 7 days before the end of the month. This will identify all cards expiring in the current month. ## Full payload example ```json {"id"=>16474328, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Mon, 20 Feb 2025 18:28:48 EST -05:00, "created_at"=>Mon, 20 Feb 2025 18:28:47 EST -05:00, "updated_at"=>Mon, 20 Feb 2025 18:32:14 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>Mon, 20 Mar 2025 19:28:47 EDT -04:00, "next_assessment_at"=>Mon, 20 Mar 2025 19:28:47 EDT -04:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Mon, 20 Feb 2025 18:28:47 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>174876340, "signup_revenue"=>"0.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>0, "product_price_in_cents"=>0, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"ww6mq5", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "customer"=> {"id"=>15102905, "first_name"=>"Amelia", "last_name"=>"Example", "organization"=>"", "email"=>"amelia@example.com", "created_at"=>Thu, 15 Dec 2024 09:33:15 EST -05:00, "updated_at"=>Thu, 15 Dec 2024 09:34:09 EST -05:00, "reference"=>nil, "address"=>"", "address_2"=>"", "city"=>"", "state"=>"", "zip"=>"", "country"=>"", "phone"=>"", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>nil, "portal_customer_created_at"=>Thu, 15 Dec 2024 09:33:21 EST -05:00, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false}, "product"=> {"id"=>4461042, "name"=>"Gold Product", "handle"=>"gold-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Mon, 20 Feb 2025 18:28:18 EST -05:00, "updated_at"=>Mon, 20 Feb 2025 18:28:18 EST -05:00, "price_in_cents"=>0, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>312984, "return_url"=>nil, "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/yt4ybcgk7998/zero-dollar-product"}]}, "credit_card"=> {"id"=>10548239, "first_name"=>"Amelia", "last_name"=>"Example", "masked_card_number"=>"XXXX-XXXX-XXXX-2", "card_type"=>"bogus", "expiration_month"=>2, "expiration_year"=>2025, "customer_id"=>15102905, "current_vault"=>"bogus", "vault_token"=>"2", "billing_address"=>"", "billing_city"=>"", "billing_state"=>"", "billing_zip"=>"", "billing_country"=>"", "customer_vault_token"=>nil, "billing_address_2"=>"", "payment_type"=>"credit_card"}}, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "event_id"=>380080310} ``` ## invoice_issued **Trigger:** Invoices issued towards a subscription on Relationship Invoicing site. **Payload Fields:** event_id, site, subscription, invoice The subscription object also contains information on the Customer and Product. ## Full payload example ```json "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "subscription"=> {"id"=>28224225, "current_period_ends_at"=>Wed, 31 Jul 2025 15:25:54 CDT -05:00}, "invoice"=> {"uid"=>"inv_4ffwqn13mppt7" "role"=>"renewal", "due_date"=>"2025-07-31", "issue_date"=>"2025-07-31", "paid_date"=>"", "due_amount"=>"$3,000.00", "paid_amount"=>"$0.00", "refund_amount"=>"$0.00", "tax_amount"=>"$0.00", "total_amount"=>"$3,000.00", "status_amount"=>"$3,000.00", "product_name"=>"2000", "line_items"=> {"0"=> {"uid"=>"li_8tjw5rjzyt287", "title"=>"2000", "description"=>"31 Jul 2025 - 31 Aug 2025", "quantity"=>1, "unit_price"=>"$3,000.00", "period_range_start"=>"2025-07-31", "period_range_end"=>"2025-08-31", "amount"=>"$3,000.00", "line_references"=>"", "pricing_details_index"=>nil, "pricing_details"=>{}, "tax_code"=>nil, "tax_amount"=>"0.0"}}}, "event_id"=>854499834} ``` ## invoice_pending **Trigger:** Any time an invoice transitions into the `pending` state. **Payload Fields:** event_id, site, invoice, customer, subscription (if applicable), previous_state, new_state, timestamp This event follows the standard webhook behavior for event subscriptions, signed payload delivery, retries, and replay. ## Full payload example with subscription ```json "site"=>{"id"=>31111, "subdomain"=>"general-goods"}, "invoice"=> {"id"=>76439765, "uid"=>"inv_4fffff13mppt5", "status"=>"pending"}, "customer"=> {"id"=>15822222, "reference"=>"cust-000123"}, "subscription"=> {"id"=>22224225}, "previous_state"=>"draft", "new_state"=>"pending", "timestamp"=>"2025-07-31T20:45:00Z", "event_id"=>854500001} ``` ## Full payload example without subscription ```json "site"=>{"id"=>31111, "subdomain"=>"general-goods"}, "invoice"=> {"id"=>76222, "uid"=>"inv_4fffff16mppt6", "status"=>"pending"}, "customer"=> {"id"=>15822222, "reference"=>"cust-000123"}, "subscription"=>nil, "previous_state"=>"open", "new_state"=>"pending", "timestamp"=>"2025-07-31T21:10:00Z", "event_id"=>854500000} ``` ## metered_usage **Trigger:** Any reported usage for a Subscription’s metered components. This webhook will not fire when the unit balance is reset to `0` at renewal. `timestamp` is in ISO8601 format in UTC. **Payload Fields:** event_id, site, component, subscription, product, previous_unit_balance, new_unit_balance, usage_quantity, memo, timestamp ## Full payload example ```json "component"=> {"id"=>375042, "kind"=>"metered_component", "name"=>"Test Metered", "unit_name"=>"Test Metered"}, "subscription"=>{"id"=>16372192, "name"=>"Doris Tester"}, "product"=>{"id"=>4443536, "name"=>"Business Monthly"}, "memo"=>"Recording Metered Component Usage", "timestamp"=>"2025-02-13T18:50:23Z", "previous_unit_balance"=>#, "new_unit_balance"=>1000, "usage_quantity"=>1000, "event_id"=>377609676} ``` ## payment_failure **Trigger:** Any failed payment attempt.payment_success or payment_failure are triggered for every payment attempted, whether it is for a normal renewal, a One-time Charge, a retry after failure, or a payment applied to an Invoice. Note that in some cases the payment may fail later, most commonly with ACH/eCheck and Direct Debit. **Payload Fields:** event_id, site, subscription, transaction ## Full payload example ```json "subscription"=> {"id"=>16090357, "state"=>"past_due", "trial_started_at"=>Mon, 23 Jan 2025 09:59:26 EST -05:00, "trial_ended_at"=>Mon, 23 Jan 2025 09:59:49 EST -05:00, "activated_at"=>nil, "created_at"=>Mon, 23 Jan 2025 09:59:26 EST -05:00, "updated_at"=>Mon, 30 Jan 2025 12:07:40 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>1000, "current_period_ends_at"=>Thu, 23 Feb 2025 09:59:49 EST -05:00, "next_assessment_at"=>Tue, 31 Jan 2025 12:07:40 EST -05:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Mon, 23 Jan 2025 09:59:49 EST -05:00, "previous_state"=>"past_due", "signup_payment_id"=>171203419, "signup_revenue"=>"0.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>0, "product_price_in_cents"=>1000, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"4nvrr2", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "currency"=>"USD", "customer"=> {"id"=>15547334, "first_name"=>"No obligation", "last_name"=>"Bad Card", "organization"=>"", "email"=>"nobbad@example.com", "created_at"=>Mon, 23 Jan 2025 09:59:26 EST -05:00, "updated_at"=>Mon, 23 Jan 2025 09:59:28 EST -05:00, "reference"=>nil, "address"=>"", "address_2"=>"", "city"=>"", "state"=>"", "zip"=>"", "country"=>"", "phone"=>"", "portal_invite_last_sent_at"=>Mon, 23 Jan 2025 09:59:28 EST -05:00, "portal_invite_last_accepted_at"=>nil, "verified"=>nil, "portal_customer_created_at"=>Mon, 23 Jan 2025 09:59:28 EST -05:00, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil}, "product"=> {"id"=>4453830, "name"=>"Trial No obligation", "handle"=>"trial-no-obligation", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Mon, 23 Jan 2025 09:53:23 EST -05:00, "updated_at"=>Thu, 26 Jan 2025 13:35:29 EST -05:00, "price_in_cents"=>1000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>0, "trial_interval"=>1, "trial_interval_unit"=>"day", "archived_at"=>nil, "require_credit_card"=>false, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>310559, "return_url"=>nil, "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/ngbsvxv4hq7q/trial-no-obligation"}]}, "credit_card"=> {"id"=>10734525, "first_name"=>"Chester", "last_name"=>"Tester", "masked_card_number"=>"XXXX-XXXX-XXXX-2", "card_type"=>"bogus", "expiration_month"=>1, "expiration_year"=>2027, "customer_id"=>15547334, "current_vault"=>"bogus", "vault_token"=>"2", "billing_address"=>"", "billing_city"=>"", "billing_state"=>"", "billing_zip"=>"", "billing_country"=>"", "customer_vault_token"=>nil, "billing_address_2"=>"", "payment_type"=>"credit_card"}}, "transaction"=> {"id"=>172084191, "subscription_id"=>16090357, "type"=>"Payment", "kind"=>nil, "transaction_type"=>"payment", "success"=>false, "amount_in_cents"=>1000, "memo"=>"Bogus Gateway: Forced failure", "created_at"=>Mon, 30 Jan 2025 12:07:39 EST -05:00, "starting_balance_in_cents"=>1000, "ending_balance_in_cents"=>1000, "gateway_used"=>"bogus", "gateway_transaction_id"=>nil, "gateway_order_id"=>nil, "payment_id"=>nil, "product_id"=>4453830, "tax_id"=>nil, "component_id"=>nil, "statement_id"=>84491989, "customer_id"=>15547334, "card_number"=>"XXXX-XXXX-XXXX-2", "card_expiration"=>"01/2027", "card_type"=>"bogus", "refunded_amount_in_cents"=>0, "invoice_uids"=>["inv_9hchn3xc84mgm"], "invoice_id"=>nil, "currency"=>"USD"}, "event_id"=>372846073} ``` ## payment_success **Trigger:** Any payment attempt that does not result in an immediate failure.payment_success or payment_failure are triggered for every payment attempted, whether it is for a normal renewal, a One-time Charge, a retry after failure, or a payment applied to an Invoice. Note that in some cases the payment may fail later, most commonly with ACH/eCheck and Direct Debit. **Payload Fields:** event_id, site, subscription, transaction ## Full payload example ```json "subscription"=> {"id"=>16327080, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Thu, 09 Feb 2025 11:42:28 EST -05:00, "created_at"=>Thu, 09 Feb 2025 11:42:26 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 12:03:41 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>Wed, 08 Mar 2025 12:00:00 EST -05:00, "next_assessment_at"=>Wed, 08 Mar 2025 12:00:00 EST -05:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>"8", "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 12:00:00 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>0, "signup_revenue"=>"0.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>5667, "product_price_in_cents"=>6900, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"6zcsxw", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "payer_id"=>15780191, "currency"=>"USD", "customer"=> {"id"=>15780191, "first_name"=>"Test " "last_name"=>"Test", "organization"=>"", "email"=>"test@example.com", "created_at"=>Thu, 09 Feb 2025 11:42:26 EST -05:00, "updated_at"=>Thu, 09 Feb 2025 11:42:29 EST -05:00, "reference"=>nil, "address"=>nil, "address_2"=>nil, "city"=>nil, "state"=>nil, "zip"=>nil, "country"=>nil, "phone"=>"", "portal_invite_last_sent_at"=>Thu, 09 Feb 2025 11:42:29 EST -05:00, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>Thu, 09 Feb 2025 11:42:29 EST -05:00, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil}, "product"=> {"id"=>4458204, "name"=>"Monthly product ", "handle"=>"monthly-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Wed, 08 Feb 2025 16:48:54 EST -05:00, "updated_at"=>Wed, 08 Feb 2025 16:48:54 EST -05:00, "price_in_cents"=>6900, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>312067, "return_url"=>nil, "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/5x8sbq29vgkn/monthly-product"}, {"id"=>312068, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/vsmzkwvmfqqx/monthly-product"}]}, "credit_card"=> {"id"=>10881632, "first_name"=>"Test", "last_name"=>"Page", "masked_card_number"=>"XXXX-XXXX-XXXX-1", "card_type"=>"bogus", "expiration_month"=>1, "expiration_year"=>2027, "customer_id"=>15780191, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>nil, "billing_city"=>nil, "billing_state"=>nil, "billing_zip"=>"", "billing_country"=>nil, "customer_vault_token"=>nil, "billing_address_2"=>nil, "payment_type"=>"credit_card"}}, "transaction"=> {"id"=>173963435, "subscription_id"=>16327080, "type"=>"Payment", "kind"=>nil, "transaction_type"=>"payment", "success"=>true, "amount_in_cents"=>5667, "memo"=>"Test Monthly - Monthly product : Renewal payment", "created_at"=>Mon, 13 Feb 2025 12:03:40 EST -05:00, "starting_balance_in_cents"=>5667, "ending_balance_in_cents"=>0, "gateway_used"=>"bogus", "gateway_transaction_id"=>"53433", "gateway_order_id"=>nil, "payment_id"=>nil, "product_id"=>4458204, "tax_id"=>nil, "component_id"=>nil, "statement_id"=>85701746, "customer_id"=>15780191, "card_number"=>"XXXX-XXXX-XXXX-1", "card_expiration"=>"01/2027", "card_type"=>"bogus", "refunded_amount_in_cents"=>0, "invoice_uids"=>["inv_9hchn3xc84mgm"], "invoice_id"=>nil, "currency"=>"USD"}, "event_id"=>377575306} ``` Note that if you are using Authorize.Net for your payment gateway, you will receive extra payload information in the form of gateway_response and approval_code: ```json { "site": { ... }, "subscription": { ... }, "transaction": { ... }, "gateway_response": { "approval_code": "AB1CDO" }, "event_id": 1 } ``` ## pending_cancellation_change **Trigger:** When a subscription is canceled with delay (cancel at end of period) or when pending cancellation is cleared. **Payload Fields:** event_id, site, subscription, cancellation_state, cancels_at The subscription object also contains information on the Customer and Product. ## Full payload example ```json "subscription"=> {"id"=>13, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Sat, 01 Feb 2020 10:38:50 EST -05:00, "created_at"=>Sat, 01 Feb 2020 10:38:49 EST -05:00, "updated_at"=>Fri, 10 Apr 2020 04:22:55 EDT -04:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>Thu, 07 May 2020 04:33:39 EDT -04:00, "next_assessment_at"=>Thu, 07 May 2020 04:33:39 EDT -04:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Tue, 07 Apr 2020 04:33:39 EDT -04:00, "previous_state"=>"canceled", "signup_payment_id"=>0, "signup_revenue"=>"0.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>31918, "product_price_in_cents"=>29900, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>nil, "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>8, "receives_invoice_emails"=>nil, "product_price_point_id"=>114, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>0, "net_terms"=>2, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"USD", "customer"=> {"id"=>8, "first_name"=>"Marty", "last_name"=>"McFly", "organization"=>nil, "email"=>"timetraveller1985@example.com", "created_at"=>Sat, 01 Feb 2020 10:40:43 EST -05:00, "updated_at"=>Fri, 03 Apr 2020 05:58:47 EDT -04:00, "reference"=>nil, "address"=>"100 Shipping St.", "address_2"=>"Apt 200", "city"=>"Pleasantville", "state"=>"NC", "zip"=>"12345", "country"=>"US", "phone"=>nil, "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>nil, "cc_emails"=>"john@example.com, sue@example.com", "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>114, "name"=>"Professional Plan", "handle"=>"server-professional", "description"=> "Voluptatem et quod delectus ut. Reiciendis repudiandae nemo et doloribus. Maxime velit ut.", "accounting_code"=>nil, "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>nil, "created_at"=>Sat, 01 Feb 2020 10:40:43 EST -05:00, "updated_at"=>Sat, 01 Feb 2020 10:40:43 EST -05:00, "price_in_cents"=>29900, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>nil, "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>nil, "taxable"=>true, "update_return_url"=>nil, "tax_code"=>nil, "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>nil, "default_product_price_point_id"=>114, "product_price_point_id"=>114, "product_price_point_name"=>"Default", "product_price_point_handle"=>"uuid:213b0f81-2737-0138-4a11-2cde48001122", "product_family"=> {"id"=>29, "name"=>"Cloud Compute Servers", "description"=>nil, "handle"=>"cloud-compute-servers", "accounting_code"=>nil}, "public_signup_pages"=>[]}, "credit_card"=> {"id"=>8, "first_name"=>"Marty", "last_name"=>"McFly", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>12, "expiration_year"=>2022, "customer_id"=>8, "current_vault"=>"", "vault_token"=>"1", "billing_address"=>"200 Billing Rd.", "billing_city"=>"Needham", "billing_state"=>"MA", "billing_zip"=>"02494", "billing_country"=>"US", "customer_vault_token"=>nil, "billing_address_2"=>"Suite 100", "payment_type"=>"credit_card", "disabled"=>false}}, "cancellation_state"=>"cleared", "cancels_at"=>nil, "event_id"=>315} ``` ## pending_payment_created **Trigger:** When a Pending Payment was created in the gateway and is pending processing. **Payload Fields:** event_id, site, subscription, transaction ## Full payload example ```json "subscription"=> {"id"=>784, "state"=>"pending", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>nil, "created_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "updated_at"=>Wed, 18 Aug 2021 05:58:43 EDT -04:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>nil, "next_assessment_at"=>nil, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>nil, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "previous_state"=>"pending", "signup_payment_id"=>3556, "signup_revenue"=>"500.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>50000, "product_price_in_cents"=>50000, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>nil, "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>nil, "receives_invoice_emails"=>nil, "product_price_point_id"=>168, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>0, "net_terms"=>nil, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"USD", "on_hold_at"=>nil, "scheduled_cancellation_at"=>nil, "customer"=> {"id"=>708, "first_name"=>"John", "last_name"=>"Doe", "organization"=>"", "email"=>"test@example.com", "created_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "updated_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "reference"=>nil, "address"=>"Street", "address_2"=>"", "city"=>"San Francisco", "state"=>"CA", "state_name"=>"California", "zip"=>"66785", "country"=>"US", "country_name"=>"United States", "phone"=>"123456789", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>154, "name"=>"golder", "handle"=>"golderrr", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Mon, 05 Jul 2021 08:32:52 EDT -04:00, "updated_at"=>Tue, 20 Jul 2021 08:08:49 EDT -04:00, "price_in_cents"=>50000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>true, "update_return_url"=>"", "tax_code"=>"4512.100", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"", "default_product_price_point_id"=>168, "request_billing_address"=>true, "require_billing_address"=>true, "require_shipping_address"=>true, "product_price_point_id"=>168, "product_price_point_name"=>"Original", "product_price_point_handle"=>"uuid:0a6d2640-bfbb-0139-c94b-2cde48001122", "product_family"=> {"id"=>65, "name"=>"Billing Plans", "description"=>nil, "handle"=>"chargify-billing-plans", "accounting_code"=>nil, "created_at"=>Mon, 21 Jun 2021 08:22:16 EDT -04:00, "updated_at"=>Mon, 21 Jun 2021 08:22:16 EDT -04:00}, "public_signup_pages"=> [{"id"=>101, "return_url"=>nil, "return_params"=>"", "url"=> "https://some-subdomain.chargifypay.test/subscribe/nmxwp8gsjh3t/golderrr"}]}, "credit_card"=> {"id"=>885, "first_name"=>"John", "last_name"=>"Doe", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>1, "expiration_year"=>2029, "customer_id"=>708, "current_vault"=>"digital_river", "vault_token"=>"b0aeda54-7576-4457-a36b-e775d2730df8", "billing_address"=>"Street", "billing_city"=>"San Francisco", "billing_state"=>"CA", "billing_zip"=>"66785", "billing_country"=>"US", "customer_vault_token"=>"541159940336", "billing_address_2"=>"", "payment_type"=>"credit_card", "disabled"=>false, "site_gateway_setting_id"=>71}, "group"=>nil}, "transaction"=> {"id"=>3556, "subscription_id"=>784, "type"=>"Payment", "kind"=>nil, "transaction_type"=>"payment", "success"=>true, "amount_in_cents"=>50000, "memo"=>"John Doe - golder: Signup payment", "created_at"=>Wed, 18 Aug 2021 05:58:43 EDT -04:00, "starting_balance_in_cents"=>50000, "ending_balance_in_cents"=>0, "gateway_used"=>"digital_river", "gateway_transaction_id"=>"3daa894a-77e5-4bd9-88b9-8e6dd1e84185", "gateway_order_id"=>nil, "payment_id"=>nil, "product_id"=>154, "tax_id"=>nil, "component_id"=>nil, "statement_id"=>1553, "customer_id"=>708, "item_name"=>nil, "period_range_start"=>nil, "period_range_end"=>nil, "currency"=>"USD", "exchange_rate"=>1, "component_handle"=>nil, "component_price_point_id"=>nil, "component_price_point_handle"=>nil, "parent_id"=>nil, "role"=>nil, "card_number"=>"XXXX-XXXX-XXXX-1111", "card_expiration"=>"01/2029", "card_type"=>"visa", "refunded_amount_in_cents"=>0, "invoice_id"=>nil}, "event_id"=>5432} ``` ## pending_payment_completed **Trigger:** When a Pending Payment was successfully processed in the gateway. **Payload Fields:** event_id, site, subscription, transaction ## Full payload example ```json "subscription"=> {"id"=>784, "state"=>"pending", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>nil, "created_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "updated_at"=>Wed, 18 Aug 2021 05:58:43 EDT -04:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>nil, "next_assessment_at"=>nil, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>nil, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "previous_state"=>"pending", "signup_payment_id"=>3556, "signup_revenue"=>"500.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>50000, "product_price_in_cents"=>50000, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>nil, "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>nil, "receives_invoice_emails"=>nil, "product_price_point_id"=>168, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>0, "net_terms"=>nil, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"USD", "on_hold_at"=>nil, "scheduled_cancellation_at"=>nil, "customer"=> {"id"=>708, "first_name"=>"John", "last_name"=>"Doe", "organization"=>"", "email"=>"test@example.com", "created_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "updated_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "reference"=>nil, "address"=>"Street", "address_2"=>"", "city"=>"San Francisco", "state"=>"CA", "state_name"=>"California", "zip"=>"66785", "country"=>"US", "country_name"=>"United States", "phone"=>"123456789", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>154, "name"=>"golder", "handle"=>"golderrr", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Mon, 05 Jul 2021 08:32:52 EDT -04:00, "updated_at"=>Tue, 20 Jul 2021 08:08:49 EDT -04:00, "price_in_cents"=>50000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>true, "update_return_url"=>"", "tax_code"=>"4512.100", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"", "default_product_price_point_id"=>168, "request_billing_address"=>true, "require_billing_address"=>true, "require_shipping_address"=>true, "product_price_point_id"=>168, "product_price_point_name"=>"Original", "product_price_point_handle"=>"uuid:0a6d2640-bfbb-0139-c94b-2cde48001122", "product_family"=> {"id"=>65, "name"=>"Billing Plans", "description"=>nil, "handle"=>"chargify-billing-plans", "accounting_code"=>nil, "created_at"=>Mon, 21 Jun 2021 08:22:16 EDT -04:00, "updated_at"=>Mon, 21 Jun 2021 08:22:16 EDT -04:00}, "public_signup_pages"=> [{"id"=>101, "return_url"=>nil, "return_params"=>"", "url"=> "https://some-subdomain.chargifypay.test/subscribe/nmxwp8gsjh3t/golderrr"}]}, "credit_card"=> {"id"=>885, "first_name"=>"John", "last_name"=>"Doe", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>1, "expiration_year"=>2029, "customer_id"=>708, "current_vault"=>"digital_river", "vault_token"=>"b0aeda54-7576-4457-a36b-e775d2730df8", "billing_address"=>"Street", "billing_city"=>"San Francisco", "billing_state"=>"CA", "billing_zip"=>"66785", "billing_country"=>"US", "customer_vault_token"=>"541159940336", "billing_address_2"=>"", "payment_type"=>"credit_card", "disabled"=>false, "site_gateway_setting_id"=>71}, "group"=>nil}, "transaction"=> {"id"=>3556, "subscription_id"=>784, "type"=>"Payment", "kind"=>nil, "transaction_type"=>"payment", "success"=>true, "amount_in_cents"=>50000, "memo"=>"John Doe - golder: Signup payment", "created_at"=>Wed, 18 Aug 2021 05:58:43 EDT -04:00, "starting_balance_in_cents"=>50000, "ending_balance_in_cents"=>0, "gateway_used"=>"digital_river", "gateway_transaction_id"=>"3daa894a-77e5-4bd9-88b9-8e6dd1e84185", "gateway_order_id"=>nil, "payment_id"=>nil, "product_id"=>154, "tax_id"=>nil, "component_id"=>nil, "statement_id"=>1553, "customer_id"=>708, "item_name"=>nil, "period_range_start"=>nil, "period_range_end"=>nil, "currency"=>"USD", "exchange_rate"=>1, "component_handle"=>nil, "component_price_point_id"=>nil, "component_price_point_handle"=>nil, "parent_id"=>nil, "role"=>nil, "card_number"=>"XXXX-XXXX-XXXX-1111", "card_expiration"=>"01/2029", "card_type"=>"visa", "refunded_amount_in_cents"=>0, "invoice_id"=>nil}, "event_id"=>5432} ``` ## pending_payment_failed **Trigger:** When a Pending Payment was rejected in the gateway. **Payload Fields:** event_id, site, subscription, transaction ## Full payload example ```json "subscription"=> {"id"=>784, "state"=>"pending", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>nil, "created_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "updated_at"=>Wed, 18 Aug 2021 05:58:43 EDT -04:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>nil, "next_assessment_at"=>nil, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>nil, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "previous_state"=>"pending", "signup_payment_id"=>3556, "signup_revenue"=>"500.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>50000, "product_price_in_cents"=>50000, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>nil, "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>nil, "receives_invoice_emails"=>nil, "product_price_point_id"=>168, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>0, "net_terms"=>nil, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"USD", "on_hold_at"=>nil, "scheduled_cancellation_at"=>nil, "customer"=> {"id"=>708, "first_name"=>"John", "last_name"=>"Doe", "organization"=>"", "email"=>"test@example.com", "created_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "updated_at"=>Wed, 18 Aug 2021 05:58:29 EDT -04:00, "reference"=>nil, "address"=>"Street", "address_2"=>"", "city"=>"San Francisco", "state"=>"CA", "state_name"=>"California", "zip"=>"66785", "country"=>"US", "country_name"=>"United States", "phone"=>"123456789", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>154, "name"=>"golder", "handle"=>"golderrr", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Mon, 05 Jul 2021 08:32:52 EDT -04:00, "updated_at"=>Tue, 20 Jul 2021 08:08:49 EDT -04:00, "price_in_cents"=>50000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>true, "update_return_url"=>"", "tax_code"=>"4512.100", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"", "default_product_price_point_id"=>168, "request_billing_address"=>true, "require_billing_address"=>true, "require_shipping_address"=>true, "product_price_point_id"=>168, "product_price_point_name"=>"Original", "product_price_point_handle"=>"uuid:0a6d2640-bfbb-0139-c94b-2cde48001122", "product_family"=> {"id"=>65, "name"=>"Billing Plans", "description"=>nil, "handle"=>"chargify-billing-plans", "accounting_code"=>nil, "created_at"=>Mon, 21 Jun 2021 08:22:16 EDT -04:00, "updated_at"=>Mon, 21 Jun 2021 08:22:16 EDT -04:00}, "public_signup_pages"=> [{"id"=>101, "return_url"=>nil, "return_params"=>"", "url"=> "https://some-subdomain.chargifypay.test/subscribe/nmxwp8gsjh3t/golderrr"}]}, "credit_card"=> {"id"=>885, "first_name"=>"John", "last_name"=>"Doe", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>1, "expiration_year"=>2029, "customer_id"=>708, "current_vault"=>"digital_river", "vault_token"=>"b0aeda54-7576-4457-a36b-e775d2730df8", "billing_address"=>"Street", "billing_city"=>"San Francisco", "billing_state"=>"CA", "billing_zip"=>"66785", "billing_country"=>"US", "customer_vault_token"=>"541159940336", "billing_address_2"=>"", "payment_type"=>"credit_card", "disabled"=>false, "site_gateway_setting_id"=>71}, "group"=>nil}, "transaction"=> {"id"=>3556, "subscription_id"=>784, "type"=>"Payment", "kind"=>nil, "transaction_type"=>"payment", "success"=>true, "amount_in_cents"=>50000, "memo"=>"John Doe - golder: Signup payment", "created_at"=>Wed, 18 Aug 2021 05:58:43 EDT -04:00, "starting_balance_in_cents"=>50000, "ending_balance_in_cents"=>0, "gateway_used"=>"digital_river", "gateway_transaction_id"=>"3daa894a-77e5-4bd9-88b9-8e6dd1e84185", "gateway_order_id"=>nil, "payment_id"=>nil, "product_id"=>154, "tax_id"=>nil, "component_id"=>nil, "statement_id"=>1553, "customer_id"=>708, "item_name"=>nil, "period_range_start"=>nil, "period_range_end"=>nil, "currency"=>"USD", "exchange_rate"=>1, "component_handle"=>nil, "component_price_point_id"=>nil, "component_price_point_handle"=>nil, "parent_id"=>nil, "role"=>nil, "card_number"=>"XXXX-XXXX-XXXX-1111", "card_expiration"=>"01/2029", "card_type"=>"visa", "refunded_amount_in_cents"=>0, "invoice_id"=>nil}, "event_id"=>5432} ``` ## prepaid_subscription_balance_change **Trigger:** Any change to a prepaid Subscription’s usage or prepayment balance. **Payload Fields:** event_id, site, subscription, prepaid_configuration, customer, product, product_family, credit_card, group ## Full payload example ```json "subscription"=> {"id"=>129431, "state"=>"expired", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Mon, 09 Nov 2020 11:33:10 MST -07:00, "created_at"=>Mon, 09 Nov 2020 11:33:09 MST -07:00, "updated_at"=>Mon, 09 Nov 2020 11:57:26 MST -07:00, "expires_at"=>Mon, 09 Nov 2020 11:37:00 MST -07:00, "balance_in_cents"=>0, "current_period_ends_at"=>nil, "next_assessment_at"=>nil, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "next_product_handle"=>nil, "cancel_at_end_of_period"=>nil, "payment_collection_method"=>"prepaid", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>nil, "previous_state"=>"active", "signup_payment_id"=>3129166, "signup_revenue"=>"30.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>22000, "product_price_in_cents"=>0, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>nil, "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>nil, "payer_id"=>nil, "receives_invoice_emails"=>nil, "product_price_point_id"=>16695, "next_product_price_point_id"=>nil, "credit_balance_in_cents"=>0, "prepayment_balance_in_cents"=>22000, "net_terms"=>nil, "stored_credential_transaction_id"=>nil, "locale"=>nil, "reference"=>nil, "currency"=>"USD", "on_hold_at"=>nil, "scheduled_cancellation_at"=>nil, "customer"=> {"id"=>214718, "first_name"=>"Baylee", "last_name"=>"Brekke", "organization"=>"Hickle, Strosin and Rice", "email"=>"Caden20@example.com", "created_at"=>Mon, 09 Nov 2020 11:32:39 MST -07:00, "updated_at"=>Mon, 09 Nov 2020 11:33:11 MST -07:00, "reference"=>nil, "address"=>"7563 Gutkowski Crescent", "address_2"=>"Apt. 499", "city"=>"West Michael", "state"=>"AZ", "zip"=>"44635-5049", "country"=>"US", "phone"=>"270-305-7838", "portal_invite_last_sent_at"=>Mon, 09 Nov 2020 11:33:11 MST -07:00, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>Mon, 09 Nov 2020 11:33:11 MST -07:00, "vat_number"=>nil, "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil, "locale"=>nil}, "product"=> {"id"=>17900, "name"=>"expires", "handle"=>nil, "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>1, "expiration_interval_unit"=>"month", "created_at"=>Mon, 09 Nov 2020 11:29:50 MST -07:00, "updated_at"=>Mon, 09 Nov 2020 11:29:50 MST -07:00, "price_in_cents"=>0, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>false, "return_params"=>"", "taxable"=>false, "update_return_url"=>"", "tax_code"=>"", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"", "default_product_price_point_id"=>16695, "request_billing_address"=>false, "require_billing_address"=>false, "require_shipping_address"=>false, "product_price_point_id"=>16695, "product_price_point_name"=>"Original", "product_price_point_handle"=>"uuid:79d63630-04e7-0139-d7d7-029b6d08343c", "product_family"=> {"id"=>10712, "name"=>"Billing Plans", "description"=>nil, "handle"=>"acme-inc-billing-plans", "accounting_code"=>nil, "created_at"=>Mon, 27 Apr 2020 07:36:52 MDT -06:00, "updated_at"=>Mon, 27 Apr 2020 07:36:52 MDT -06:00}, "public_signup_pages"=>[]}, "credit_card"=> {"id"=>124033, "first_name"=>"Ciara", "last_name"=>"Heathcote", "masked_card_number"=>"XXXX-XXXX-XXXX-1", "card_type"=>"bogus", "expiration_month"=>11, "expiration_year"=>2021, "customer_id"=>214718, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>"1816 Brekke Wall", "billing_city"=>"East Milo", "billing_state"=>"IN", "billing_zip"=>"00451-1348", "billing_country"=>"US", "customer_vault_token"=>nil, "billing_address_2"=>"Apt. 650", "payment_type"=>"credit_card", "disabled"=>false, "site_gateway_setting_id"=>nil}, "prepaid_configuration"=> {"id"=>624, "initial_funding_amount_in_cents"=>3000, "auto_replenish"=>true, "replenish_to_amount_in_cents"=>8000, "replenish_threshold_amount_in_cents"=>3000}, "group"=>nil}, "reason"=>"usage changed", "current_account_balance_in_cents"=>22000, "event_id"=>4917496} ``` ## prepaid_usage **Trigger:** Any recorded usage for a Subscription’s prepaid component. Changes in allocation are reflected in `component_allocation_change`. **Payload Fields:** event_id, site, component, subscription, product, previous_unit_balance, usage_quantity, previous_overage_unit_balance, new_overage_unit_balance, overage_usage_quantity, price_point_id ## Full payload example ```json "component"=> {"id"=>957864, "kind"=>"prepaid_usage_component", "name"=>"Minutes", "unit_name"=>"minutes", "handle"=>nil}, "subscription"=>{"id"=>32304660, "name"=>"Mario Smith"}, "product"=>{"id"=>4607690, "name"=>"Silver Plan"}, "memo"=>"", "timestamp"=>"2020-04-28T18:34:36Z", "price_point_id"=>821647, "previous_unit_balance"=>"0.0", "new_unit_balance"=>15, "usage_quantity"=>15, "previous_overage_unit_balance"=>"0.0", "new_overage_unit_balance"=>5, "overage_usage_quantity"=>5, "event_id"=>1064815585} ``` ## renewal_failure **Trigger:** A failed periodic renewal, such as when the credit card is declined. At the end of every recurring interval, either a renewal_success or a renewal_failure event is triggered once. If a card is declined and a renewal_failure is triggered, a subsequent payment that brings the account current will not generate a renewal_success (although it will generate a payment_success and a subscription_state_change) **Payload Fields:** event_id, site, subscription, transaction The subscription object also contains information on the Customer and Product. ## Full payload example ```json {"id"=>16372192, "state"=>"past_due", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Mon, 13 Feb 2025 11:50:57 EST -05:00, "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 13:28:06 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>16000, "current_period_ends_at"=>Mon, 13 Mar 2025 14:28:05 EDT -04:00, "next_assessment_at"=>Tue, 14 Feb 2025 13:28:06 EST -05:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 13:28:05 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>173961106, "signup_revenue"=>"60.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>6000, "product_price_in_cents"=>5000, "product_version_number"=>1, "payment_type"=>nil, "referral_code"=>"cz8wdq", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "currency"=>"USD", "customer"=> {"id"=>15826583, "first_name"=>"Doris", "last_name"=>"Tester", "organization"=>"Acme", "email"=>"doris@example.com", "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "reference"=>"123456789", "address"=>"123 Anywhere Street", "address_2"=>"", "city"=>"Boston", "state"=>"MA", "zip"=>"02120", "country"=>"US", "phone"=>"555-555-1212", "portal_invite_last_sent_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "portal_invite_last_accepted_at"=>nil, "verified"=>nil, "portal_customer_created_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil}, "product"=> {"id"=>4442358, "name"=>"Gold Product", "handle"=>"gold-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "updated_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "price_in_cents"=>5000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>306012, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"}, {"id"=>310598, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"}, {"id"=>311132, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]}}, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "event_id"=>377601653} ``` ## renewal_success **Trigger:** A successful periodic renewal. At the end of every recurring interval, either a renewal_success or a renewal_failure event is triggered once. If a card is declined and a renewal_failure is triggered, a subsequent payment that brings the account current will not generate a renewal_success (although it will generate a payment_success and a subscription_state_change) **Payload Fields:** event_id, site, subscription, transaction ## Full payload example ```json {"id"=>16327080, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Thu, 09 Feb 2025 11:42:28 EST -05:00, "created_at"=>Thu, 09 Feb 2025 11:42:26 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 12:03:41 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>5667, "current_period_ends_at"=>Wed, 08 Mar 2025 12:00:00 EST -05:00, "next_assessment_at"=>Wed, 08 Mar 2025 12:00:00 EST -05:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>"8", "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 12:00:00 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>0, "signup_revenue"=>"0.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>0, "product_price_in_cents"=>6900, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"6zcsxw", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "currency"=>"USD", "customer"=> {"id"=>15780191, "first_name"=>"Test ", "last_name"=>"Monthly", "organization"=>"", "email"=>"test@example.com", "created_at"=>Thu, 09 Feb 2025 11:42:26 EST -05:00, "updated_at"=>Thu, 09 Feb 2025 11:42:29 EST -05:00, "reference"=>nil, "address"=>nil, "address_2"=>nil, "city"=>nil, "state"=>nil, "zip"=>nil, "country"=>nil, "phone"=>"", "portal_invite_last_sent_at"=>Thu, 09 Feb 2025 11:42:29 EST -05:00, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>Thu, 09 Feb 2025 11:42:29 EST -05:00, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil}, "product"=> {"id"=>4458204, "name"=>"Monthly product ", "handle"=>"monthly-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Wed, 08 Feb 2025 16:48:54 EST -05:00, "updated_at"=>Wed, 08 Feb 2025 16:48:54 EST -05:00, "price_in_cents"=>6900, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>312067, "return_url"=>nil, "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/5x8sbq29vgkn/monthly-product"}, {"id"=>312068, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/vsmzkwvmfqqx/monthly-product"}]}, "credit_card"=> {"id"=>10881632, "first_name"=>"Test", "last_name"=>"Page", "masked_card_number"=>"XXXX-XXXX-XXXX-1", "card_type"=>"bogus", "expiration_month"=>1, "expiration_year"=>2027, "customer_id"=>15780191, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>nil, "billing_city"=>nil, "billing_state"=>nil, "billing_zip"=>"", "billing_country"=>nil, "customer_vault_token"=>nil, "billing_address_2"=>nil, "payment_type"=>"credit_card"}}, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "event_id"=>377575304} ``` ## signup_success **Trigger:** Any successful signup (Subscription created) through the API, application, or Public Pages. **Payload Fields:** event_id, site, subscription The subscription object also contains information on the Customer and Product. Component allocations are not currently included in the signup_success webhook. ## Full payload example ```json {"id"=>16372192, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Mon, 13 Feb 2025 11:50:57 EST -05:00, "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 11:50:57 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>6000, "current_period_ends_at"=>Mon, 13 Mar 2025 12:50:55 EDT -04:00, "next_assessment_at"=>Mon, 13 Mar 2025 12:50:55 EDT -04:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>173961106, "signup_revenue"=>"60.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>0, "product_price_in_cents"=>5000, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"cz8wdq", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "reason_code"=>nil, "automatically_resume_at"=>nil, "coupon_codes"=>[], "offer_id"=>64, "payer_id"=>15826583, "currency"=>"USD", "customer"=> {"id"=>15826583, "first_name"=>"Doris", "last_name"=>"Tester", "organization"=>"Acme", "email"=>"doris@example.com", "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "reference"=>"123456789", "address"=>"123 Anywhere Street", "address_2"=>"", "city"=>"Boston", "state"=>"MA", "zip"=>"02120", "country"=>"US", "phone"=>"555-555-1212", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "vat_number"=>"123456789" "verified"=>nil, "portal_customer_created_at"=>nil, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false}, "product"=> {"id"=>4442358, "name"=>"Gold Product", "handle"=>"gold-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "updated_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "price_in_cents"=>5000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "tax_code"=>"PC040100", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>306012, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"}, {"id"=>310598, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"}, {"id"=>311132, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]}, "credit_card"=> {"id"=>10911728, "first_name"=>"Doris", "last_name"=>"Tester", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>1, "expiration_year"=>2027, "customer_id"=>15826583, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>"123 Anywhere Street", "billing_city"=>"Boston", "billing_state"=>"MA", "billing_zip"=>"02120", "billing_country"=>"US", "customer_vault_token"=>nil, "billing_address_2"=>"", "payment_type"=>"credit_card"}}, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "event_id"=>377569865} ``` ## signup_failure **Trigger:** Any failed signup (Subscription failed to begin) through the API, application, or Public Pages. This is usually caused by a failure at the payment gateway. This event is not generated for input validation errors (i.e. forgetting to fill in a field). **Payload Fields:** event_id, site, subscription The subscription object also contains information on the Customer and Product. ## Full payload example ```json {"id"=>16374036, "state"=>"failed_to_create", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>nil, "created_at"=>Mon, 13 Feb 2025 13:08:30 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 13:08:31 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>6900, "current_period_ends_at"=>Wed, 08 Mar 2025 12:00:00 EST -05:00, "next_assessment_at"=>nil, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>"8", "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 13:08:30 EST -05:00, "previous_state"=>"failed_to_create", "signup_payment_id"=>173970546, "signup_revenue"=>"69.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>0, "product_price_in_cents"=>6900, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"k9f3h5", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "payer_id"=>15828506, "currency"=>"USD", "customer"=> {"id"=>15828506, "first_name"=>"Joe", "last_name"=>"Tester", "organization"=>"Acme", "email"=>"joetester@example.com", "created_at"=>Mon, 13 Feb 2025 13:08:30 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 13:08:30 EST -05:00, "reference"=>nil, "address"=>nil, "address_2"=>nil, "city"=>nil, "state"=>nil, "zip"=>nil, "country"=>nil, "phone"=>"555-555-1212", "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false, "parent_id"=>nil}, "product"=> {"id"=>4458204, "name"=>"Monthly product ", "handle"=>"monthly-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Wed, 08 Feb 2025 16:48:54 EST -05:00, "updated_at"=>Wed, 08 Feb 2025 16:48:54 EST -05:00, "price_in_cents"=>6900, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>312067, "return_url"=>nil, "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/5x8sbq29vgkn/monthly-product"}, {"id"=>312068, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/vsmzkwvmfqqx/monthly-product"}]}, "credit_card"=> {"id"=>10913241, "first_name"=>"Joe", "last_name"=>"Tester", "masked_card_number"=>"XXXX-XXXX-XXXX-2", "card_type"=>"bogus", "expiration_month"=>1, "expiration_year"=>2027, "customer_id"=>15828506, "current_vault"=>"bogus", "vault_token"=>"2", "billing_address"=>nil, "billing_city"=>nil, "billing_state"=>nil, "billing_zip"=>"02120", "billing_country"=>nil, "customer_vault_token"=>nil, "billing_address_2"=>nil, "payment_type"=>"credit_card"}}, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "event_id"=>377594843} ``` ## subscription_bank_account_update **Trigger:** When a Subscription adds or updates a bank account. **Payload Fields:** See payload example ## Full payload example ```json {"site"=>{"id"=>60050, "subdomain"=>"chargify-sandbox-141"}, "subscription"=>{"id"=>58501928, "state"=>"active", "balance_in_cents"=>442}, "product"=> {"id"=>6316229, "name"=>"Base Subscription", "product_family_id"=>2417171, "product_family_name"=>"Billing Scenario Testing"}, "customer"=> {"id"=>59176626, "first_name"=>"Samara", "last_name"=>"Hills", "reference"=>nil, "organization"=>"Becker - Lynch", "email"=>"Jesus.Jacobs@example.org"}, "previous_payment_profile"=>{}, "updated_payment_profile"=> {"id"=>50298431, "first_name"=>"John", "last_name"=>"Smith", "billing_address"=>"123 main st", "billing_address_2"=>nil, "billing_city"=>"Roseville", "billing_state"=>"CA", "billing_zip"=>"95747", "billing_country"=>"US", "bank_name"=>"Chase", "masked_bank_routing_number"=>"XXXX1111", "masked_bank_account_number"=>"XXXX1111", "bank_account_holder_type"=>"personal", "current_vault"=>"bogus", "vault_token"=>"4111111111111111", "customer_vault_token"=>nil}, "event_id"=>2946290595} ``` ## subscription_card_update **Trigger:** Any change to the active credit card–type payment profile. This includes partial card/billing address updates and deletion of PayPal payment profiles. Additions of new PayPal accounts, changes/deletions of bank account / ACH type payment profiles do not currently generate any webhooks. **Payload Fields:** event_id, site, subscription, product, previous_payment_profile, updated_payment_profile, customer ## Full payload example ```json "subscription"=>{"id"=>16372192, "state"=>"active", "balance_in_cents"=>0}, "product"=> {"id"=>4442358, "name"=>"Gold Product", "product_family_id"=>986840, "product_family_name"=>"Acme Products"}, "customer"=> {"id"=>15826583, "first_name"=>"Doris", "last_name"=>"Tester", "reference"=>"123456789", "organization"=>"Acme", "email"=>"doris@example.com"}, "previous_payment_profile"=>{}, "updated_payment_profile"=> {"id"=>10914352, "first_name"=>"Doris", "last_name"=>"Tester", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>2, "expiration_year"=>2025, "current_vault"=>"bogus", "vault_token"=>"1", "customer_vault_token"=>nil, "billing_address"=>"", "billing_address_2"=>"", "billing_city"=>"", "billing_state"=>"", "billing_zip"=>"", "billing_country"=>""}, "event_id"=>377602844} ``` ## subscription_group_card_update **Trigger:** Any change to the active credit card–type payment profile on the Subscription group. **Payload Fields:** event_id, site, subscription_group, previous_payment_profile, updated_payment_profile, customer ## Full payload example ```json "subscription_group"=>{"uid"=>"grp_96w3wg7hhnbjk", "state"=>"active"}, "customer"=> {"id"=>15826583, "first_name"=>"Doris", "last_name"=>"Tester", "reference"=>"123456789", "organization"=>"Acme", "email"=>"doris@example.com"}, "previous_payment_profile"=>{}, "updated_payment_profile"=> {"id"=>10914352, "first_name"=>"Doris", "last_name"=>"Tester", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>2, "expiration_year"=>2025, "current_vault"=>"bogus", "vault_token"=>"1", "customer_vault_token"=>nil, "billing_address"=>"", "billing_address_2"=>"", "billing_city"=>"", "billing_state"=>"", "billing_zip"=>"", "billing_country"=>""}, "event_id"=>377602844} ``` ## subscription_group_signup_failure **Trigger:** When a Subscription group signup fails via the Subscription Group Signup endpoint. **Payload Fields:** See payload example ## Full payload example ```json {"site"=>{"id"=>60050, "subdomain"=>"chargify-sandbox-141"}, "subscription_group"=> {"payer_attributes"=> {"first_name"=>"John", "last_name"=>"Doe", "email"=>"john@example.com", "organization"=>"Acme, Inc"}, "credit_card_attributes"=> {"full_number"=>"3", "expiration_month"=>"12", "expiration_year"=>"2031"}, "subscriptions"=> [{"product_id"=>6323196, "primary"=>true}, {"product_id"=>6323196}, {"product_id"=>6323196}]}, "customer"=>nil, "event_id"=>2948348361} ``` ## subscription_group_signup_success **Trigger:** When a Subscription group signup is successful via the Subscription Group Signup endpoint. **Payload Fields:** See payload example ## Full payload example ```json {"site"=>{"id"=>60050, "subdomain"=>"chargify-sandbox-141"}, "subscription_group"=> {"uid"=>"grp_b32ztn6vbyh5q", "scheme"=>1, "customer_id"=>64261470, "payment_profile_id"=>50310133, "subscription_ids"=>[63100002, 63100003, 63100004], "primary_subscription_id"=>63100002, "next_assessment_at"=>Sun, 09 Apr 2023 10:43:49 PDT -07:00, "state"=>"active", "cancel_at_end_of_period"=>false}, "customer"=> {"id"=>64261470, "phone"=>nil, "reference"=>nil, "email"=>"john@example.com", "first_name"=>"John", "last_name"=>"Doe", "cc_emails"=>nil, "vat_number"=>nil, "address"=>nil, "address_2"=>nil, "city"=>nil, "country"=>nil, "organization"=>"Acme, Inc", "state"=>nil, "zip"=>nil, "parent_id"=>nil, "created_at"=>Thu, 09 Mar 2023 09:43:49 PST -08:00, "updated_at"=>Thu, 09 Mar 2023 09:43:49 PST -08:00, "portal_invite_last_sent_at"=>nil, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>nil, "tax_exempt"=>false, "locale"=>nil}, "event_id"=>2948335113} ``` ## subscription_prepayment_account_balance_changed **Trigger:** When a Subscription prepayment account balance changes—either when a prepayment is applied (increasing the balance) or used to make a payment on an invoice (decreasing the balance). **Payload Fields:** See payload example ## Full payload example ```json {"site"=>{"id"=>60050, "subdomain"=>"chargify-sandbox-141"}, "prepayments_account"=> {"at_time"=>Wed, 08 Mar 2023 15:18:11 PST -08:00, "balance_in_cents"=>25000, "balance_change_in_cents"=>25000}, "prepayments"=> {"0"=> {"id"=>816132545, "applications"=>{}, "amount_in_cents"=>25000, "external"=>"external", "memo"=>"A memo is here"}}, "subscription"=>{"id"=>63081463}, "reason"=>"prepayment created", "event_id"=>2946242689} ``` ## subscription_product_change **Trigger:** A successful change from an old product to a new product for a subscription. This webhook will fire for a product version change. **Payload Fields:** event_id, site, previous_product, subscription The subscription object also contains information on the Customer and Product. ## Full payload example ```json {"id"=>16372192, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Mon, 13 Feb 2025 11:50:57 EST -05:00, "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 13:40:29 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>Thu, 13 Apr 2025 14:28:00 EDT -04:00, "next_assessment_at"=>Thu, 13 Apr 2025 14:28:00 EDT -04:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 13:28:05 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>173961106, "signup_revenue"=>"60.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>22000, "product_price_in_cents"=>4900, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"cz8wdq", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "customer"=> {"id"=>15826583, "first_name"=>"Doris", "last_name"=>"Tester", "organization"=>"Acme", "email"=>"doris@example.com", "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "reference"=>"123456789", "address"=>"123 Anywhere Street", "address_2"=>"", "city"=>"Boston", "state"=>"MA", "zip"=>"02120", "country"=>"US", "phone"=>"555-555-1212", "portal_invite_last_sent_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "portal_invite_last_accepted_at"=>nil, "vat_number"=>"123456789" "verified"=>nil, "portal_customer_created_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false}, "product"=> {"id"=>4443536, "name"=>"Business Monthly", "handle"=>"pd_plans_v2_business_mn_1_10", "description"=>"Business Monthly", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Mon, 19 Dec 2024 15:58:09 EST -05:00, "updated_at"=>Mon, 19 Dec 2024 15:58:09 EST -05:00, "price_in_cents"=>4900, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>0, "trial_interval"=>1, "trial_interval_unit"=>"day", "archived_at"=>nil, "require_credit_card"=>false, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>306548, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/jtvkftj84jsq/pd_plans_v2_business_mn_1_10"}]}, "credit_card"=> {"id"=>10914352, "first_name"=>"Doris", "last_name"=>"Tester", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>2, "expiration_year"=>2018, "customer_id"=>15826583, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>"", "billing_city"=>"", "billing_state"=>"", "billing_zip"=>"", "billing_country"=>"", "customer_vault_token"=>nil, "billing_address_2"=>"", "payment_type"=>"credit_card"}}, "previous_product"=> {"id"=>4442358, "name"=>"Gold Product", "handle"=>"gold-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "updated_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "price_in_cents"=>5000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>306012, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"}, {"id"=>310598, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"}, {"id"=>311132, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]}, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "event_id"=>377604632} ``` ## subscription_product_change_scheduled **Trigger:** A delayed product change has been successfully scheduled for a subscription — the product change is set to take effect at the subscription's next renewal rather than immediately. The webhook fires as soon as the scheduled change is created, so you can react to an upcoming product change ahead of renewal instead of waiting for `subscription_product_change`. **Payload Fields:** event_id, site, subscription, current_product, scheduled_product, effective_at The `current_product` object is the subscription's product today; `scheduled_product` is the product it will change to at `effective_at`. The subscription object also contains information on the Customer and Product. ## Full payload example ```json { "site": { "id": 31615, "subdomain": "general-goods" }, "subscription": { "id": 16372192, "state": "active", "balance_in_cents": 0, "current_period_ends_at": "2025-04-13T14:28:00-04:00", "next_assessment_at": "2025-04-13T14:28:00-04:00", "product_price_point_id": 1, "next_product_id": 4443537, "next_product_price_point_id": 5, "customer": { "id": 15826583, "first_name": "Doris", "last_name": "Tester", "email": "doris@example.com", "reference": "123456789" }, "product": { "id": 4443536, "name": "Business Monthly", "handle": "business-monthly", "price_in_cents": 4900, "interval": 1, "interval_unit": "month" } }, "current_product": { "id": 4443536, "name": "Business Monthly", "handle": "business-monthly", "price_in_cents": 4900, "interval": 1, "interval_unit": "month" }, "scheduled_product": { "id": 4443537, "name": "Enterprise Monthly", "handle": "enterprise-monthly", "price_in_cents": 9900, "interval": 1, "interval_unit": "month" }, "effective_at": "2025-04-13T14:28:00-04:00", "event_id": 377604633 } ``` ## subscription_service_credit_account_balance_changed **Trigger:** Any change to the Subscription service credit account balance—either when credit is applied (increase) or used for payment (decrease). **Payload Fields:** See payload example ## Full payload example ```json {"site"=>{"id"=>60050, "subdomain"=>"chargify-sandbox-141"}, "subscription"=>{"id"=>63081463}, "reason"=>"service credit given", "service_credits"=> [{"id"=>1992348, "invoice_uid"=>nil, "entry_type"=>"Credit", "amount_in_cents"=>1000, "memo"=>"A memo is here"}], "service_credit_account"=> {"at_time"=>Wed, 08 Mar 2023 15:17:55 PST -08:00, "balance_in_cents"=>1000, "balance_change_in_cents"=>1000}, "event_id"=>2946242578} ``` ## subscription_state_change **Trigger:** Any change to the Subscription state. This is the “workhorse” event. Watching this event can tell you if a Subscription moves to a “bad” state, such as `past_due`. **Payload Fields:** event_id, site, subscription The subscription object also contains information on the Customer and Product. Note that the `subscription` object you are given contains keys for both `previous_state` and state so you can track the changes. ## Full payload example ```json {"id"=>16372192, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Mon, 13 Feb 2025 11:50:57 EST -05:00, "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 13:33:14 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>16000, "current_period_ends_at"=>Mon, 13 Mar 2025 14:28:05 EDT -04:00, "next_assessment_at"=>Tue, 14 Feb 2025 13:28:06 EST -05:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 13:28:05 EST -05:00, "previous_state"=>"past_due", "signup_payment_id"=>173961106, "signup_revenue"=>"60.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>6000, "product_price_in_cents"=>5000, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"cz8wdq", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "customer"=> {"id"=>15826583, "first_name"=>"Doris", "last_name"=>"Tester", "organization"=>"Acme", "email"=>"doris@example.com", "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "reference"=>"123456789", "address"=>"123 Anywhere Street", "address_2"=>"", "city"=>"Boston", "state"=>"MA", "zip"=>"02120", "country"=>"US", "phone"=>"555-555-1212", "portal_invite_last_sent_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "portal_invite_last_accepted_at"=>nil, "vat_number"=>"123456789" "verified"=>nil, "portal_customer_created_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "vat_number"=>"123456789" "cc_emails"=>nil, "tax_exempt"=>false}, "product"=> {"id"=>4442358, "name"=>"Gold Product", "handle"=>"gold-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "updated_at"=>Thu, 15 Dec 2024 09:32:36 EST -05:00, "price_in_cents"=>5000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>306012, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"}, {"id"=>310598, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"}, {"id"=>311132, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]}, "credit_card"=> {"id"=>10914352, "first_name"=>"Doris", "last_name"=>"Tester", "masked_card_number"=>"XXXX-XXXX-XXXX-1111", "card_type"=>"visa", "expiration_month"=>2, "expiration_year"=>2018, "customer_id"=>15826583, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>"", "billing_city"=>"", "billing_state"=>"", "billing_zip"=>"", "billing_country"=>"", "customer_vault_token"=>nil, "billing_address_2"=>"", "payment_type"=>"credit_card"}}, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "event_id"=>377602840} ``` ## upcoming_renewal_notice **Trigger:** A webhook will be generated 3 days before a subscription is set to renew. **Payload Fields:** event_id, site, customer, email_sent, estimated_renewal_amount_in_cents, message, payment_profile, product, subscription ## Full payload example ```json "customer" => { "id" => 15146757, "first_name" => "Katharine", "last_name" => "Ross", "reference" => nil, "organization" => "", "email" => "kross@example.com"}, "email_sent" => true, "estimated_renewal_amount_in_cents" => 5000, "message" => "Upcoming renewal notice sent for period ending on 02/20/2025 for Katharine Ross's subscription to Gold Product", "payment_profile" => { "id" => 10485399, "first_name" => "Katharine", "last_name" => "Ross", "card_type" => "bogus", "masked_card_number" => "XXXX-XXXX-XXXX-1", "expiration_month" => 1, "expiration_year" => 2026}, "product" => { "id" => 4442358, "name" => "Gold Product", "product_family_id" => 986840, "product_family_name" => "Acme Products"}, "subscription" => { "id" => 15690494, "state" => "active", "current_period_ends_at" => Mon, 20 Feb 2025 12: 00: 00 EST - 05: 00}, "event_id" => 378968302} ``` ## upgrade_downgrade_failure **Trigger:** Any failed upgrade or downgrade. **Payload Fields:** event_id, site, subscription, previous_product The subscription object also contains information on the Customer and Product. ## Full payload example ```json {"id"=>16372192, "state"=>"active", "trial_started_at"=>nil, "trial_ended_at"=>nil, "activated_at"=>Mon, 13 Feb 2025 11:50:57 EST -05:00, "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 14:59:39 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>0, "current_period_ends_at"=>Fri, 17 Feb 2025 14:28:00 EST -05:00, "next_assessment_at"=>Fri, 17 Feb 2025 14:28:00 EST -05:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"automatic", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 13:28:05 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>173961106, "signup_revenue"=>"60.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>6000, "product_price_in_cents"=>4900, "product_version_number"=>1, "payment_type"=>nil, "referral_code"=>"cz8wdq", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "customer"=> {"id"=>15826583, "first_name"=>"Doris", "last_name"=>"Tester", "organization"=>"Acme", "email"=>"doristester@example.com", "created_at"=>Mon, 13 Feb 2025 11:50:55 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 13:42:07 EST -05:00, "reference"=>"123456789", "address"=>"123 Anywhere Street", "address_2"=>"", "city"=>"Boston", "state"=>"MA", "zip"=>"02120", "country"=>"US", "phone"=>"555-555-1212", "portal_invite_last_sent_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>Mon, 13 Feb 2025 11:50:58 EST -05:00, "vat_number"=>"123456789" "cc_emails"=>"", "tax_exempt"=>false}, "product"=> {"id"=>4443536, "name"=>"Business Monthly", "handle"=>"pd_plans_v2_business_mn_1_10", "description"=>"Business Monthly", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Mon, 19 Dec 2024 15:58:09 EST -05:00, "updated_at"=>Mon, 19 Dec 2024 15:58:09 EST -05:00, "price_in_cents"=>4900, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>0, "trial_interval"=>1, "trial_interval_unit"=>"day", "archived_at"=>nil, "require_credit_card"=>false, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>306548, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/jtvkftj84jsq/pd_plans_v2_business_mn_1_10"}]}}, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "target_product"=> {"id"=>4458204, "name"=>"Monthly product ", "handle"=>"monthly-product", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Wed, 08 Feb 2025 16:48:54 EST -05:00, "updated_at"=>Wed, 08 Feb 2025 16:48:54 EST -05:00, "price_in_cents"=>6900, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>nil, "trial_interval"=>nil, "trial_interval_unit"=>"month", "archived_at"=>nil, "require_credit_card"=>true, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>312067, "return_url"=>nil, "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/5x8sbq29vgkn/monthly-product"}, {"id"=>312068, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/vsmzkwvmfqqx/monthly-product"}]}, "event_id"=>377635953} ``` ## upgrade_downgrade_success **Trigger:** Any successful upgrade or downgrade. **Payload Fields:** event_id, site, subscription, previous_product The subscription object also contains information on the Customer and Product. ## Full payload example ```json {"id"=>16297395, "state"=>"trialing", "trial_started_at"=>Mon, 13 Feb 2025 15:00:02 EST -05:00, "trial_ended_at"=>Tue, 14 Feb 2025 15:00:02 EST -05:00, "activated_at"=>Wed, 08 Feb 2025 16:23:22 EST -05:00, "created_at"=>Tue, 07 Feb 2025 16:06:06 EST -05:00, "updated_at"=>Mon, 13 Feb 2025 15:00:02 EST -05:00, "expires_at"=>nil, "balance_in_cents"=>177, "current_period_ends_at"=>Tue, 14 Feb 2025 15:00:02 EST -05:00, "next_assessment_at"=>Tue, 14 Feb 2025 15:00:02 EST -05:00, "canceled_at"=>nil, "cancellation_message"=>nil, "next_product_id"=>nil, "cancel_at_end_of_period"=>false, "payment_collection_method"=>"invoice", "snap_day"=>nil, "cancellation_method"=>nil, "current_period_started_at"=>Mon, 13 Feb 2025 15:00:01 EST -05:00, "previous_state"=>"active", "signup_payment_id"=>173249657, "signup_revenue"=>"0.00", "delayed_cancel_at"=>nil, "coupon_code"=>nil, "total_revenue_in_cents"=>0, "product_price_in_cents"=>4900, "product_version_number"=>1, "payment_type"=>"credit_card", "referral_code"=>"j63942", "coupon_use_count"=>nil, "coupon_uses_allowed"=>nil, "product_price_point_id"=>1, "next_product_price_point_id"=>nil, "customer"=> {"id"=>15751842, "first_name"=>"Steve", "last_name"=>"Test", "organization"=>"", "email"=>"steve@example.com", "created_at"=>Tue, 07 Feb 2025 16:06:06 EST -05:00, "updated_at"=>Tue, 07 Feb 2025 16:06:10 EST -05:00, "reference"=>nil, "address"=>nil, "address_2"=>nil, "city"=>nil, "state"=>nil, "zip"=>nil, "country"=>nil, "phone"=>"", "portal_invite_last_sent_at"=>Tue, 07 Feb 2025 16:06:10 EST -05:00, "portal_invite_last_accepted_at"=>nil, "verified"=>false, "portal_customer_created_at"=>Tue, 07 Feb 2025 16:06:10 EST -05:00, "cc_emails"=>nil, "tax_exempt"=>false}, "product"=> {"id"=>4443536, "name"=>"Business Monthly", "handle"=>"pd_plans_v2_business_mn_1_10", "description"=>"Business Monthly", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Mon, 19 Dec 2024 15:58:09 EST -05:00, "updated_at"=>Mon, 19 Dec 2024 15:58:09 EST -05:00, "price_in_cents"=>4900, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>0, "trial_interval"=>1, "trial_interval_unit"=>"day", "archived_at"=>nil, "require_credit_card"=>false, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>306548, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/jtvkftj84jsq/pd_plans_v2_business_mn_1_10"}]}, "credit_card"=> {"id"=>10865912, "first_name"=>"Steve", "last_name"=>"Test", "masked_card_number"=>"XXXX-XXXX-XXXX-1", "card_type"=>"bogus", "expiration_month"=>1, "expiration_year"=>2027, "customer_id"=>15751842, "current_vault"=>"bogus", "vault_token"=>"1", "billing_address"=>nil, "billing_city"=>nil, "billing_state"=>nil, "billing_zip"=>"", "billing_country"=>nil, "customer_vault_token"=>nil, "billing_address_2"=>nil, "payment_type"=>"credit_card"}}, "site"=>{"id"=>31615, "subdomain"=>"general-goods"}, "previous_product"=> {"id"=>4453830, "name"=>"Trial No obligation", "handle"=>"trial-no-obligation", "description"=>"", "accounting_code"=>"", "request_credit_card"=>true, "expiration_interval"=>nil, "expiration_interval_unit"=>"never", "created_at"=>Mon, 23 Jan 2025 09:53:23 EST -05:00, "updated_at"=>Thu, 26 Jan 2025 13:35:29 EST -05:00, "price_in_cents"=>1000, "interval"=>1, "interval_unit"=>"month", "initial_charge_in_cents"=>nil, "trial_price_in_cents"=>0, "trial_interval"=>1, "trial_interval_unit"=>"day", "archived_at"=>nil, "require_credit_card"=>false, "return_params"=>"", "taxable"=>false, "update_return_url"=>"http://www.example.com", "initial_charge_after_trial"=>false, "version_number"=>1, "update_return_params"=>"id={subscription_id}&ref={customer_reference}", "default_product_price_point_id"=>1, "product_price_point_id"=>1, "product_price_point_handle"=>nil, "product_family"=> {"id"=>986840, "name"=>"Acme Products", "description"=>"", "handle"=>"acme-products", "accounting_code"=>nil}, "public_signup_pages"=> [{"id"=>310559, "return_url"=>"", "return_params"=>"", "url"=> "https://general-goods.chargifypay.com/subscribe/ngbsvxv4hq7q/trial-no-obligation"}]}, "event_id"=>377636059} ``` ## statement_settled **Trigger:** At the end of every period (e.g., at renewal). The statement_settled webhook indicates that the statement closed and payment was successfully received (or payment was not required). ## statement_closed **Trigger:** At the end of every period (e.g., at renewal). The statement_closed webhook indicates that the statement closed but payment was not successfully received. If you receive a statement_closed webhook for a statement, you may also receive a statement_settled webhook for the statement at a later time if the statement becomes paid (e.g., after a dunning retry or card update). ## direct_debit_payment_pending **Trigger:** When a payment is created in Stripe (waiting to be processed). ## direct_debit_payment_paid_out **Trigger:** When a payment is successfully processed in Stripe. ## direct_debit_payment_rejected **Trigger:** When a payment is rejected in Stripe (e.g., due to insufficient funds). ## direct_debit_payment_paid_out **Trigger:** When a payment is successfully processed in Stripe. ## Advanced Billing API ### API Endpoints #### List of APIs Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints * [API Exports](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/list-exported-proforma-invoices) * [Advance Invoice](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/advance-invoice/issue-advance-invoice) * [Billing Portal](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/billing-portal/enable-billing-portal-for-customer) * [Coupons](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/create-coupon) * [Component Features](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-features/list-component-features) * [Components](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/create-metered-component) * [Component Price Points](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/promote-component-price-point-to-default) * [Customers](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/create-customer) * [Custom Fields](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/create-metafields) * [Entitlements](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/entitlements/read-subscription-entitlements) * [Events](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events/list-events) * [Events-Based Billing Segments](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events-based-billing-segments/create-segment) * [Feature Templates](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/list-feature-templates) * [Insights](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/insights/read-site-stats) * [Invoices](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/refund-invoice) * [Offers](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/offers/create-offer) * [Payment Profiles](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/create-payment-profile) * [Product Families](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-families/list-products-for-product-family) * [Product Features](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-features/list-product-features) * [Products](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/create-product) * [Product Price Points](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/create-product-price-point) * [Proforma Invoices](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/create-consolidated-proforma-invoice) * [Reason Codes](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/reason-codes/create-reason-code) * [Referral Codes](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/referral-codes/validate-referral-code) * [Sales Commissions](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sales-commissions/list-sales-commission-settings) * [Sites](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sites/read-site) * [Subscriptions](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/create-subscription) * [Subscription Components](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/read-subscription-component) * [Subscription Groups](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/signup-with-subscription-group) * [Subscription Group Invoice Account](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-invoice-account/create-subscription-group-prepayment) * [Subscription Group Status](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-status/cancel-subscriptions-in-group) * [Subscription Invoice Account](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-invoice-account/read-account-balances) * [Subscription Notes](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-notes/create-subscription-note) * [Subscription Products](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-products/migrate-subscription-product) * [Subscription Renewals](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/create-scheduled-renewal-configuration) * [Subscription Status](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/retry-subscription) * [Webhooks](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/list-webhooks) #### API Exports ##### List Exported Proforma Invoices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/list-exported-proforma-invoices Lists exported proforma invoices for a provided `batch_id`. Use pagination to control responses returned from the server. Example: `GET https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?per_page=10000&page=1`. ```http GET /api_exports/proforma_invoices/{batch_id}/rows.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batch_id` | `String` | Template, Required | Id of a Batch Job. | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/api_exports/proforma_invoices/batch_id8/rows.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'per_page=100' \ -d 'page=1' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### List Exported Invoices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/list-exported-invoices Lists exported invoices for a provided `batch_id`. Use pagination to control responses returned from the server. Example: `GET https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10000&page=1`. ```http GET /api_exports/invoices/{batch_id}/rows.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batch_id` | `String` | Template, Required | Id of a Batch Job. | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/api_exports/invoices/batch_id8/rows.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'per_page=100' \ -d 'page=1' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### List Exported Subscriptions Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/list-exported-subscriptions Lists exported subscriptions for a provided `batch_id`. Use pagination to control responses returned from the server. Example: `GET https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_page=200&page=1`. ```http GET /api_exports/subscriptions/{batch_id}/rows.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batch_id` | `String` | Template, Required | Id of a Batch Job. | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request.
Default value is 100.
The maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/api_exports/subscriptions/batch_id8/rows.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'per_page=100' \ -d 'page=1' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Export Proforma Invoices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/export-proforma-invoices Creates a proforma invoices export and returns a batch job object. Proforma invoices are only available on Relationship Invoicing sites. ```http POST /api_exports/proforma_invoices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Response Type **201**: Created [`Batch Job Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/api_exports/proforma_invoices.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 409 | Conflict | [`Single Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response) | ##### Export Invoices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/export-invoices Creates an invoices export and returns a batch job object. ```http POST /api_exports/invoices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Response Type **201**: Created [`Batch Job Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/api_exports/invoices.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 409 | Conflict | [`Single Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response) | ##### Export Subscriptions Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/export-subscriptions Creates a subscriptions export and returns a batch job object. ```http POST /api_exports/subscriptions.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Response Type **201**: Created [`Batch Job Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/api_exports/subscriptions.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 409 | Conflict | [`Single Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response) | ##### Read Proforma Invoices Export Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/read-proforma-invoices-export Returns a batch job object for a proforma invoices export. Proforma invoices are only available on Relationship Invoicing sites. ```http GET /api_exports/proforma_invoices/{batch_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batch_id` | `String` | Template, Required | Id of a Batch Job. | # Response Type **200**: OK [`Batch Job Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/api_exports/proforma_invoices/batch_id8.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Read Invoices Export Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/read-invoices-export Returns a batch job object for an invoices export. ```http GET /api_exports/invoices/{batch_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batch_id` | `String` | Template, Required | Id of a Batch Job. | # Response Type **200**: OK [`Batch Job Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/api_exports/invoices/batch_id8.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Read Subscriptions Export Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/api-exports/read-subscriptions-export Returns a batch job object for a subscriptions export. ```http GET /api_exports/subscriptions/{batch_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `batch_id` | `String` | Template, Required | Id of a Batch Job. | # Response Type **200**: OK [`Batch Job Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/api_exports/subscriptions/batch_id8.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | #### Advance Invoice ##### Issue Advance Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/advance-invoice/issue-advance-invoice Issues an invoice in advance for a subscription's next renewal date. For the most part, advance invoices function like any other invoice, except they are issued early and have special behavior upon being voided. For more information on advance invoices, including eligibility for generating one, see [Issue Invoice In Advance](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance). A subscription can only have one advance invoice per billing period. Attempting to issue an advance invoice when one already exists returns an error. Regeneration of the invoice can be forced with the params `force: true`, which voids an advance invoice if one exists and generates a new one. If no advance invoice exists, a new one is generated. Consider using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it. ```http POST /subscriptions/{subscription_id}/advance_invoice/issue.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Issue Advance Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-advance-invoice-request) | Body, Optional | - | # Response Type **201**: Created [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/advance_invoice/issue.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "force": true }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Advance Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/advance-invoice/read-advance-invoice Returns the advance invoice generated for a subscription's upcoming renewal. There can only be one advance invoice per subscription per billing cycle. ```http GET /subscriptions/{subscription_id}/advance_invoice.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **200**: OK [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/subscriptions/222/advance_invoice.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Void Advance Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/advance-invoice/void-advance-invoice Voids a subscription's existing advance invoice. Once voided, it can later be regenerated if desired. A `reason` is required to void, and the invoice must have an open status. Voiding causes any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, see [Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice). ```http POST /subscriptions/{subscription_id}/advance_invoice/void.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Void Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-request) | Body, Optional | - | # Response Type **201**: Created [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/advance_invoice/void.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | #### Billing Portal ##### Enable Billing Portal for Customer Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/billing-portal/enable-billing-portal-for-customer Enables Billing Portal access for a customer, with an option to send an invitation email at the same time. ## Billing Portal Security If your customer has been invited to the Billing Portal, they receive a link to manage their subscription (the “Management URL”) automatically at the bottom of their statements, invoices, and receipts. **This link changes periodically for security and is only valid for 65 days.** If you need to provide your customer their Management URL through other means, you can retrieve it [via the API](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/billing-portal/read-billing-portal-link). Because the URL is cryptographically signed with a timestamp, merchants cannot generate the URL without requesting it through the API. To prevent abuse and overuse, request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), **do not** make an API request every time. For more information configuring the Billing Portal, see [Billing Portal Overview](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-Portal-Overview). ```http POST /portal/customers/{customer_id}/enable.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `customer_id` | `Number` | Template, Required | The Chargify id of the customer | | `auto_invite` | [`Auto Invite`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/auto-invite) | Query, Optional | When set to 1, an Invitation email will be sent to the Customer.
When set to 0, or not sent, an email will not be sent.
Use in query: `auto_invite=1`. | # Response Type **200**: OK [`Customer Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-response) # Example Usage ```bash curl -X POST -G \ --url 'https://subdomain.chargify.com/portal/customers/150/enable.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Billing Portal Link Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/billing-portal/read-billing-portal-link Returns the exact URL required for a subscriber to access the Billing Portal. ## Management Link Request Rules + When retrieving a management URL, multiple requests for the same customer in a short period return the **same** URL + A new URL is not generated for 15 days + You must cache and remember this URL if you are going to need it again within 15 days + Only request a new URL after the `new_link_available_at` date + You are limited to 15 requests for the same URL. If you make more than 15 requests before `new_link_available_at`, you are blocked from further Management URL requests (with a response code `429`). ```http GET /portal/customers/{customer_id}/management_link.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `customer_id` | `Number` | Template, Required | The Chargify id of the customer | # Response Type **200**: OK [`Portal Management Link`](https://developers.maxio.com/http/advanced-billing-api/models/structures/portal-management-link) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/portal/customers/150/management_link.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "url": "https://www.billingportal.com/manage/19804639/1517596469/bd16498719a7d3e6", "fetch_count": 1, "created_at": "2018-02-02T18:34:29Z", "new_link_available_at": "2018-02-17T18:34:29Z", "expires_at": "2018-04-08T17:34:29Z", "last_invite_sent_at": "2018-02-02T18:34:29Z" } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 429 | Too Many Requests | [`Too Many Management Link Requests ErrorException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/too-many-management-link-requests-error) | ##### Resend Billing Portal Invitation Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/billing-portal/resend-billing-portal-invitation Resends a customer's Billing Portal invitation. If you attempt to resend an invitation 5 times within 30 minutes, you will receive a `422` response with an `error` message in the body. If you attempt to resend an invitation when the Billing Portal is already disabled for a Customer, you will receive a `422` error response. If you attempt to resend an invitation when the Customer does not exist, you will receive a `404` error response. ## Limitations This endpoint will only return a JSON response. ```http POST /portal/customers/{customer_id}/invitations/invite.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `customer_id` | `Number` | Template, Required | The Chargify id of the customer | # Response Type **200**: OK [`Resent Invitation`](https://developers.maxio.com/http/advanced-billing-api/models/structures/resent-invitation) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/portal/customers/150/invitations/invite.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "last_sent_at": "enim Duis esse dolore", "last_accepted_at": "adipisicing magna do in irure", "send_invite_link_text": "veniam sit", "uninvited_count": 66254678 } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Revoke Billing Portal Access Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/billing-portal/revoke-billing-portal-access Revokes a customer's Billing Portal invitation. If you attempt to revoke an invitation when the Billing Portal is already disabled for a Customer, you will receive a 422 error response. ## Limitations This endpoint will only return a JSON response. ```http DELETE /portal/customers/{customer_id}/invitations/revoke.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `customer_id` | `Number` | Template, Required | The Chargify id of the customer | # Response Type **200**: OK [`Revoked Invitation`](https://developers.maxio.com/http/advanced-billing-api/models/structures/revoked-invitation) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/portal/customers/150/invitations/revoke.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "last_sent_at": "Not Invited", "last_accepted_at": "Invite Revoked", "uninvited_count": 8 } ``` #### Coupons ##### Create Coupon Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/create-coupon Creates a coupon under the specified product family. You can create either a flat amount coupon, by specifying `amount_in_cents`, or percentage coupon by specifying `percentage`. See [Apply Coupons to Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions) for information on applying a coupon to a subscription in the Advanced Billing UI. ```http POST /product_families/{product_family_id}/coupons.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | | `body` | [`Coupon Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-request) | Body, Optional | - | # Response Type **201**: Created [`Coupon Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/product_families/140/coupons.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "coupon": { "name": "15% off", "code": "15OFF", "description": "15% off for life", "percentage": 15.0, "allow_negative_balance": false, "recurring": false, "end_date": "2012-08-29", "product_family_id": "2", "stackable": true, "compounding_strategy": "compound", "exclude_mid_period_allocations": true, "apply_on_cancel_at_end_of_period": true }, "restricted_products": { "1": true }, "restricted_components": { "1": true, "2": false } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Coupons for Product Family Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/list-coupons-for-product-family Lists coupons for a specific product family in a site. ```http GET /product_families/{product_family_id}/coupons.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `filter` | [`List Coupons Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-coupons-filter) | Query, Optional | Filter to use for List Coupons operations | | `currency_prices` | `Boolean` | Query, Optional | (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. Use in query `currency_prices=true`. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/product_families/140/coupons.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'filter[start_date]=2011-12-17' \ -d 'filter[end_date]=2011-12-15' \ -d 'filter[start_datetime]=2011-12-19T10%3A15%3A30%2B01%3A00' \ -d 'filter[end_datetime]=2019-06-07T17%3A20%3A06Z' \ -d 'filter[ids]=1%2C2%2C3' \ -d 'filter[codes]=free%2Cfree_trial' \ -d 'currency_prices=true' ``` # Example Response *(as JSON)* ```json [ { "coupon": { "id": 999999, "name": "50% coupon", "code": "50PERCENT", "description": "50 PERCENT OFF", "amount_in_cents": null, "product_family_id": 527890, "created_at": "2016-10-21T17:02:08-04:00", "updated_at": "2016-10-21T17:06:11-04:00", "start_date": "2016-10-21T17:02:08-04:00", "end_date": null, "percentage": "50", "recurring": true, "duration_period_count": null, "duration_interval": 1, "duration_interval_unit": "day", "allow_negative_balance": true, "archived_at": null, "conversion_limit": "100", "stackable": false, "compounding_strategy": "compound", "use_site_exchange_rate": true } }, { "coupon": { "id": 123456, "name": "100% coupon", "code": "100PERCENT", "description": "100 PERCENT OFF", "amount_in_cents": null, "product_family_id": 527890, "created_at": "2016-10-21T17:02:08-04:00", "updated_at": "2016-10-21T17:06:11-04:00", "start_date": "2016-10-21T17:02:08-04:00", "end_date": null, "percentage": "50", "recurring": true, "duration_period_count": null, "duration_interval": 1, "duration_interval_unit": "day", "allow_negative_balance": true, "archived_at": null, "conversion_limit": "100", "stackable": false, "compounding_strategy": "compound", "use_site_exchange_rate": true } }, { "coupon": { "id": 888888, "name": "25% coupon", "code": "25PERCENT", "description": "25 PERCENT OFF", "amount_in_cents": null, "product_family_id": 527890, "created_at": "2016-10-21T17:02:08-04:00", "updated_at": "2016-10-21T17:06:11-04:00", "start_date": "2016-10-21T17:02:08-04:00", "end_date": null, "percentage": "25", "recurring": true, "duration_period_count": null, "duration_interval": 1, "duration_interval_unit": "day", "allow_negative_balance": true, "archived_at": null, "conversion_limit": "100", "stackable": false, "compounding_strategy": "compound", "coupon_restrictions": [ { "id": 37, "item_type": "Component", "item_id": 519, "name": "test", "handle": null } ], "use_site_exchange_rate": true } } ] ``` ##### Find Coupon Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/find-coupon Searches for a coupon by code. If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, you need to specify (either in the URL or as a query string param) the `product_family_id`. ```http GET /coupons/find.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Query, Optional | The Advanced Billing id of the product family to which the coupon belongs | | `code` | `String` | Query, Optional | The code of the coupon | | `currency_prices` | `Boolean` | Query, Optional | (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. | # Response Type **200**: OK [`Coupon Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/coupons/find.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'currency_prices=true' ``` ##### Read Coupon Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/read-coupon Returns a coupon by its system-assigned ID. You must identify the Coupon in this call by the ID parameter assigned to it. If instead you would like to find a Coupon using a Coupon code, use the [Find Coupon](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/find-coupon) endpoint. If the coupon is set to `use_site_exchange_rate: true`, it returns pricing based on the current exchange rate. If the flag is set to false, it returns all of the defined prices for each currency. ```http GET /product_families/{product_family_id}/coupons/{coupon_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | | `coupon_id` | `Number` | Template, Required | The Advanced Billing id of the coupon | | `currency_prices` | `Boolean` | Query, Optional | (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. | # Response Type **200**: OK [`Coupon Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/product_families/140/coupons/162.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'currency_prices=true' ``` # Example Response *(as JSON)* ```json { "coupon": { "id": 67, "name": "Foo Bar", "code": "YEPPER99934", "description": "my cool coupon", "amount_in_cents": null, "product_family_id": 4, "product_family_name": "Billing Plans", "created_at": "2017-11-08T10:01:15-05:00", "updated_at": "2017-11-08T10:01:15-05:00", "start_date": "2017-11-08T10:01:15-05:00", "end_date": null, "percentage": "33.3333", "duration_period_count": null, "duration_interval": null, "duration_interval_unit": null, "allow_negative_balance": false, "archived_at": null, "conversion_limit": null, "stackable": true, "compounding_strategy": "compound" } } ``` ##### Update Coupon Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/update-coupon Updates a coupon. You can restrict a coupon to only apply to specific products / components by optionally passing in hashes of `restricted_products` and/or `restricted_components` in the format: `{ "": boolean_value }` ```http PUT /product_families/{product_family_id}/coupons/{coupon_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | | `coupon_id` | `Number` | Template, Required | The Advanced Billing id of the coupon | | `body` | [`Coupon Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-request) | Body, Optional | - | # Response Type **200**: OK [`Coupon Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/product_families/140/coupons/162.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "coupon": { "name": "15% off", "code": "15OFF", "description": "15% off for life", "percentage": 15.0, "allow_negative_balance": false, "recurring": false, "end_date": "2012-08-29", "product_family_id": "2", "stackable": true, "compounding_strategy": "compound" }, "restricted_products": { "1": true }, "restricted_components": { "1": true, "2": false } }' ``` # Example Response *(as JSON)* ```json { "coupon": { "id": 67, "name": "Foo Bar", "code": "YEPPER99934", "description": "my cool coupon", "amount_in_cents": 10000, "product_family_id": 4, "created_at": "2017-11-08T10:01:15-05:00", "updated_at": "2017-11-08T10:01:15-05:00", "start_date": "2017-11-08T10:01:15-05:00", "end_date": null, "percentage": null, "recurring": false, "duration_period_count": null, "duration_interval": null, "duration_interval_unit": null, "allow_negative_balance": false, "archived_at": null, "conversion_limit": null, "stackable": true, "compounding_strategy": "compound" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Archive Coupon Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/archive-coupon Archives a coupon, making it unavailable for future use while remaining active on existing subscriptions. Archiving makes that Coupon unavailable for future use, but allows it to remain attached and functional on existing Subscriptions that are using it. The `archived_at` date and time will be assigned. ```http DELETE /product_families/{product_family_id}/coupons/{coupon_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | | `coupon_id` | `Number` | Template, Required | The Advanced Billing id of the coupon | # Response Type **200**: OK [`Coupon Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/product_families/140/coupons/162.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "coupon": { "id": 67, "name": "Foo Bar", "code": "YEPPER99934", "description": "my cool coupon", "amount_in_cents": 10000, "product_family_id": 4, "created_at": "2017-11-08T10:01:15-05:00", "updated_at": "2017-11-08T10:01:15-05:00", "start_date": "2017-11-08T10:01:15-05:00", "end_date": null, "percentage": null, "recurring": false, "duration_period_count": null, "duration_interval": null, "duration_interval_unit": null, "allow_negative_balance": false, "archived_at": "2016-12-02T13:09:33-05:00", "conversion_limit": null, "stackable": true, "compounding_strategy": "compound" } } ``` ##### List Coupons Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/list-coupons Lists coupons for a site. ```http GET /coupons.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `filter` | [`List Coupons Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-coupons-filter) | Query, Optional | Filter to use for List Coupons operations | | `currency_prices` | `Boolean` | Query, Optional | (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. Use in query `currency_prices=true`. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/coupons.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'filter[start_date]=2011-12-17' \ -d 'filter[end_date]=2011-12-15' \ -d 'filter[start_datetime]=2011-12-19T10%3A15%3A30%2B01%3A00' \ -d 'filter[end_datetime]=2019-06-07T17%3A20%3A06Z' \ -d 'filter[ids]=1%2C2%2C3' \ -d 'filter[codes]=free%2Cfree_trial' \ -d 'currency_prices=true' ``` # Example Response *(as JSON)* ```json [ { "coupon": { "id": 0, "name": "string", "code": "string", "description": "string", "amount": 0, "amount_in_cents": 0, "product_family_id": 0, "product_family_name": "string", "start_date": "2021-05-03T16:00:21-04:00", "end_date": "2023-05-05T16:00:21-04:00", "percentage": "10", "recurring": true, "recurring_scheme": "do_not_recur", "duration_period_count": 0, "duration_interval": 0, "duration_interval_unit": "string", "duration_interval_span": "string", "allow_negative_balance": true, "archived_at": null, "conversion_limit": "string", "stackable": true, "compounding_strategy": "compound", "use_site_exchange_rate": true, "created_at": "2021-05-05T16:00:21-04:00", "updated_at": "2021-05-05T16:00:21-04:00", "discount_type": "amount", "exclude_mid_period_allocations": true, "apply_on_cancel_at_end_of_period": true, "coupon_restrictions": [ { "id": 0, "item_type": "Component", "item_id": 0, "name": "string", "handle": "string" } ] } } ] ``` ##### Read Coupon Usage Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/read-coupon-usage Lists coupon usage details, one entry per product. ```http GET /product_families/{product_family_id}/coupons/{coupon_id}/usage.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs. | | `coupon_id` | `Number` | Template, Required | The Advanced Billing id of the coupon. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-usage) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/product_families/140/coupons/162/usage.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json [ { "name": "No cost product", "id": 3903594, "signups": 0, "savings": 0, "savings_in_cents": 0, "revenue": 0, "revenue_in_cents": 0 }, { "name": "Product that expires", "id": 3853680, "signups": 0, "savings": 0, "savings_in_cents": 0, "revenue": 0, "revenue_in_cents": 0 }, { "name": "Trial Product", "id": 3861800, "signups": 1, "savings": 30, "savings_in_cents": 3000, "revenue": 20, "revenue_in_cents": 2000 } ] ``` ##### Validate Coupon Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/validate-coupon Verifies whether a specific coupon code is valid. This method is useful for validating coupon codes that are entered by a customer. If you have more than one product family and if the coupon you are validating does not belong to the first product family in your site, you need to specify the product family, either in the URL or as a query string param. This can be done by supplying the id or the handle in the `handle:my-family` format. Supplying the `product_family_handle` in the URL: ``` https://.chargify.com/product_families/handle:/coupons/validate.?code= ``` Supplying the `product_family_id` as a query parameter: ``` https://.chargify.com/coupons/validate.?code=&product_family_id= ``` ```http GET /coupons/validate.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `code` | `String` | Query, Required | The code of the coupon | | `product_family_id` | `Number` | Query, Optional | The Advanced Billing id of the product family to which the coupon belongs | # Response Type **200**: OK [`Coupon Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/coupons/validate.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'code=code8' ``` # Example Response *(as JSON)* ```json { "coupon": { "id": 66, "name": "Foo Bar", "code": "YEPPER9993", "description": "my cool coupon", "amount_in_cents": 10000, "product_family_id": 4, "created_at": "2017-11-07T14:51:52-05:00", "updated_at": "2017-11-07T15:14:24-05:00", "start_date": "2017-11-07T14:51:52-05:00", "end_date": null, "percentage": null, "recurring": false, "duration_period_count": null, "duration_interval": null, "duration_interval_unit": null, "allow_negative_balance": false, "archived_at": null, "conversion_limit": null, "stackable": true, "compounding_strategy": "full-price" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | [`Single String Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-string-error-response) | ##### Create or Update Coupon Currency Prices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/create-or-update-coupon-currency-prices Creates and/or updates currency prices for an existing coupon. Multiple prices can be created or updated in a single request but each of the currencies must be defined on the site level already and the coupon must be an amount-based coupon, not percentage. Currency pricing for coupons must mirror the setup of the primary coupon pricing - if the primary coupon is percentage based, you will not be able to define pricing in non-primary currencies. ```http PUT /coupons/{coupon_id}/currency_prices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `coupon_id` | `Number` | Template, Required | The Advanced Billing id of the coupon | | `body` | [`Coupon Currency Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency-request) | Body, Optional | - | # Response Type **200**: OK [`Coupon Currency Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/coupons/162/currency_prices.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "currency_prices": [ { "currency": "EUR", "price": 10 }, { "currency": "GBP", "price": 9 } ] }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error String Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-string-map-response) | ##### Create Coupon Subcodes Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/create-coupon-subcodes Creates subcodes for an existing coupon. Coupon Subcodes allow you to create a set of unique codes that allow you to expand the use of one coupon. For example: Master Coupon Code: + SPRING2020 Coupon Subcodes: + SPRING90210 + DP80302 + SPRINGBALTIMORE When creating a coupon subcode, you must specify a coupon to attach it to using the coupon_id. Valid coupon subcodes are all capital letters, contain only letters and numbers, and do not have any spaces. Lowercase letters are capitalized before the subcode is created. Note: If you are using any of the allowed special characters ("%", "@", "+", "-", "_", and "."), you must encode them for use in the URL. % to %25 @ to %40 + to %2B - to %2D _ to %5F . to %2E So, if the coupon subcode is `20%OFF`, the URL to delete this coupon subcode would be: `https://.chargify.com/coupons/567/codes/20%25OFF.`. For more information on coupon codes and applying coupons to subscriptions, see [Coupon Codes](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupon-Codes) and [Coupons and Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions). ```http POST /coupons/{coupon_id}/codes.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `coupon_id` | `Number` | Template, Required | The Advanced Billing id of the coupon | | `body` | [`Coupon Subcodes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-subcodes) | Body, Optional | - | # Response Type **200**: OK [`Coupon Subcodes Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-subcodes-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/coupons/162/codes.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "codes": [ "BALTIMOREFALL", "ORLANDOFALL", "DETROITFALL" ] }' ``` # Example Response *(as JSON)* ```json { "created_codes": [ "BALTIMOREFALL", "ORLANDOFALL", "DETROITFALL" ] } ``` ##### List Coupon Subcodes Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/list-coupon-subcodes Lists the subcodes attached to a coupon. ```http GET /coupons/{coupon_id}/codes.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `coupon_id` | `Number` | Template, Required | The Advanced Billing id of the coupon | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | # Response Type **200**: OK [`Coupon Subcodes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-subcodes) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/coupons/162/codes.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json { "codes": [ "3JU6PR", "9RO6MP", "8OG1VV", "5FL7VV", "2SV8XK", "4LW8LH", "3VL4GZ", "9UI9XO", "0LZ0CC", "8XI9JV", "9UV5YE", "3UI4GX", "6SL5ST", "9WC8IJ", "2KA3PZ", "7WR1VR", "3VY7MN", "6KC3KB", "7DF7YT", "9FH1ED" ] } ``` ##### Update Coupon Subcodes Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/update-coupon-subcodes Updates the subcodes for a coupon, replacing all existing subcodes with the new list. Send an array of new coupon subcodes. **Note**: All current subcodes for that Coupon will be deleted first, and replaced with the list of subcodes sent to this endpoint. The response will contain: + The created subcodes, + Subcodes that were not created because they already exist, + Any subcodes not created because they are invalid. ```http PUT /coupons/{coupon_id}/codes.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `coupon_id` | `Number` | Template, Required | The Advanced Billing id of the coupon | | `body` | [`Coupon Subcodes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-subcodes) | Body, Optional | - | # Response Type **200**: OK [`Coupon Subcodes Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-subcodes-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/coupons/162/codes.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "codes": [ "AAAA", "BBBB", "CCCC" ] }' ``` ##### Delete Coupon Subcode Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/delete-coupon-subcode Deletes a specific subcode from a coupon. ## Example Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the URL to `DELETE` this coupon subcode would be: ``` http://subdomain.chargify.com/coupons/567/codes/20OFF. ``` Note: If you are using any of the allowed special characters (“%”, “@”, “+”, “-”, “_”, and “.”), you must encode them for use in the URL. | Special character | Encoding | |-------------------|----------| | % | %25 | | @ | %40 | | + | %2B | | – | %2D | | _ | %5F | | . | %2E | ## Percent Encoding Example Or if the coupon subcode is 20%OFF, the URL to delete this coupon subcode would be: @https://.chargify.com/coupons/567/codes/20%25OFF.. ```http DELETE /coupons/{coupon_id}/codes/{subcode}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `coupon_id` | `Number` | Template, Required | The Advanced Billing id of the coupon to which the subcode belongs | | `subcode` | `String` | Template, Required | The subcode of the coupon | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/coupons/162/codes/subcode4.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | #### Component Features ##### List Component Features Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-features/list-component-features Returns the feature catalog items attached to this component, including price-point-specific overrides. ```http GET /components/{component_id}/features.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component. | # Response Type **200**: OK [`Feature Catalog Items List Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-items-list-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/components/222/features.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | ##### Create Component Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-features/create-component-feature Attaches a feature template to this component with a concrete value. Pass `price_point_type: "PricePoint"` and `price_point_id` to create an override scoped to a single component price point instead of the whole component. ```http POST /components/{component_id}/features.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component. | | `body` | [`Create Feature Catalog Item Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-feature-catalog-item-request) | Body, Optional | The owning product or component is taken from the URL and must not be included in the request body. | # Response Type **201**: Created [`Feature Catalog Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/components/222/features.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "feature": { "feature_template_id": 196, "value": "value6", "propagate_to_subscriptions": false } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Component Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-features/read-component-feature Returns a single feature catalog item attached to this component. ```http GET /components/{component_id}/features/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component. | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature catalog item. | # Response Type **200**: OK [`Feature Catalog Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/components/222/features/112.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | ##### Update Component Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-features/update-component-feature Updates the value or periodicity of a feature catalog item attached to this component. ```http PUT /components/{component_id}/features/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component. | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature catalog item. | | `body` | [`Update Feature Catalog Item Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-feature-catalog-item-request) | Body, Optional | - | # Response Type **200**: OK [`Feature Catalog Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/components/222/features/112.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "feature": { "propagate_to_subscriptions": false } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Remove Component Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-features/remove-component-feature Removes a feature catalog item from this component. ```http DELETE /components/{component_id}/features/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component. | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature catalog item. | | `destroy_entitlements` | `Boolean` | Query, Optional | When `true`, permanently deletes this feature catalog item and every entitlement it created, revoking subscriber access immediately. When `false` (default), the feature catalog item is archived and existing entitlements are preserved.

**Default**: `false` | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE -G \ --url 'https://subdomain.chargify.com/components/222/features/112.json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'destroy_entitlements=false' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | ##### Restore Component Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-features/restore-component-feature Returns `422` if the parent feature template is still archived — restore the feature template first. ```http POST /components/{component_id}/features/{id}/restore.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component. | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature catalog item. | # Response Type **200**: OK [`Feature Catalog Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/components/222/features/112/restore.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Components ##### Create Metered Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/create-metered-component Creates a metered component definition under the specified product family. A metered component can then be added and “allocated” for a subscription. Metered components are used to bill for any type of unit that resets to 0 at the end of the billing period (think daily Google Ads clicks or monthly cell phone minutes). This is most commonly associated with usage-based billing and many other pricing schemes. Note that this is different from recurring quantity-based components, which DO NOT reset to zero at the start of every billing period. If you want to bill for a quantity of something that does not change unless you change it, then you want quantity components, instead. #### Hybrid Pricing A `volume`, `tiered`, or `stairstep` metered component can combine its primary pricing with a secondary pricing model (the `overage_pricing` parameter) so both bill as a single invoice line item instead of two. This does not apply to metered components configured for event-based billing (metric, meter, or formula). See [Hybrid Pricing](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/hybrid-pricing) for requirements and configuration details. For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. ```http POST /product_families/{product_family_id}/metered_components.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `String` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | | `body` | [`Create Metered Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metered-component) | Body, Optional | - | # Response Type **201**: Created [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/product_families/product_family_id4/metered_components.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "metered_component": { "name": "Text messages", "unit_name": "text message", "pricing_scheme": "per_unit", "taxable": false, "prices": [ { "starting_quantity": 1, "unit_price": 1.0 } ] } }' ``` # Example Response *(as JSON)* ```json { "component": { "id": 292609, "name": "Text messages", "handle": "text-messages", "pricing_scheme": "per_unit", "unit_name": "unit", "unit_price": "10.0", "product_family_id": 528484, "product_family_name": "Cloud Compute Servers", "price_per_unit_in_cents": null, "kind": "metered_component", "archived": false, "taxable": false, "description": null, "default_price_point_id": 2944263, "prices": [ { "id": 55423, "component_id": 30002, "starting_quantity": 1, "ending_quantity": null, "unit_price": "10.0", "price_point_id": 2944263, "formatted_unit_price": "$10.00", "segment_id": null } ], "price_point_count": 1, "price_points_url": "https://demo-3238403362.chargify.com/components/30002/price_points", "default_price_point_name": "Original", "tax_code": null, "recurring": false, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2024-01-23T06:08:05-05:00", "updated_at": "2024-01-23T06:08:05-05:00", "archived_at": null, "hide_date_range_on_invoice": false, "allow_fractional_quantities": false, "use_site_exchange_rate": true, "item_category": null, "accounting_code": null } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Create Quantity Based Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/create-quantity-based-component Creates a Quantity Based component definition under the specified product family. A Quantity Based component can then be added and “allocated” for a subscription. When defining a Quantity Based component, you can choose one of two types: #### Recurring Recurring quantity-based components are used to bill for the number of some unit (think monthly software user licenses or the number of pairs of socks in a box-a-month club). This is most commonly associated with billing for user licenses, number of users, number of employees, etc. #### One-time One-time quantity-based components are used to create ad hoc usage charges that do not recur. For example, at the time of signup, you might want to charge your customer a one-time fee for onboarding or other services. The allocated quantity for one-time quantity-based components immediately gets reset back to zero after the allocation is made. For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). #### Hybrid Pricing A `volume`, `tiered`, or `stairstep` component can combine its primary pricing with a secondary pricing model (the `overage_pricing` parameter) so both bill as a single invoice line item instead of two. See [Hybrid Pricing](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/hybrid-pricing) for requirements and configuration details. For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. ```http POST /product_families/{product_family_id}/quantity_based_components.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `String` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | | `body` | [`Create Quantity Based Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-quantity-based-component) | Body, Optional | - | # Response Type **201**: Created [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/product_families/product_family_id4/quantity_based_components.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "quantity_based_component": { "name": "Quantity Based Component", "unit_name": "Component", "description": "Example of JSON per-unit component example", "pricing_scheme": "per_unit", "unit_price": "10", "taxable": true, "display_on_hosted_page": true, "allow_fractional_quantities": true, "public_signup_page_ids": [ 323397 ] } }' ``` # Example Response *(as JSON)* ```json { "component": { "id": 292609, "name": "Text messages", "handle": "text-messages", "pricing_scheme": "per_unit", "unit_name": "unit", "unit_price": "10.0", "product_family_id": 528484, "product_family_name": "Cloud Compute Servers", "price_per_unit_in_cents": null, "kind": "quantity_based_component", "archived": false, "taxable": false, "description": null, "default_price_point_id": 2944263, "prices": [ { "id": 55423, "component_id": 30002, "starting_quantity": 1, "ending_quantity": null, "unit_price": "10.0", "price_point_id": 2944263, "formatted_unit_price": "$10.00", "segment_id": null } ], "price_point_count": 1, "price_points_url": "https://demo-3238403362.chargify.com/components/30002/price_points", "default_price_point_name": "Original", "tax_code": null, "recurring": false, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2024-01-23T06:08:05-05:00", "updated_at": "2024-01-23T06:08:05-05:00", "archived_at": null, "hide_date_range_on_invoice": false, "allow_fractional_quantities": false, "use_site_exchange_rate": true, "item_category": null, "accounting_code": null } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Create On Off Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/create-on-off-component Creates an On/Off component definition under the specified product family. An On/Off component can then be added and “allocated” for a subscription. On/off components are used for any flat fee, recurring add on (think $99/month for tech support or a flat add on shipping fee). For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. ```http POST /product_families/{product_family_id}/on_off_components.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `String` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | | `body` | [`Create on Off Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-on-off-component) | Body, Optional | - | # Response Type **201**: Created [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/product_families/product_family_id4/on_off_components.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "on_off_component": { "name": "Annual Support Services", "description": "Prepay for support services", "taxable": true, "unit_price": "100.00", "display_on_hosted_page": true, "public_signup_page_ids": [ 320495 ] } }' ``` # Example Response *(as JSON)* ```json { "component": { "id": 292609, "name": "Test On-Off Component 46124", "handle": "test-on-off-component-4612422802", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "10.0", "product_family_id": 528484, "product_family_name": "Cloud Compute Servers", "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": false, "description": null, "default_price_point_id": 2944263, "price_point_count": 1, "price_points_url": "https://demo-3238403362.chargify.com/components/30002/price_points", "default_price_point_name": "Original", "tax_code": null, "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2024-01-23T06:08:05-05:00", "updated_at": "2024-01-23T06:08:05-05:00", "archived_at": null, "hide_date_range_on_invoice": false, "allow_fractional_quantities": false, "use_site_exchange_rate": true, "item_category": null, "accounting_code": null } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Create Prepaid Usage Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/create-prepaid-usage-component Creates a prepaid usage component definition under the specified product family. A prepaid component can then be added and “allocated” for a subscription. Prepaid components allow customers to pre-purchase units that can be used up over time on their subscription. In a sense, they are the mirror image of metered components; while metered components charge at the end of the period for the amount of units used, prepaid components are charged for at the time of purchase, and usage is subsequently tracked against the amount purchased. For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`; sending a blank value results in a validation error. ```http POST /product_families/{product_family_id}/prepaid_usage_components.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `String` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | | `body` | [`Create Prepaid Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepaid-component) | Body, Optional | - | # Response Type **201**: Created [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/product_families/product_family_id4/prepaid_usage_components.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "prepaid_usage_component": { "name": "Minutes", "unit_name": "minutes", "unit_price": 2.0, "pricing_scheme": "per_unit", "rollover_prepaid_remainder": true, "renew_prepaid_allocation": true, "expiration_interval": 15.0, "expiration_interval_unit": "day", "overage_pricing": { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 1, "ending_quantity": 100, "unit_price": 3.0 }, { "starting_quantity": 101, "unit_price": 5.0 } ] } } }' ``` # Example Response *(as JSON)* ```json { "component": { "id": 292609, "name": "Test Prepaid Component 98505", "handle": "test-prepaid-component-9850584842", "pricing_scheme": "per_unit", "unit_name": "unit", "unit_price": "10.0", "product_family_id": 528484, "product_family_name": "Test Product Family 27791", "price_per_unit_in_cents": null, "kind": "prepaid_usage_component", "archived": false, "taxable": false, "description": "Description for: Test Prepaid Component 98505", "default_price_point_id": 2944263, "overage_prices": [ { "id": 55964, "component_id": 30427, "starting_quantity": 1, "ending_quantity": null, "unit_price": "1.0", "price_point_id": 2944756, "formatted_unit_price": "$1.00", "segment_id": null } ], "prices": [ { "id": 55963, "component_id": 30427, "starting_quantity": 1, "ending_quantity": null, "unit_price": "1.0", "price_point_id": 2944756, "formatted_unit_price": "$1.00", "segment_id": null } ], "price_point_count": 1, "price_points_url": "https://demo-3238403362.chargify.com/components/30002/price_points", "default_price_point_name": "Original", "tax_code": null, "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2024-01-23T06:08:05-05:00", "updated_at": "2024-01-23T06:08:05-05:00", "archived_at": null, "hide_date_range_on_invoice": false, "allow_fractional_quantities": false, "use_site_exchange_rate": true, "item_category": null, "accounting_code": null } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Create Event Based Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/create-event-based-component Creates an event-based component definition under the specified product family. An event-based component can then be added and “allocated” for a subscription. Event-based components are similar to other component types, in that you define the component parameters (such as name and taxability) and the pricing. A key difference for the event-based component is that it must be attached to a metric. This is because the metric provides the component with the actual quantity used in computing what and how much will be billed each period for each subscription. So, instead of reporting usage directly for each component (as you would with metered components), the usage is derived from analysis of your events. For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`; sending a blank value results in a validation error. ```http POST /product_families/{product_family_id}/event_based_components.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `String` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | | `body` | [`Create EBB Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-ebb-component) | Body, Optional | - | # Response Type **201**: Created [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/product_families/product_family_id4/event_based_components.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "event_based_component": { "name": "Component Name", "unit_name": "string", "description": "string", "handle": "some_handle", "taxable": true, "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 1, "unit_price": "0.49" } ], "event_based_billing_metric_id": 123 } }' ``` # Example Response *(as JSON)* ```json { "component": { "id": 1489581, "name": "stripeCharges", "handle": null, "pricing_scheme": null, "unit_name": "charge", "unit_price": null, "product_family_id": 1517093, "product_family_name": "Billing Plans", "price_per_unit_in_cents": null, "kind": "event_based_component", "archived": false, "taxable": false, "description": null, "default_price_point_id": null, "price_point_count": 0, "price_points_url": "https://staging.chargify.com/components/1489581/price_points", "default_price_point_name": "Original", "tax_code": null, "recurring": false, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2021-10-12T07:33:24-05:00", "updated_at": "2021-10-12T07:33:24-05:00", "archived_at": null, "hide_date_range_on_invoice": false, "allow_fractional_quantities": false, "use_site_exchange_rate": null, "item_category": null, "accounting_code": null, "event_based_billing_metric_id": 1163 } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Find Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/find-component Returns information for a component matching the provided handle. You can identify your components with a handle so you don't have to save or reference the IDs we generate. ```http GET /components/lookup.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `handle` | `String` | Query, Required | The handle of the component to find | # Response Type **200**: OK [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/components/lookup.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'handle=handle6' ``` # Example Response *(as JSON)* ```json { "component": { "id": 399853, "name": "Annual Support Services", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "100.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": true, "description": "Prepay for support services", "default_price_point_id": 121003, "price_point_count": 4, "price_points_url": "https://general-goods.chargify.com/components/399853/price_points", "tax_code": "D0000000", "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-02T05:54:53-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify" } } ``` ##### Read Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/read-component Returns information regarding a component from a specific product family. You can read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. ```http GET /product_families/{product_family_id}/components/{component_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family to which the component belongs | | `component_id` | `String` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | | `include_features` | `Boolean` | Query, Optional | When `true`, embeds the active feature catalog items for each result in a `features` array. Default value is `false`.

**Default**: `false` | # Response Type **200**: OK [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/product_families/140/components/component_id8.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'include_features=false' ``` # Example Response *(as JSON)* ```json { "component": { "id": 399853, "name": "Annual Support Services", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "100.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": true, "description": "Prepay for support services", "default_price_point_id": 121003, "price_point_count": 4, "price_points_url": "https://general-goods.chargify.com/components/399853/price_points", "tax_code": "D0000000", "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-02T05:54:53-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", "product_family_handle": "chargify" } } ``` ##### Update Product Family Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/update-product-family-component Updates a component from a specific product family. You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. ```http PUT /product_families/{product_family_id}/components/{component_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family to which the component belongs | | `component_id` | `String` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | | `body` | [`Update Component Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-request) | Body, Optional | - | # Response Type **200**: OK [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/product_families/140/components/component_id8.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "component": { "item_category": "Business Software" } }' ``` # Example Response *(as JSON)* ```json { "component": { "id": 399853, "name": "Annual Support Services", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "100.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": true, "description": "Prepay for support services", "default_price_point_id": 121003, "price_point_count": 4, "price_points_url": "https://general-goods.chargify.com/components/399853/price_points", "tax_code": "D0000000", "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-02T05:54:53-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Archive Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/archive-component Archives the component; all current subscribers will continue to be charged as usual. ```http DELETE /product_families/{product_family_id}/components/{component_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family to which the component belongs | | `component_id` | `String` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | # Response Type **200**: OK [`Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/product_families/140/components/component_id8.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "id": 25407138, "name": "cillum aute", "pricing_scheme": "stairstep", "unit_name": "nulla in", "unit_price": "Excepteur veniam", "product_family_id": -56705047, "kind": "prepaid_usage_component", "archived": true, "taxable": false, "description": "reprehenderit laborum qui fugiat", "default_price_point_id": -64328176, "price_point_count": 15252407, "price_points_url": "dolor mollit consequat", "tax_code": "ea nisi", "recurring": false, "created_at": "2016-11-08T16:22:26-05:00", "default_price_point_name": "cupidatat Lorem non aliqua", "product_family_name": "do elit", "hide_date_range_on_invoice": false } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Components Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/list-components Lists components for a site. ```http GET /components.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `date_field` | [`Basic Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) | Query, Optional | The type of filter you would like to apply to your search. | | `start_date` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `start_datetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `end_datetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `include_archived` | `Boolean` | Query, Optional | Include archived items. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`List Components Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-components-filter) | Query, Optional | Filter to use for List Components operations | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/components.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'date_field=updated_at' \ -d 'page=1' \ -d 'per_page=50' \ -d 'filter[ids]=1%2C2%2C3' ``` # Example Response *(as JSON)* ```json [ { "component": { "id": 399850, "name": "$1.00 component", "pricing_scheme": "per_unit", "unit_name": "Component", "unit_price": "1.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "quantity_based_component", "archived": false, "taxable": false, "description": "Component", "default_price_point_id": 121000, "prices": [ { "id": 630687, "component_id": 399850, "starting_quantity": 1, "ending_quantity": null, "unit_price": "1.0", "price_point_id": 121000, "formatted_unit_price": "$1.00" } ], "price_point_count": 2, "price_points_url": "https://general-goods.chargify.com/components/399850/price_points", "tax_code": null, "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", "product_family_handle": "chargify", "use_site_exchange_rate": true } }, { "component": { "id": 399853, "name": "Annual Support Services", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "100.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": true, "description": "Prepay for support services", "default_price_point_id": 121003, "price_point_count": 4, "price_points_url": "https://general-goods.chargify.com/components/399853/price_points", "tax_code": "D0000000", "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-01T09:35:37-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", "product_family_handle": "chargify", "use_site_exchange_rate": true } }, { "component": { "id": 386937, "name": "Cancellation fee", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "35.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": false, "description": "", "default_price_point_id": 108307, "price_point_count": 1, "price_points_url": "https://general-goods.chargify.com/components/386937/price_points", "tax_code": null, "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", "product_family_handle": "chargify", "use_site_exchange_rate": true } } ] ``` ##### Update Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/update-component Updates a component. You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. ```http PUT /components/{component_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `String` | Template, Required | The id or handle of the component | | `body` | [`Update Component Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-request) | Body, Optional | - | # Response Type **200**: OK [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/components/component_id8.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "component": { "item_category": "Business Software" } }' ``` # Example Response *(as JSON)* ```json { "component": { "id": 399853, "name": "Annual Support Services", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "100.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": true, "description": "Prepay for support services", "default_price_point_id": 121003, "price_point_count": 4, "price_points_url": "https://general-goods.chargify.com/components/399853/price_points", "tax_code": "D0000000", "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-02T05:54:53-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Components for Product Family Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/components/list-components-for-product-family Lists components for a particular product family. ```http GET /product_families/{product_family_id}/components.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `Number` | Template, Required | The Advanced Billing id of the product family | | `include_archived` | `Boolean` | Query, Optional | Include archived items. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`List Components Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-components-filter) | Query, Optional | Filter to use for List Components operations | | `date_field` | [`Basic Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=created_at`. | | `end_date` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `end_datetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `start_date` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `start_datetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/product_families/140/components.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'filter[ids]=1%2C2%2C3' \ -d 'date_field=updated_at' ``` # Example Response *(as JSON)* ```json [ { "component": { "id": 399850, "name": "$1.00 component", "pricing_scheme": "per_unit", "unit_name": "Component", "unit_price": "1.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "quantity_based_component", "archived": false, "taxable": false, "description": "Component", "default_price_point_id": 121000, "prices": [ { "id": 630687, "component_id": 399850, "starting_quantity": 1, "ending_quantity": null, "unit_price": "1.0", "price_point_id": 121000, "formatted_unit_price": "$1.00" } ], "price_point_count": 2, "price_points_url": "https://general-goods.chargify.com/components/399850/price_points", "tax_code": null, "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", "use_site_exchange_rate": true } }, { "component": { "id": 399853, "name": "Annual Support Services", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "100.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": true, "description": "Prepay for support services", "default_price_point_id": 121003, "price_point_count": 4, "price_points_url": "https://general-goods.chargify.com/components/399853/price_points", "tax_code": "D0000000", "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-01T09:35:37-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", "use_site_exchange_rate": true } }, { "component": { "id": 386937, "name": "Cancellation fee", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "35.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": false, "description": "", "default_price_point_id": 108307, "price_point_count": 1, "price_points_url": "https://general-goods.chargify.com/components/386937/price_points", "tax_code": null, "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", "use_site_exchange_rate": true } } ] ``` #### Component Price Points ##### Promote Component Price Point to Default Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/promote-component-price-point-to-default Sets a new default price point for the component. This new default will apply to all new subscriptions going forward - existing subscriptions will remain on their current price point. See [Price Points Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261191737101-Price-Points-Components) for more information on price points and moving subscriptions between price points. Note: Custom price points are not able to be set as the default for a component. ```http PUT /components/{component_id}/price_points/{price_point_id}/default.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component to which the price point belongs | | `price_point_id` | `Number` | Template, Required | The Advanced Billing id of the price point | # Response Type **200**: OK [`Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/components/222/price_points/10/default.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "component": { "id": 292609, "name": "Text messages", "pricing_scheme": "stairstep", "unit_name": "text message", "unit_price": null, "product_family_id": 528484, "price_per_unit_in_cents": null, "kind": "metered_component", "archived": false, "taxable": false, "description": null, "created_at": "2019-08-02T05:54:53-04:00", "prices": [ { "id": 47, "component_id": 292609, "starting_quantity": 1, "ending_quantity": null, "unit_price": "1.0", "price_point_id": 173, "formatted_unit_price": "$1.00" } ], "default_price_point_name": "Original" } } ``` ##### Create Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/create-component-price-point Creates a price point for an existing component. ```http POST /components/{component_id}/price_points.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component | | `body` | [`Create Component Price Point Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-point-request) | Body, Optional | - | # Response Type **200**: OK [`Component Price Point Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/components/222/price_points.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "price_point": { "name": "Wholesale", "handle": "wholesale-handle", "pricing_scheme": "stairstep", "use_site_exchange_rate": false, "prices": [ { "starting_quantity": "1", "ending_quantity": "100", "unit_price": "5.00" }, { "starting_quantity": "101", "ending_quantity": "200", "unit_price": "4.00" } ] } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### List Component Price Points Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/list-component-price-points Lists the price points associated with a component. You may specify the component by using either the numeric id or the `handle:gold` syntax. If the price point is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. ```http GET /components/{component_id}/price_points.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component | | `currency_prices` | `Boolean` | Query, Optional | Include an array of currency price data. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter[type]` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type) | Query, Optional | Use in query: `filter[type]=catalog,default`. | # Response Type **201**: Created [`Component Price Points Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-points-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/components/222/price_points.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'filter[type]=Liquid error: Value cannot be null. (Parameter 'key')' ``` # Example Response *(as JSON)* ```json { "price_points": [ { "id": 80, "default": false, "name": "Wholesale Two", "pricing_scheme": "per_unit", "component_id": 74, "handle": "wholesale-two", "archived_at": null, "created_at": "2017-07-05T13:55:40-04:00", "updated_at": "2017-07-05T13:55:40-04:00", "prices": [ { "id": 121, "component_id": 74, "starting_quantity": 1, "ending_quantity": null, "unit_price": "5.0" } ] }, { "id": 81, "default": false, "name": "MSRP", "pricing_scheme": "per_unit", "component_id": 74, "handle": "msrp", "archived_at": null, "created_at": "2017-07-05T13:55:40-04:00", "updated_at": "2017-07-05T13:55:40-04:00", "prices": [ { "id": 122, "component_id": 74, "starting_quantity": 1, "ending_quantity": null, "unit_price": "4.0" } ] } ] } ``` ##### Bulk Create Component Price Points Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/bulk-create-component-price-points Creates multiple component price points in one request. ```http POST /components/{component_id}/price_points/bulk.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `String` | Template, Required | The Advanced Billing id of the component for which you want to fetch price points. | | `body` | [`Create Component Price Points Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-points-request) | Body, Optional | - | # Response Type **200**: OK [`Component Price Points Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-points-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/components/component_id8/price_points/bulk.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "price_points": [ { "name": "Wholesale", "handle": "wholesale", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 1, "unit_price": 5.0 } ] }, { "name": "MSRP", "handle": "msrp", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 1, "unit_price": 4.0 } ] }, { "name": "Special Pricing", "handle": "special", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 1, "unit_price": 5.0 } ] } ] }' ``` # Example Response *(as JSON)* ```json { "price_points": [ { "id": 80, "default": false, "name": "Wholesale Two", "pricing_scheme": "per_unit", "component_id": 74, "handle": "wholesale-two", "archived_at": null, "created_at": "2017-07-05T13:55:40-04:00", "updated_at": "2017-07-05T13:55:40-04:00", "prices": [ { "id": 121, "component_id": 74, "starting_quantity": 1, "ending_quantity": null, "unit_price": "5.0" } ] }, { "id": 81, "default": false, "name": "MSRP", "pricing_scheme": "per_unit", "component_id": 74, "handle": "msrp", "archived_at": null, "created_at": "2017-07-05T13:55:40-04:00", "updated_at": "2017-07-05T13:55:40-04:00", "prices": [ { "id": 122, "component_id": 74, "starting_quantity": 1, "ending_quantity": null, "unit_price": "4.0" } ] } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Clone Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/clone-component-price-point Clones a component price point. Custom price points (tied to a specific subscription) cannot be cloned. The following attributes are copied from the source price point: - Pricing scheme - All price tiers (with starting/ending quantities and unit prices) - Tax included setting - Currency prices (if definitive pricing is set) - Overage pricing (for prepaid usage components) - Interval settings (if multi-frequency is enabled) - Event-based billing segments (if applicable) ```http POST /components/{component_id}/price_points/{price_point_id}/clone.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/clone-component-price-point-component-id) | Template, Required | The id or handle of the component. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle. | | `price_point_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/clone-component-price-point-price-point-id) | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-price_point-handle` for a string handle. | | `body` | [`Clone Component Price Point Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/clone-component-price-point-request) | Body, Optional | - | # Response Type **201**: Created [`Component Price Point Currency Overage Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-currency-overage-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/components/144/price_points/188/clone.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "price_point": { "name": "Pro Usage Tiered Clone" } }' ``` # Example Response *(as JSON)* ```json { "price_point": { "id": 9012, "name": "Pro Usage Tiered Clone", "type": "catalog", "pricing_scheme": "tiered", "component_id": 1234, "handle": "pro-usage-tiered-clone", "archived_at": null, "created_at": "2024-05-01T12:34:56-04:00", "updated_at": "2024-05-01T12:34:56-04:00", "use_site_exchange_rate": false, "currency_prices": [ { "id": 3001, "currency": "EUR", "price": "9.99", "formatted_price": "€9.99", "price_id": 4001, "price_point_id": 9012 } ], "currency_overage_prices": [ { "id": 3002, "currency": "EUR", "price": "2.50", "formatted_price": "€2.50", "price_id": 4002, "price_point_id": 9012 } ], "renew_prepaid_allocation": true, "rollover_prepaid_remainder": false, "expiration_interval": 1, "expiration_interval_unit": "month", "overage_pricing_scheme": "tiered", "subscription_id": 4321, "prices": [ { "id": 4001, "component_id": 1234, "starting_quantity": 1, "ending_quantity": 100, "unit_price": "9.99", "price_point_id": 9012, "formatted_unit_price": "$9.99", "segment_id": null } ], "overage_prices": [ { "id": 4002, "component_id": 1234, "starting_quantity": 101, "ending_quantity": null, "unit_price": "2.50", "price_point_id": 9012, "formatted_unit_price": "$2.50", "segment_id": null } ], "tax_included": false, "interval": 1, "interval_unit": "month" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Update Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/update-component-price-point Updates a component price point and its associated prices. Passing in a price bracket without an `id` will attempt to create a new price. Including an `id` will update the corresponding price, and including the `_destroy` flag set to true along with the `id` will remove that price. Note: Custom price points cannot be updated directly. They must be edited through the Subscription. ```http PUT /components/{component_id}/price_points/{price_point_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-component-price-point-component-id) | Template, Required | The id or handle of the component. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle. | | `price_point_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-component-price-point-price-point-id) | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-price_point-handle` for a string handle. | | `body` | [`Update Component Price Point Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-price-point-request) | Body, Optional | - | # Response Type **200**: OK [`Component Price Point Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/components/144/price_points/188.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "price_point": { "name": "Default", "prices": [ { "id": 1, "ending_quantity": 100, "unit_price": 5.0 }, { "id": 2, "_destroy": true }, { "starting_quantity": 101, "unit_price": 4.0 } ] } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### Read Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/read-component-price-point Returns details for a specific component price point. You can achieve this by using either the component price point ID or handle. ```http GET /components/{component_id}/price_points/{price_point_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-component-price-point-component-id) | Template, Required | The id or handle of the component. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle. | | `price_point_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-component-price-point-price-point-id) | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-price_point-handle` for a string handle. | | `currency_prices` | `Boolean` | Query, Optional | Include an array of currency price data. | # Response Type **200**: OK [`Component Price Point Currency Overage Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-currency-overage-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/components/144/price_points/188.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` ##### Archive Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/archive-component-price-point Archives a component price point. Subscriptions using a price point that has been archived will continue using it until they're moved to another price point. ```http DELETE /components/{component_id}/price_points/{price_point_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-component-price-point-component-id) | Template, Required | The id or handle of the component. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle. | | `price_point_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-component-price-point-price-point-id) | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-price_point-handle` for a string handle. | # Response Type **200**: OK [`Component Price Point Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-response) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/components/144/price_points/188.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "price_point": { "id": 79, "default": false, "name": "Wholesale", "pricing_scheme": "stairstep", "component_id": 74, "handle": "wholesale-handle", "archived_at": "2017-07-06T15:04:00-04:00", "created_at": "2017-07-05T13:44:30-04:00", "updated_at": "2017-07-05T13:44:30-04:00", "prices": [ { "id": 119, "component_id": 74, "starting_quantity": 1, "ending_quantity": 100, "unit_price": "5.0" }, { "id": 120, "component_id": 74, "starting_quantity": 101, "ending_quantity": null, "unit_price": "4.0" } ] } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Unarchive Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/unarchive-component-price-point Unarchives a component price point. ```http PUT /components/{component_id}/price_points/{price_point_id}/unarchive.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component to which the price point belongs | | `price_point_id` | `Number` | Template, Required | The Advanced Billing id of the price point | # Response Type **200**: OK [`Component Price Point Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/components/222/price_points/10/unarchive.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "price_point": { "id": 79, "default": false, "name": "Wholesale", "pricing_scheme": "stairstep", "component_id": 74, "handle": "wholesale-handle", "archived_at": null, "created_at": "2017-07-05T13:44:30-04:00", "updated_at": "2017-07-05T13:44:30-04:00", "prices": [ { "id": 119, "component_id": 74, "starting_quantity": 1, "ending_quantity": 100, "unit_price": "5.0" }, { "id": 120, "component_id": 74, "starting_quantity": 101, "ending_quantity": null, "unit_price": "4.0" } ] } } ``` ##### Create Currency Prices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/create-currency-prices Creates currency prices for a given currency defined at the site level. When creating currency prices, they need to mirror the structure of your primary pricing. For each price level defined on the component price point, there should be a matching price level created in the given currency. Note: Currency Prices are not able to be created for custom price points. ```http POST /price_points/{price_point_id}/currency_prices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `price_point_id` | `Number` | Template, Required | The Advanced Billing id of the price point | | `body` | [`Create Currency Prices Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-currency-prices-request) | Body, Optional | - | # Response Type **200**: OK [`Component Currency Prices Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-prices-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/price_points/10/currency_prices.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "currency_prices": [ { "currency": "EUR", "price": 50.0, "price_id": 20 }, { "currency": "EUR", "price": 40.0, "price_id": 21 } ] }' ``` # Example Response *(as JSON)* ```json { "currency_prices": [ { "id": 100, "currency": "EUR", "price": "123", "formatted_price": "€123,00", "price_id": 32669, "price_point_id": 25554 } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### Update Currency Prices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/update-currency-prices Updates currency prices for a given currency defined at the site level. Note: Currency Prices are not able to be updated for custom price points. ```http PUT /price_points/{price_point_id}/currency_prices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `price_point_id` | `Number` | Template, Required | The Advanced Billing id of the price point | | `body` | [`Update Currency Prices Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-currency-prices-request) | Body, Optional | - | # Response Type **200**: OK [`Component Currency Prices Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-prices-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/price_points/10/currency_prices.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "currency_prices": [ { "id": 100, "price": 51.0 }, { "id": 101, "price": 41.0 } ] }' ``` # Example Response *(as JSON)* ```json { "currency_prices": [ { "id": 100, "currency": "EUR", "price": "123", "formatted_price": "€123,00", "price_id": 32669, "price_point_id": 25554 } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### List All Component Price Points Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/component-price-points/list-all-component-price-points Lists all component price points belonging to a site. ```http GET /components_price_points.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `include` | [`List Components Price Points Include`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-components-price-points-include) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`List Price Points Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-price-points-filter) | Query, Optional | Filter to use for List PricePoints operations | # Response Type **200**: OK [`List Components Price Points Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-components-price-points-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/components_price_points.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'include=currency_prices' \ -d 'page=1' \ -d 'per_page=50' \ -d 'filter[start_date]=2011-12-17' \ -d 'filter[end_date]=2011-12-15' \ -d 'filter[start_datetime]=2011-12-19T10%3A15%3A30%2B01%3A00' \ -d 'filter[end_datetime]=2019-06-07T17%3A20%3A06Z' \ -d 'filter[type]=catalog%2Cdefault%2Ccustom' \ -d 'filter[ids]=1%2C2%2C3' ``` # Example Response *(as JSON)* ```json { "price_points": [ { "id": 1, "name": "Auto-created", "type": "default", "pricing_scheme": "per_unit", "component_id": 2, "handle": "auto-created", "archived_at": null, "created_at": "2021-02-21T11:05:57-05:00", "updated_at": "2021-02-21T11:05:57-05:00", "prices": [ { "id": 3, "component_id": 2, "starting_quantity": 0, "ending_quantity": null, "unit_price": "1.0", "price_point_id": 1, "formatted_unit_price": "$1.00", "segment_id": null } ], "tax_included": false } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Customers ##### Create Customer Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/create-customer Creates a new customer; can also be created alongside a new subscription. The only validation restriction is that you can only create one customer for a given reference value. If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you can choose to leave `reference` blank, and store the system-assigned unique ID for the customer, which is in the `id` attribute. For more information, see [Customer Details](https://maxio.zendesk.com/hc/en-us/articles/24252190590093-Customer-Details). ## Required Country Format Format the country attribute of the customer using the ISO Standard Country codes. Countries should be formatted as two characters. For more information, see [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes). ## Required State Format Format the state attribute of the customer using the ISO Standard State codes. + US States (two characters): see [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US). + States Outside the US (two to three characters): To find the correct state codes outside the US, go to [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and click on the link in the “ISO 3166-2 codes” column next to the country you wish to populate. ## Locale You can attribute a language/region to the customer to deliver invoices in any required language. For more information, see [Customer Locale](https://maxio.zendesk.com/hc/en-us/articles/24286672013709-Customer-Locale). ```http POST /customers.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Customer Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-customer-request) | Body, Optional | - | # Response Type **200**: OK [`Customer Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/customers.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "customer": { "first_name": "Martha", "last_name": "Washington", "email": "martha@example.com", "cc_emails": "george@example.com", "organization": "ABC, Inc.", "reference": "1234567890", "address": "123 Main Street", "address_2": "Unit 10", "city": "Anytown", "state": "MA", "zip": "02120", "country": "US", "phone": "555-555-1212", "locale": "es-MX" } }' ``` # Example Response *(as JSON)* ```json { "customer": { "first_name": "Cathryn", "last_name": "Parisian", "email": "Stella.McLaughlin6@example.net", "cc_emails": null, "organization": "Greenholt - Oberbrunner", "reference": null, "id": 76, "created_at": "2021-03-29T07:47:00-04:00", "updated_at": "2021-03-29T07:47:00-04:00", "address": "739 Stephon Bypass", "address_2": "Apt. 386", "city": "Sedrickchester", "state": "KY", "state_name": "Kentucky", "zip": "46979-7719", "country": "US", "country_name": "United States", "phone": "230-934-3685", "verified": false, "portal_customer_created_at": null, "portal_invite_last_sent_at": null, "portal_invite_last_accepted_at": null, "tax_exempt": false, "surcharging": false, "vat_number": null, "parent_id": null, "locale": "en-US" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Customer Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/customer-error-response) | ##### List Customers Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/list-customers Lists all customers associated with your site, or filters results using the search parameter. ## Find Customer Use the search feature with the `q` query parameter to retrieve an array of customers that matches the search query. Common use cases are: + Search by an email + Search by an Advanced Billing ID + Search by an organization + Search by a reference value from your application + Search by a first or last name To retrieve a single, exact match by reference, use the [lookup endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference). ```http GET /customers.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Direction to sort customers by time of creation | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 50. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `50`

**Constraints**: `<= 200` | | `date_field` | [`Basic Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `start_date` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `start_datetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns subscriptions with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `end_datetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns subscriptions with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `q` | `String` | Query, Optional | A search query by which to filter customers (can be an email, an ID, a reference, organization) | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/customers.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=30' \ -d 'date_field=updated_at' ``` # Example Response *(as JSON)* ```json [ { "customer": { "first_name": "Kayla", "last_name": "Test", "email": "kayla@example.com", "cc_emails": "john@example.com, sue@example.com", "organization": "", "reference": null, "id": 14126091, "created_at": "2016-10-04T15:22:27-04:00", "updated_at": "2016-10-04T15:22:30-04:00", "address": "", "address_2": "", "city": "", "state": "", "zip": "", "country": "", "phone": "", "verified": null, "portal_customer_created_at": "2016-10-04T15:22:29-04:00", "portal_invite_last_sent_at": "2016-10-04T15:22:30-04:00", "portal_invite_last_accepted_at": null, "tax_exempt": false, "surcharging": false } }, { "customer": { "first_name": "Nick ", "last_name": "Test", "email": "nick@example.com", "cc_emails": "john@example.com, sue@example.com", "organization": "", "reference": null, "id": 14254093, "created_at": "2016-10-13T16:52:51-04:00", "updated_at": "2016-10-13T16:52:54-04:00", "address": "", "address_2": "", "city": "", "state": "", "zip": "", "country": "", "phone": "", "verified": null, "portal_customer_created_at": "2016-10-13T16:52:54-04:00", "portal_invite_last_sent_at": "2016-10-13T16:52:54-04:00", "portal_invite_last_accepted_at": null, "tax_exempt": false, "surcharging": true, "parent_id": 123 } }, { "customer": { "first_name": "Don", "last_name": "Test", "email": "don@example.com", "cc_emails": "john@example.com, sue@example.com", "organization": "", "reference": null, "id": 14332342, "created_at": "2016-10-19T10:49:13-04:00", "updated_at": "2016-10-19T10:49:19-04:00", "address": "1737 15th St", "address_2": "", "city": "Boulder", "state": "CO", "zip": "80302", "country": "US", "phone": "", "verified": null, "portal_customer_created_at": "2016-10-19T10:49:19-04:00", "portal_invite_last_sent_at": "2016-10-19T10:49:19-04:00", "portal_invite_last_accepted_at": null, "tax_exempt": false, "surcharging": false, "parent_id": null } } ] ``` ##### Read Customer Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/read-customer Retrieves the Customer properties by Advanced Billing-generated Customer ID. ```http GET /customers/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Template, Required | The Advanced Billing id of the customer | # Response Type **200**: OK [`Customer Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/customers/112.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "customer": { "first_name": "Jane", "last_name": "Doe", "email": "jane@example.com", "cc_emails": "joe@example.com", "organization": "ABC, Inc.", "reference": "1234567890", "id": 88833369, "created_at": "2025-05-08T11:39:18-04:00", "updated_at": "2025-05-08T11:39:18-04:00", "address": "123 Main Street", "address_2": "Unit 10", "city": "Anytown", "state": "MA", "state_name": "Massachusetts", "zip": "02120", "country": "US", "country_name": "United States", "phone": "555-555-1212", "verified": false, "portal_customer_created_at": null, "portal_invite_last_sent_at": null, "portal_invite_last_accepted_at": null, "tax_exempt": false, "surcharging": false, "vat_number": null, "parent_id": null, "locale": "es-MX", "salesforce_id": null, "default_auto_renewal_profile_id": null } } ``` ##### Update Customer Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/update-customer Updates the customer. ```http PUT /customers/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Template, Required | The Advanced Billing id of the customer | | `body` | [`Update Customer Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-customer-request) | Body, Optional | - | # Response Type **200**: OK [`Customer Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/customers/112.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "customer": { "first_name": "Martha", "last_name": "Washington", "email": "martha.washington@example.com" } }' ``` # Example Response *(as JSON)* ```json { "customer": { "first_name": "Martha", "last_name": "Washington", "email": "martha.washington@example.com", "cc_emails": "george.washington@example.com", "organization": null, "reference": null, "id": 14967442, "created_at": "2016-12-05T10:33:07-05:00", "updated_at": "2016-12-05T10:38:00-05:00", "address": null, "address_2": null, "city": null, "state": null, "zip": null, "country": null, "phone": null, "verified": false, "portal_customer_created_at": null, "portal_invite_last_sent_at": null, "portal_invite_last_accepted_at": null, "tax_exempt": false, "surcharging": false, "vat_number": "012345678" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Customer Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/customer-error-response) | ##### Delete Customer Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/delete-customer Deletes the customer. ```http DELETE /customers/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Template, Required | The Advanced Billing id of the customer | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/customers/112.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` ##### Read Customer by Reference Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/read-customer-by-reference Returns a customer by their unique reference ID. It will return a single match. ```http GET /customers/lookup.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `reference` | `String` | Query, Required | Customer reference | # Response Type **200**: OK [`Customer Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/customers/lookup.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'reference=reference4' ``` ##### List Customer Subscriptions Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/list-customer-subscriptions Lists all subscriptions that belong to a customer. If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, subscriptions no longer require an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. ```http GET /customers/{customer_id}/subscriptions.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `customer_id` | `Number` | Template, Required | The Chargify id of the customer | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/customers/150/subscriptions.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` #### Custom Fields ##### Create Metafields Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/create-metafields Creates metafields on a Site for either the Subscriptions or Customers resource. Metafields and their metadata are created in the Custom Fields configuration page on your Site. Metafields can be populated with metadata when you create them or later with the [Update Metafield](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/update-metafield), [Create Metadata](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/create-metadata), or [Update Metadata](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/update-metadata) endpoints. The Create Metadata and Update Metadata endpoints allow you to add metafields and metadata values to a specific subscription or customer. Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers. > Note: After creating a metafield, the resource type cannot be modified. In the UI and product documentation, metafields and metadata are called Custom Fields. - Metafield is the custom field - Metadata is the data populating the custom field. See [Custom Fields Reference](https://docs.maxio.com/hc/en-us/articles/24266140850573-Custom-Fields-Reference) and [Custom Fields Tab](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab) for information on using Custom Fields in the Advanced Billing UI. ```http POST /{resource_type}/metafields.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`Resource Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) | Template, Required | The resource type to which the metafields belong. | | `body` | [`Create Metafields Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metafields-request) | Body, Optional | - | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/metafields.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "metafields": { "name": "Dropdown field", "input_type": "dropdown", "enum": [ "option 1", "option 2" ], "scope": { "csv": "0", "invoices": "0", "statements": "0", "portal": "1" } } }' ``` # Example Response *(as JSON)* ```json [ { "name": "Color", "scope": { "csv": "0", "statements": "0", "invoices": "0", "portal": "0" }, "data_count": 0, "input_type": "text", "enum": null }, { "name": "Brand", "scope": { "csv": "0", "statements": "0", "invoices": "0", "portal": "0" }, "data_count": 0, "input_type": "text", "enum": null } ] ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Single Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response) | ##### List Metafields Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/list-metafields Lists the metafields and their associated details for a Site and resource type. You can filter the request to a specific metafield. ```http GET /{resource_type}/metafields.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`Resource Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) | Template, Required | The resource type to which the metafields belong. | | `name` | `String` | Query, Optional | Filter by the name of the metafield. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | # Response Type **200**: OK [`List Metafields Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-metafields-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/metafields.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json { "total_count": 1, "current_page": 1, "total_pages": 0, "per_page": 50, "metafields": [ { "id": 0, "name": "string", "scope": { "csv": "0", "statements": "0", "invoices": "0", "portal": "0", "public_show": "0", "public_edit": "0" }, "data_count": 0, "input_type": "text", "enum": null } ] } ``` ##### Update Metafield Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/update-metafield Updates metafields on your Site for a resource type. Depending on the request structure, you can update or add metafields and metadata to the Subscriptions or Customers resource. With this endpoint, you can: - Add metafields. If the metafield specified in current_name does not exist, a new metafield is added. > Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers. - Change the name of a metafield. > Note: To keep the metafield name the same and only update the metadata for the metafield, you must use the current metafield name in both the `current_name` and `name` parameters. - Change the input type for the metafield. For example, you can change a metafield input type from text to a dropdown. If you change the input type from text to a dropdown or radio, you must update the specific subscriptions or customers where the metafield was used to reflect the updated metafield and metadata. - Add metadata values to the existing metadata for a dropdown or radio metafield. > Note: Updates to metadata overwrite. To add one or more values, you must specify all metadata values including the new value you want to add. - Add new metadata to a dropdown or radio for a metafield that was created without metadata. - Remove metadata for a dropdown or radio for a metafield. > Note: Updates to metadata overwrite existing values. To remove one or more values, specify all metadata values except those you want to remove. - Add or update scope settings for a metafield. > Note: Scope changes overwrite existing settings. You must specify the complete scope, including the changes you want to make. ```http PUT /{resource_type}/metafields.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`Resource Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) | Template, Required | The resource type to which the metafields belong. | | `body` | [`Update Metafields Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metafields-request) | Body, Optional | - | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/metafields.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Single Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response) | ##### Delete Metafield Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/delete-metafield Deletes a metafield from your Site. Removes the metafield and associated metadata from all Subscriptions or Customers resources on the Site. ```http DELETE /{resource_type}/metafields.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`Resource Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) | Template, Required | The resource type to which the metafields belong. | | `name` | `String` | Query, Optional | The name of the metafield to be deleted | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X DELETE -G \ --url 'https://subdomain.chargify.com/subscriptions/metafields.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Create Metadata Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/create-metadata Creates metadata and metafields for a specific subscription or customer, or updates metadata values of existing metafields for a subscription or customer. Metadata values are limited to 2 KB in size. If you create metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field. You can update the input_type for the metafield with the [Update Metafield](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/update-metafield) endpoint. > Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers. ```http POST /{resource_type}/{resource_id}/metadata.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`Resource Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) | Template, Required | The resource type to which the metafields belong. | | `resource_id` | `Number` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies | | `body` | [`Create Metadata Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metadata-request) | Body, Optional | - | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metadata) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/60/metadata.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "metadata": [ { "name": "Color", "value": "Blue" }, { "name": "Something", "value": "Useful" } ] }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Single Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response) | ##### List Metadata Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/list-metadata Lists metadata and metafields for a specific customer or subscription. ```http GET /{resource_type}/{resource_id}/metadata.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`Resource Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) | Template, Required | The resource type to which the metafields belong. | | `resource_id` | `Number` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | # Response Type **200**: OK [`Paginated Metadata`](https://developers.maxio.com/http/advanced-billing-api/models/structures/paginated-metadata) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/60/metadata.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json { "total_count": 1, "current_page": 1, "total_pages": 1, "per_page": 50, "metadata": [ { "id": 77889911, "value": "green", "resource_id": 1234567, "metafield_id": 112233, "deleted_at": null, "name": "Color" } ] } ``` ##### Update Metadata Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/update-metadata Updates metadata and metafields on the Site and the customer or subscription specified, and updates the metadata value on a subscription or customer. If you update metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field to the Site and to the subscription or customer you specify. You can update the input_type for the metafield with the Update Metafield endpoint. Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for the Subscription resource and another 100 for the Customer resource. ```http PUT /{resource_type}/{resource_id}/metadata.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`Resource Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) | Template, Required | The resource type to which the metafields belong. | | `resource_id` | `Number` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies | | `body` | [`Update Metadata Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metadata-request) | Body, Optional | - | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metadata) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/60/metadata.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Single Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response) | ##### Delete Metadata Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/delete-metadata Deletes one or more metafields (and associated metadata) from the specified subscription or customer. ```http DELETE /{resource_type}/{resource_id}/metadata.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`Resource Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) | Template, Required | The resource type to which the metafields belong. | | `resource_id` | `Number` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies | | `name` | `String` | Query, Optional | Name of field to be removed. | | `names` | `array` | Query, Optional | Names of fields to be removed. Use in query: `names[]=field1&names[]=my-field&names[]=another-field`. | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X DELETE -G \ --url 'https://subdomain.chargify.com/subscriptions/60/metadata.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### List Metadata for Resource Type Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/list-metadata-for-resource-type Lists metadata for a specified array of subscriptions or customers. ```http GET /{resource_type}/metadata.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `resource_type` | [`Resource Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) | Template, Required | The resource type to which the metafields belong. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `date_field` | [`Basic Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) | Query, Optional | The type of filter you would like to apply to your search. | | `start_date` | `Date` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `Date` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `start_datetime` | `DateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns metadata with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `end_datetime` | `DateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns metadata with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `with_deleted` | `Boolean` | Query, Optional | Allow to fetch deleted metadata. | | `resource_ids` | `array` | Query, Optional | Allow to fetch metadata for multiple records based on provided ids. Use in query: `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`.

**Constraints**: *Maximum Items*: `50` | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | # Response Type **200**: OK [`Paginated Metadata`](https://developers.maxio.com/http/advanced-billing-api/models/structures/paginated-metadata) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/metadata.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'date_field=updated_at' ``` #### Entitlements ##### Read Subscription Entitlements Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/entitlements/read-subscription-entitlements Returns every feature a subscription is entitled to, aggregated per (feature key, periodicity window) across all of its products and components — a `usage_limit` feature granted with two different periodicities comes back as two entries sharing one `feature_key`, each identified by its own `periodicity_key`. When more than one product or component grants the same feature key and periodicity, the values are combined: - **`access_right`** features are combined with a boolean OR — if any contributor grants access, the aggregate is `true`. `source_products` only lists the contributors that granted `true`. - **`usage_limit`** features are summed across every contributor sharing the same periodicity window. `source_products` lists every contributor. Grants with different periodicities are not summed together — they are returned as separate entries. - **`service_right`** features are not combined: one contributor's value wins. Do not rely on which one when several grant the same feature key. `enabled` reflects both the aggregated value and the subscription's state: it is `false` whenever the subscription is not in a live state (`active`, `trialing`, `assessing`, `past_due`, `soft_failure`), regardless of the aggregated value. Entitlements deliberately stay enabled through dunning. ```http GET /subscriptions/{subscription_id}/entitlements.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **200**: OK [`Aggregated Entitlements Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/aggregated-entitlements-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/subscriptions/222/entitlements.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "subscription_id": 12345, "customer_id": 678, "status": "active", "entitlements": [ { "feature_key": "feature.sso", "periodicity_key": "feature.sso", "name": "SSO", "type": "access_right", "value": true, "enabled": true, "periodicity": null, "source_products": [ "Gold Plan" ] }, { "feature_key": "usage.api_calls", "periodicity_key": "usage.api_calls:1:month", "name": "API Calls", "type": "usage_limit", "value": 50000, "enabled": true, "periodicity": { "interval": 1, "unit": "month" }, "source_products": [ "Gold Plan" ] } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | #### Events ##### List Events Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events/list-events Lists events for a site. Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. Within the UI, Events are referred to as Site Activity. For more information, see [Site Activity](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). Use query string filters to narrow down results. You can use the `filter` parameter to filter by event key. ### Legacy Filters The following keys are no longer supported. + `payment_failure_recreated` + `payment_success_recreated` + `renewal_failure_recreated` + `renewal_success_recreated` + `zferral_revenue_post_failure` - (Specific to the deprecated Zferral integration) + `zferral_revenue_post_success` - (Specific to the deprecated Zferral integration) ## Event Key The event type is identified by the key property. See [Event Key](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/event-key) for a complete list of supported keys. ## Event Specific Data Different event types may include additional data in `event_specific_data` property. While some events share the same schema for `event_specific_data`, others may not include it at all. For precise mappings from key to event_specific_data, refer to [Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/event). ### Example Here’s an example event for the `subscription_product_change` event: ``` { "event": { "id": 351, "key": "subscription_product_change", "message": "Product changed on Mark Alan's subscription from 'Basic' to 'Pro'", "subscription_id": 205, "event_specific_data": { "new_product_id": 3, "previous_product_id": 2 }, "created_at": "2012-01-30T10:43:31-05:00" } } ``` Here’s an example event for the `subscription_state_change` event: ``` { "event": { "id": 353, "key": "subscription_state_change", "message": "State changed on Mark Alan's subscription to Pro from trialing to active", "subscription_id": 205, "event_specific_data": { "new_subscription_state": "active", "previous_subscription_state": "trialing" }, "created_at": "2012-01-30T10:43:33-05:00" } } ``` ## Enhanced Catalog Experience If you’re using the [enhanced Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. Event name changes: - subscription_product_change → subscription_plan_change - component_allocation_change → allocation_change - component_billing_date_change → product_billing_date_change Message updates: - “Plan changed on Subscription from previous plan to new plan” - “Successful payment for allocation changes to Product on Subscription” - “Failed payment for allocation changes to Product on Subscription” ```http GET /events.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `since_id` | `Long` | Query, Optional | Returns events with an id greater than or equal to the one specified. | | `max_id` | `Long` | Query, Optional | Returns events with an id less than or equal to the one specified. | | `direction` | [`Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction) | Query, Optional | The sort direction of the returned events.

**Default**: `desc` | | `filter` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/event-key) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | | `date_field` | [`List Events Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-events-date-field) | Query, Optional | The type of filter you would like to apply to your search. | | `start_date` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `start_datetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `end_datetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/event-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/events.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'direction=desc' \ -d 'filter=custom_field_value_change%2Cpayment_success' \ -d 'date_field=created_at' ``` # Example Response *(as JSON)* ```json [ { "event": { "id": 343087780, "key": "subscription_state_change", "message": "State changed on Test subscription to Monthly Product from active to past_due", "subscription_id": 14950962, "customer_id": 12345678, "created_at": "2016-10-27T16:42:22-04:00", "event_specific_data": { "previous_subscription_state": "active", "new_subscription_state": "past_due" } } }, { "event": { "id": 343087742, "key": "billing_date_change", "message": "Billing date changed on Test's subscription to Monthly Product from 11/27/2016 to 10/27/2016", "subscription_id": 14950962, "customer_id": 12345678, "created_at": "2016-10-27T16:42:19-04:00", "event_specific_data": null } }, { "event": { "id": 343085267, "key": "statement_closed", "message": "Statement 79401838 closed (but not settled) for Test's subscription to ANNUAL product", "subscription_id": 14950975, "customer_id": 87654321, "created_at": "2016-10-27T16:40:40-04:00", "event_specific_data": null } }, { "event": { "id": 4481, "key": "custom_field_value_change", "message": "Custom field (Extra support included) changed for Subscription 117 from 'Yes' to 'No'.", "subscription_id": 117, "customer_id": 22334455, "created_at": "2022-03-24T07:55:06-04:00", "event_specific_data": { "event_type": "updated", "metafield_name": "Extra support included", "metafield_id": 2, "old_value": "Yes", "new_value": "No", "resource_type": "Subscription", "resource_id": 117 } } } ] ``` ##### List Subscription Events Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events/list-subscription-events Lists events for a subscription. ## Event Key The event type is identified by the key property. See [Event Key](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/event-key) for a complete list of supported keys. ## Event Specific Data Different event types may include additional data in `event_specific_data` property. While some events share the same schema for `event_specific_data`, others may not include it at all. For precise mappings from key to event_specific_data, refer to [Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/event). ## Enhanced Catalog Experience If you’re using the [enhanced Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. Event name changes: - subscription_product_change → subscription_plan_change - component_allocation_change → allocation_change - component_billing_date_change → product_billing_date_change Message updates: - “Successful payment for allocation changes to Product on Subscription” - “Failed payment for allocation changes to Product on Subscription” - “Plan changed on Subscription from previous plan to new plan” ```http GET /subscriptions/{subscription_id}/events.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `since_id` | `Long` | Query, Optional | Returns events with an id greater than or equal to the one specified. | | `max_id` | `Long` | Query, Optional | Returns events with an id less than or equal to the one specified. | | `direction` | [`Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction) | Query, Optional | The sort direction of the returned events.

**Default**: `desc` | | `filter` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/event-key) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/event-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/222/events.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'direction=desc' \ -d 'filter=custom_field_value_change%2Cpayment_success' ``` # Example Response *(as JSON)* ```json [ { "event": { "id": 344799837, "key": "statement_settled", "message": "Statement 79702531 settled successfully for Amelia Example's subscription to Basic Plan", "subscription_id": 14900541, "customer_id": 77223344, "created_at": "2016-11-01T12:41:29-04:00", "event_specific_data": null } }, { "event": { "id": 344799815, "key": "renewal_success", "message": "Successful renewal for Amelia Example's subscription to Basic Plan", "subscription_id": 14900541, "customer_id": 77223344, "created_at": "2016-11-01T12:41:28-04:00", "event_specific_data": { "product_id": 3792003, "account_transaction_id": 7590246 } } }, { "event": { "id": 344799705, "key": "billing_date_change", "message": "Billing date changed on Amelia Example's subscription to Basic Plan from 11/26/2016 to 11/01/2016", "subscription_id": 14900541, "customer_id": 77223344, "created_at": "2016-11-01T12:41:25-04:00", "event_specific_data": null } } ] ``` ##### Read Events Count Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events/read-events-count Returns the total count of events for a given site. If you’re using the [enhanced Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. Event name changes: - subscription_product_change → subscription_plan_change - component_allocation_change → allocation_change - component_billing_date_change → product_billing_date_change Message updates: - “Successful payment for allocation changes to Product on Subscription” - “Failed payment for allocation changes to Product on Subscription” - “Plan changed on Subscription from previous plan to new plan” ```http GET /events/count.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `since_id` | `Long` | Query, Optional | Returns events with an id greater than or equal to the one specified. | | `max_id` | `Long` | Query, Optional | Returns events with an id less than or equal to the one specified. | | `direction` | [`Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction) | Query, Optional | The sort direction of the returned events.

**Default**: `desc` | | `filter` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/event-key) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | # Response Type **200**: OK [`Count Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/count-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/events/count.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'direction=desc' \ -d 'filter=custom_field_value_change%2Cpayment_success' ``` # Example Response *(as JSON)* ```json { "count": 144 } ``` #### Events-Based Billing Segments ##### Create Segment Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events-based-billing-segments/create-segment Creates a new segment for a component with a segmented metric. It allows you to specify properties to bill upon and prices for each Segment. You can only pass as many "property_values" as the related Metric has segmenting properties defined. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. ```http POST /components/{component_id}/price_points/{price_point_id}/segments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `String` | Template, Required | ID or Handle for the Component | | `price_point_id` | `String` | Template, Required | ID or Handle for the Price Point belonging to the Component | | `body` | [`Create Segment Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-segment-request) | Body, Optional | - | # Response Type **201**: Created [`Segment Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/segment-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/components/component_id8/price_points/price_point_id8/segments.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "segment": { "segment_property_1_value": "France", "segment_property_2_value": "Spain", "pricing_scheme": "volume", "prices": [ { "starting_quantity": 1, "ending_quantity": 10000, "unit_price": 0.19 }, { "starting_quantity": 10001, "unit_price": 0.09 } ] } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Event Based Billing Segment ErrorsException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-segment-errors) | ##### List Segments for Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events-based-billing-segments/list-segments-for-price-point Lists segments created for a given price point, in order of creation. You can pass `page` and `per_page` parameters in order to access all of the segments. By default it will return `30` records. You can set `per_page` to `200` at most. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. ```http GET /components/{component_id}/price_points/{price_point_id}/segments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `String` | Template, Required | ID or Handle for the Component | | `price_point_id` | `String` | Template, Required | ID or Handle for the Price Point belonging to the Component | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `filter` | [`List Segments Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-segments-filter) | Query, Optional | Filter to use for List Segments for a Price Point operation | # Response Type **200**: OK [`List Segments Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-segments-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/components/component_id8/price_points/price_point_id8/segments.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'filter[segment_property_1_value]=EU' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Event Based Billing List Segments ErrorsException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-list-segments-errors) | ##### Update Segment Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events-based-billing-segments/update-segment Updates a single segment for a component with a segmented metric. You can also update the pricing for the segment. You can specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. ```http PUT /components/{component_id}/price_points/{price_point_id}/segments/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `String` | Template, Required | ID or Handle of the Component | | `price_point_id` | `String` | Template, Required | ID or Handle of the Price Point belonging to the Component | | `id` | `Decimal` | Template, Required | The ID of the Segment | | `body` | [`Update Segment Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-segment-request) | Body, Optional | - | # Response Type **200**: OK [`Segment Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/segment-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/components/component_id8/price_points/price_point_id8/segments/60.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Event Based Billing Segment ErrorsException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-segment-errors) | ##### Delete Segment Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events-based-billing-segments/delete-segment Deletes a segment with the specified ID. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. ```http DELETE /components/{component_id}/price_points/{price_point_id}/segments/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `String` | Template, Required | ID or Handle of the Component | | `price_point_id` | `String` | Template, Required | ID or Handle of the Price Point belonging to the Component | | `id` | `Decimal` | Template, Required | The ID of the Segment | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/components/component_id8/price_points/price_point_id8/segments/60.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | | 422 | Unprocessable Entity (WebDAV) | ##### Bulk Create Segments Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events-based-billing-segments/bulk-create-segments Creates multiple segments in one request. The array of segments can contain up to `2000` records. If any of the records contain an error the whole request would fail and none of the requested segments get created. The error response contains a message for only the one segment that failed validation, with the corresponding index in the array. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. ```http POST /components/{component_id}/price_points/{price_point_id}/segments/bulk.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `String` | Template, Required | ID or Handle for the Component | | `price_point_id` | `String` | Template, Required | ID or Handle for the Price Point belonging to the Component | | `body` | [`Bulk Create Segments`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-create-segments) | Body, Optional | - | # Response Type **201**: Created [`List Segments Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-segments-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/components/component_id8/price_points/price_point_id8/segments/bulk.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Event Based Billing SegmentException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-segment) | ##### Bulk Update Segments Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/events-based-billing-segments/bulk-update-segments Updates multiple segments in one request. The array of segments can contain up to `1000` records. If any of the records contain an error the whole request would fail and none of the requested segments get updated. The error response contains a message for only the one segment that failed validation, with the corresponding index in the array. You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. ```http PUT /components/{component_id}/price_points/{price_point_id}/segments/bulk.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `String` | Template, Required | ID or Handle for the Component | | `price_point_id` | `String` | Template, Required | ID or Handle for the Price Point belonging to the Component | | `body` | [`Bulk Update Segments`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-update-segments) | Body, Optional | - | # Response Type **200**: OK [`List Segments Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-segments-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/components/component_id8/price_points/price_point_id8/segments/bulk.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Event Based Billing SegmentException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-segment) | #### Feature Templates ##### List Feature Templates Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/list-feature-templates Returns the feature templates defined for your site. Returns active (non-archived) templates by default; pass `status=archived` or `status=all` to widen the result set. Paginated when `page` or `per_page` is supplied; otherwise returns the full result set. ```http GET /features.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `status` | [`Status 1`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/status-1) | Query, Optional | Filters by archived state. Defaults to `active` (non-archived templates only).

**Default**: `active` | | `q` | `String` | Query, Optional | Filters to feature templates whose name contains this substring (case-insensitive). | | `kind` | [`Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/kind) | Query, Optional | Filters by feature kind. | | `updated_from` | `Date` | Query, Optional | Returns feature templates updated on or after this date. | | `updated_to` | `Date` | Query, Optional | Returns feature templates updated on or before this date. | | `sort_by` | [`Sort By`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sort-by) | Query, Optional | The field to sort results by.

**Default**: `name` | | `sort_direction` | [`Sort Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sort-direction) | Query, Optional | The sort direction.

**Default**: `asc` | # Response Type **200**: OK [`Feature Templates List Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-templates-list-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/features.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'status=active' \ -d 'sort_by=name' \ -d 'sort_direction=asc' ``` # Example Response *(as JSON)* ```json { "items": [ { "id": 1001, "key": "sso", "name": "Single Sign-On", "description": null, "kind": "access_right", "unit": null, "value_type": "boolean", "default_value": "true", "default_periodicity_interval": null, "default_periodicity_unit": null, "archived_at": null, "created_at": "2024-01-15T10:00:00-05:00", "updated_at": "2024-01-15T10:00:00-05:00", "products_count": 2, "plans_count": 5 } ], "total_count": 1, "archived_count": 0 } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Create Feature Template Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/create-feature-template Defines a new feature at the site level. Feature templates aren't billable on their own — attach them to products or components to grant them to subscribers. ```http POST /features.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Feature Template Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-feature-template-request) | Body, Optional | - | # Response Type **201**: Created [`Feature Template Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/features.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "feature": { "key": "sso", "name": "Single Sign-On", "kind": "access_right" } }' ``` # Example Response *(as JSON)* ```json { "feature": { "id": 1001, "key": "sso", "name": "Single Sign-On", "description": null, "kind": "access_right", "unit": null, "value_type": "boolean", "default_value": "true", "default_periodicity_interval": null, "default_periodicity_unit": null, "archived_at": null, "created_at": "2024-01-15T10:00:00-05:00", "updated_at": "2024-01-15T10:00:00-05:00", "products_count": 0, "plans_count": 0 } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Feature Template Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/read-feature-template Returns a single feature template. Archived feature templates are not addressable here and return `404` — restore one first to read or update it. ```http GET /features/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature template. | # Response Type **200**: OK [`Feature Template Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/features/112.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | ##### Update Feature Template Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/update-feature-template `key` is rejected on every update. `kind` is rejected once any feature catalog item has been created from this template. Archived feature templates are not addressable here and return `404` — restore one first to update it. ```http PUT /features/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature template. | | `body` | [`Update Feature Template Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-feature-template-request) | Body, Optional | - | # Response Type **200**: OK [`Feature Template Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/features/112.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Archive Feature Template Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/archive-feature-template Archived feature templates are not addressable via [Read Feature Template](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/read-feature-template) or [Update Feature Template](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/update-feature-template) — both return `404` until the template is restored. The feature template record itself is never hard-deleted, and can always be restored with [Restore Feature Template](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/restore-feature-template). Reversibility does not extend to `remove_from_catalog=true`: the feature catalog items and entitlements it destroys are gone permanently, and restoring the template will not bring subscriber access back. ```http DELETE /features/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature template. | | `remove_from_catalog` | `Boolean` | Query, Optional | When `true`, also destroys every feature catalog item created from this template and cascades to their entitlements, revoking subscriber access immediately. When `false` (default), the feature template and its feature catalog items are archived, and existing entitlements are preserved.

**Default**: `false` | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE -G \ --url 'https://subdomain.chargify.com/features/112.json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'remove_from_catalog=false' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | ##### Restore Feature Template Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/feature-templates/restore-feature-template Clears the feature template's archived state. Feature catalog items created from this template are not automatically restored — restore each one individually. ```http POST /features/{id}/restore.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature template. | # Response Type **200**: OK [`Feature Template Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/features/112/restore.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Insights ##### Read Site Stats Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/insights/read-site-stats Returns basic site-level stats. This API call only answers with JSON responses. An XML version is not provided. ## Stats Documentation There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will reflect the summary of information provided in the Stats response. ``` https://subdomain.chargify.com/dashboard ``` ```http GET /stats.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Response Type **200**: OK [`Site Summary`](https://developers.maxio.com/http/advanced-billing-api/models/structures/site-summary) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/stats.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "seller_name": "Acme, Inc.", "site_name": "Production", "site_id": 12345, "site_currency": "USD", "stats": { "total_subscriptions": 120, "subscriptions_today": 4, "total_revenue": "$45,978.81", "revenue_today": "$1,405.12", "revenue_this_month": "$10,000.00", "revenue_this_year": "$27,935.24" } } ``` ##### Read Mrr Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/insights/read-mrr **This endpoint is deprecated.** Returns your site's current MRR, including plan and usage breakouts. ```http GET /mrr.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `at_time` | `DateTime` | Query, Optional | submit a timestamp in ISO8601 format to request MRR for a historic time. | | `subscription_id` | `Number` | Query, Optional | submit the id of a subscription in order to limit results. | # Response Type **200**: OK [`MRR Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/mrr-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/mrr.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "mrr": { "amount_in_cents": 9915593, "amount_formatted": "$99,155.93", "currency": "USD", "currency_symbol": "$", "at_time": "2021-02-03T14:23:17-05:00", "breakouts": { "plan_amount_in_cents": 9913593, "plan_amount_formatted": "$99,135.93", "usage_amount_in_cents": 2000, "usage_amount_formatted": "$20.00" } } } ``` ##### List Mrr Movements Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/insights/list-mrr-movements **This endpoint is deprecated.** Lists your site's MRR movements. ## Understanding MRR movements This endpoint will aid in accessing your site's [MRR Report](https://maxio.zendesk.com/hc/en-us/articles/24285894587021-MRR-Analytics) data. Whenever a subscription event occurs that causes your site's MRR to change (such as a signup or upgrade), we record an MRR movement. These records are accessible via the MRR Movements endpoint. Each MRR Movement belongs to a subscription and contains a timestamp, category, and an amount. `line_items` represent the subscription's product configuration at the time of the movement. ### Plan & Usage Breakouts In the MRR Report UI, we support a setting to [include or exclude](https://maxio.zendesk.com/hc/en-us/articles/24285894587021-MRR-Analytics#displaying-component-based-metered-usage-in-mrr) usage revenue. In the MRR APIs, responses include `plan` and `usage` breakouts. Plan includes revenue from: * Products * Quantity-Based Components * On/Off Components Usage includes revenue from: * Metered Components * Prepaid Usage Components ```http GET /mrr_movements.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Query, Optional | (Optional) Filter results by subscription. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 50.
Use in query `per_page=20`.

**Default**: `10`

**Constraints**: `<= 50` | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | # Response Type **200**: OK [`List MRR Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-mrr-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/mrr_movements.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=20' ``` # Example Response *(as JSON)* ```json { "mrr": { "page": 0, "per_page": 10, "total_pages": 80, "total_entries": 791, "currency": "USD", "currency_symbol": "$", "movements": [ { "timestamp": "2014-12-03T13:59:46-05:00", "amount_in_cents": 2173, "amount_formatted": "$21.73", "description": "Awesome Company signed up for Super Product ($21.73/mo)", "category": "new_business", "breakouts": { "plan_amount_in_cents": 2173, "plan_amount_formatted": "$21.73", "usage_amount_in_cents": 0, "usage_amount_formatted": "$0.00" }, "line_items": [ { "product_id": 306386, "component_id": 0, "price_point_id": 3856987, "name": "Cached Queries", "mrr": 2173, "mrr_movements": [ { "amount": 2173, "category": "new_business", "subscriber_delta": 0, "lead_delta": 0 } ], "quantity": 1, "prev_quantity": 0, "recurring": true } ], "subscription_id": 12355, "subscriber_name": "Amy Smith" } ] } } ``` ##### List Mrr per Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/insights/list-mrr-per-subscription **This endpoint is deprecated.** Lists your site's current MRR, including plan and usage breakouts split per subscription. ```http GET /subscriptions_mrr.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `filter` | [`List Mrr Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-mrr-filter) | Query, Optional | Filter to use for List MRR per subscription operation | | `at_time` | `String` | Query, Optional | Submit a timestamp in ISO8601 format to request MRR for a historic time. Use in query: `at_time=2022-01-10T10:00:00-05:00`. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction) | Query, Optional | Controls the order in which results are returned. Records are ordered by subscription_id in ascending order by default. Use in query `direction=desc`. | # Response Type **200**: OK [`Subscription MRR Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-mrr-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions_mrr.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'filter[subscription_ids]=1%2C2%2C3' \ -d 'at_time=at_time%3D2022-01-10T10%3A00%3A00-05%3A00' \ -d 'page=1' \ -d 'per_page=50' \ -d 'direction=desc' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 400 | Bad Request | [`Subscriptions Mrr Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscriptions-mrr-error-response) | #### Invoices ##### Refund Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/refund-invoice Refunds an invoice, segment, or consolidated invoice. ## Partial Refund for Consolidated Invoice A refund less than the total of a consolidated invoice will be split across its segments. For a $50.00 refund on a $100.00 consolidated invoice with one $60.00 segment and one $40.00 segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00, respectively). ```http POST /invoices/{uid}/refunds.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | | `body` | [`Refund Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice-request) | Body, Optional | - | # Response Type **200**: OK [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/invoices/uid0/refunds.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "refund": { "amount": "100.00", "memo": "Refund for Basic Plan renewal", "payment_id": 12345, "external": false, "apply_credit": false, "void_invoice": true } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Invoices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/list-invoices Lists invoices for a site. By default, invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`, or `refunds`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. ```http GET /invoices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `start_date` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns invoices with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns invoices with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `status` | [`Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-status) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | | `subscription_id` | `Number` | Query, Optional | The subscription's ID. | | `subscription_group_uid` | `String` | Query, Optional | The UID of the subscription group you want to fetch consolidated invoices for. This will return a paginated list of consolidated invoices for the specified group. | | `consolidation_level` | `String` | Query, Optional | The consolidation level of the invoice. Allowed Values: none, parent, child or comma-separated lists of thereof, e.g. none,parent. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction) | Query, Optional | The sort direction of the returned invoices.

**Default**: `desc` | | `line_items` | `Boolean` | Query, Optional | Include line items data.

**Default**: `false` | | `discounts` | `Boolean` | Query, Optional | Include discounts data.

**Default**: `false` | | `taxes` | `Boolean` | Query, Optional | Include taxes data.

**Default**: `false` | | `credits` | `Boolean` | Query, Optional | Include credits data.

**Default**: `false` | | `payments` | `Boolean` | Query, Optional | Include payments data.

**Default**: `false` | | `custom_fields` | `Boolean` | Query, Optional | Include custom fields data.

**Default**: `false` | | `refunds` | `Boolean` | Query, Optional | Include refunds data.

**Default**: `false` | | `date_field` | [`Invoice Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-date-field) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`.

**Default**: `due_date` | | `start_datetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Allowed to be used only along with date_field set to created_at or updated_at. | | `end_datetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Allowed to be used only along with date_field set to created_at or updated_at. | | `customer_ids` | `array` | Query, Optional | Allows fetching invoices with matching customer id based on provided values. Use in query `customer_ids=1,2,3`. | | `number` | `array` | Query, Optional | Allows fetching invoices with matching invoice number based on provided values. Use in query `number=1234,1235`. | | `product_ids` | `array` | Query, Optional | Allows fetching invoices with matching line items product ids based on provided values. Use in query `product_ids=23,34`. | | `sort` | [`Invoice Sort Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-sort-field) | Query, Optional | Allows specification of the order of the returned list. Use in query `sort=total_amount`.

**Default**: `number` | # Response Type **200**: OK [`List Invoices Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-invoices-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/invoices.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'direction=desc' \ -d 'line_items=false' \ -d 'discounts=false' \ -d 'taxes=false' \ -d 'credits=false' \ -d 'payments=false' \ -d 'custom_fields=false' \ -d 'refunds=false' \ -d 'date_field=issue_date' \ -d 'customer_ids=1%2C2%2C3' \ -d 'number=1234%2C1235' \ -d 'product_ids=23%2C34' \ -d 'sort=total_amount' ``` # Example Response *(as JSON)* ```json { "invoices": [ { "uid": "inv_8htcd29wcq3q6", "site_id": 51288, "customer_id": 20153415, "subscription_id": 23277588, "number": "125", "sequence_number": 125, "issue_date": "2018-09-20", "due_date": "2018-09-20", "paid_date": "2018-09-20", "status": "paid", "collection_method": "automatic", "payment_instructions": "Make checks payable to Acme, Inc.", "currency": "USD", "consolidation_level": "parent", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": 23277588, "product_name": "Trial and setup fee", "product_family_name": "Billing Plans", "seller": { "name": "General Goods", "address": { "street": "123 General Goods Way", "line2": "Apt. 10", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "phone": "555-555-1212" }, "customer": { "chargify_id": 20153415, "first_name": "Meg", "last_name": "Example", "organization": "", "email": "meg@example.com" }, "memo": "Payment due within 15 days of receipt.", "billing_address": { "street": "123 I Love Cats Way", "line2": "", "city": "Boston", "state": "MA", "zip": "90210", "country": "US" }, "shipping_address": { "street": "123 I Love Cats Way", "line2": "", "city": "Boston", "state": "MA", "zip": "90210", "country": "US" }, "subtotal_amount": "100.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "100.0", "credit_amount": "0.0", "paid_amount": "100.0", "refund_amount": "0.0", "due_amount": "0.0", "public_url": "https://www.chargifypay.com/invoice/inv_8htcd29wcq3q6?token=n9fr5fxff5v74c7h9srg3cwd" }, { "uid": "inv_8hr3546xp4h8n", "site_id": 51288, "customer_id": 21687686, "subscription_id": 22007644, "number": "124", "sequence_number": 124, "issue_date": "2018-09-18", "due_date": "2018-09-18", "paid_date": null, "status": "open", "collection_method": "remittance", "payment_instructions": "Make checks payable to Acme, Inc.", "currency": "USD", "consolidation_level": "none", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": null, "product_name": "Trial and setup fee", "product_family_name": "Billing Plans", "seller": { "name": "General Goods", "address": { "street": "123 General Goods Way", "line2": "Apt. 10", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "phone": "555-555-1212" }, "customer": { "chargify_id": 21687686, "first_name": "Charlene", "last_name": "Tester", "organization": "", "email": "food@example.com" }, "memo": "Payment due within 15 days of receipt.", "billing_address": { "street": "", "line2": "", "city": "", "state": "", "zip": "", "country": "" }, "shipping_address": { "street": "", "line2": "", "city": "", "state": "", "zip": "", "country": "" }, "subtotal_amount": "100.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "100.0", "credit_amount": "0.0", "paid_amount": "0.0", "refund_amount": "0.0", "due_amount": "100.0", "public_url": "https://www.chargifypay.com/invoice/inv_8hr3546xp4h8n?token=n9fr5fxff5v74c7h9srg3cwd" }, { "uid": "inv_8hr3546wdwxkr", "site_id": 51288, "customer_id": 21687670, "subscription_id": 22007627, "number": "123", "sequence_number": 123, "issue_date": "2018-09-18", "due_date": "2018-09-18", "paid_date": "2018-09-18", "status": "paid", "collection_method": "automatic", "payment_instructions": "Make checks payable to Acme, Inc.", "currency": "USD", "consolidation_level": "none", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": null, "product_name": "Trial End - Free", "product_family_name": "Billing Plans", "seller": { "name": "General Goods", "address": { "street": "123 General Goods Way", "line2": "Apt. 10", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "phone": "555-555-1212" }, "customer": { "chargify_id": 21687670, "first_name": "Hello", "last_name": "World", "organization": "123", "email": "example@example.com" }, "memo": "Payment due within 15 days of receipt.", "billing_address": { "street": "123 Anywhere Street", "line2": "", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "shipping_address": { "street": "", "line2": "", "city": "Boston", "state": "AL", "zip": "02120", "country": "US" }, "subtotal_amount": "0.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "0.0", "credit_amount": "0.0", "paid_amount": "0.0", "refund_amount": "0.0", "due_amount": "0.0", "public_url": "https://www.chargifypay.com/invoice/inv_8hr3546wdwxkr?token=n9fr5fxff5v74c7h9srg3cwd" }, { "uid": "inv_8hjtk8bz56bbp", "site_id": 51288, "customer_id": 20137757, "subscription_id": 20541100, "number": "122", "sequence_number": 122, "issue_date": "2018-09-10", "due_date": "2018-09-10", "paid_date": "2018-09-10", "status": "paid", "collection_method": "automatic", "payment_instructions": "Make checks payable to Acme, Inc.", "currency": "USD", "consolidation_level": "none", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": null, "product_name": "$0 Product", "product_family_name": "Billing Plans", "seller": { "name": "General Goods", "address": { "street": "123 General Goods Way", "line2": "Apt. 10", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "phone": "555-555-1212" }, "customer": { "chargify_id": 20137757, "first_name": "Sasha", "last_name": "Example", "organization": "", "email": "example@example.com" }, "memo": "Payment due within 15 days of receipt.", "billing_address": { "street": "123 I Love Cats Way", "line2": "", "city": "Catville", "state": "MA", "zip": "90210", "country": "US" }, "shipping_address": { "street": "123 I Love Cats Way", "line2": "", "city": "Catville", "state": "AL", "zip": "90210", "country": "US" }, "subtotal_amount": "0.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "0.0", "credit_amount": "0.0", "paid_amount": "0.0", "refund_amount": "0.0", "due_amount": "0.0", "public_url": "https://www.chargifypay.com/invoice/inv_8hjtk8bz56bbp?token=fb6kpjz5rcr2vttyjs4rcv6y" } ] } ``` ##### Read Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/read-invoice Returns the details for an invoice. ## PDF Invoice retrieval Individual PDF Invoices can be retrieved by using the "Accept" header application/pdf or appending .pdf as the format portion of the URL: ```curl -u :x -H Accept:application/pdf -H https://acme.chargify.com/invoices/inv_8gd8tdhtd3hgr.pdf > output_file.pdf URL: `https://.chargify.com/invoices/.` Method: GET Required parameters: `uid` Response: A single Invoice. ``` ```http GET /invoices/{uid}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | # Response Type **200**: OK [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/invoices/uid0.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "uid": "inv_8gd8tdhtd3hgr", "site_id": 51288, "customer_id": 20194505, "subscription_id": 20597774, "number": "117", "sequence_number": 117, "issue_date": "2018-07-26", "due_date": "2018-07-26", "paid_date": "2018-07-26", "status": "paid", "collection_method": "automatic", "payment_instructions": "Make checks payable to Acme, Inc.", "currency": "USD", "consolidation_level": "none", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": null, "product_name": "Monthly Product", "product_family_name": "Billing Plans", "seller": { "name": "General Goods", "address": { "street": "123 General Goods Way", "line2": "Apt. 10", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "phone": "555-555-1212" }, "customer": { "chargify_id": 20194505, "first_name": "Joe", "last_name": "Example", "organization": null, "email": "joe@example.com" }, "memo": "Payment due within 15 days of receipt.", "billing_address": { "street": null, "line2": null, "city": null, "state": null, "zip": null, "country": null }, "shipping_address": { "street": null, "line2": null, "city": null, "state": null, "zip": null, "country": null }, "subtotal_amount": "100.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "100.0", "credit_amount": "0.0", "paid_amount": "100.0", "refund_amount": "0.0", "due_amount": "0.0", "line_items": [ { "uid": "li_8gd8tdhhgk55k", "title": "Monthly Product", "description": "Jul 26, 2018 - Aug 26, 2018", "quantity": "1.0", "unit_price": "100.0", "subtotal_amount": "100.0", "discount_amount": "0.0", "tax_amount": "0.0", "tax_included": false, "total_amount": "100.0", "tiered_unit_price": false, "period_range_start": "2018-07-26", "period_range_end": "2018-08-26", "product_id": 4607632, "product_version": 1, "component_id": null, "price_point_id": null } ], "payments": [ { "transaction_time": "2018-07-26T15:22:02Z", "memo": "Joe Example - Monthly Product: Renewal payment", "original_amount": "100.0", "applied_amount": "100.0", "payment_method": { "card_brand": "bogus", "card_expiration": "10/2020", "last_four": null, "masked_card_number": "XXXX-XXXX-XXXX-1", "type": "credit_card" }, "transaction_id": 253028955, "prepayment": false, "received_on": "2018-07-26" } ], "public_url": "https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y" } ``` ##### List Invoice Events Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/list-invoice-events Lists invoice events for a site. Each event contains event "data" (such as an applied payment) as well as a snapshot of the `invoice` at the time of event completion. Exposed event types are: + issue_invoice + apply_credit_note + apply_payment + refund_invoice + void_invoice + void_remainder + backport_invoice + change_invoice_status + change_invoice_collection_method + remove_payment + failed_payment + apply_debit_note + create_debit_note + change_chargeback_status Invoice events are returned in ascending order. If both a `since_date` and `since_id` are provided in request parameters, the `since_date` will be used. Note - invoice events that occurred prior to 09/05/2018 __will not__ contain an `invoice` snapshot. ```http GET /invoices/events.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `since_date` | `String` | Query, Optional | The timestamp in a format `YYYY-MM-DD T HH:MM:SS Z`, or `YYYY-MM-DD`(in this case, it returns data from the beginning of the day). of the event from which you want to start the search. All the events before the `since_date` timestamp are not returned in the response. | | `since_id` | `Long` | Query, Optional | The ID of the event from which you want to start the search(ID is not included. e.g. if ID is set to 2, then all events with ID 3 and more will be shown) This parameter is not used if since_date is defined. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

**Default**: `100` | | `invoice_uid` | `String` | Query, Optional | Providing an invoice_uid allows for scoping of the invoice events to a single invoice or credit note. | | `with_change_invoice_status` | `String` | Query, Optional | Use this parameter if you want to fetch also invoice events with change_invoice_status type. | | `event_types` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Query, Optional | Filter results by event_type. Supply a comma separated list of event types (listed above). Use in query: `event_types=void_invoice,void_remainder`. | # Response Type **200**: OK [`List Invoice Events Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-invoice-events-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/invoices/events.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=100' ``` # Example Response *(as JSON)* ```json { "events": [ { "id": 83, "event_type": "apply_payment", "event_data": { "memo": "Non-Resumable Canceled On Purpose - Standard Plan: Renewal payment", "original_amount": "168.61", "applied_amount": "168.61", "transaction_time": "2018-08-01T16:00:00Z", "payment_method": { "card_brand": "visa", "card_expiration": "12/2022", "last_four": null, "masked_card_number": "XXXX-XXXX-XXXX-1111", "type": "credit_card" }, "consolidation_level": "none" }, "timestamp": "2018-08-01T16:00:00Z", "invoice": { "id": 614942008934401500, "uid": "inv_8gk5bwkct3gqt", "site_id": 20, "customer_id": 6, "subscription_id": 10, "number": "25", "sequence_number": 25, "transaction_time": "2018-08-01T16:00:00Z", "created_at": "2018-08-01T16:00:00Z", "updated_at": "2018-08-01T16:00:00Z", "issue_date": "2018-08-01", "due_date": "2018-08-01", "paid_date": "2018-08-01", "status": "paid", "role": "renewal", "collection_method": "automatic", "payment_instructions": "Please make checks payable to \"Acme, Inc.\"", "currency": "USD", "consolidation_level": "none", "parent_invoice_id": null, "subscription_group_id": null, "parent_invoice_number": null, "product_name": "Standard Plan", "product_family_name": "Cloud Compute Servers", "seller": { "name": "Acme, Inc.", "address": { "street": null, "line2": null, "city": null, "state": null, "zip": null, "country": null }, "phone": "555-555-1234 x137", "logo_url": null }, "customer": { "chargify_id": 6, "first_name": "Non-Resumable", "last_name": "Canceled On Purpose", "organization": null, "email": "evan4@example.com" }, "payer": { "chargify_id": 6, "first_name": "Non-Resumable", "last_name": "Canceled On Purpose", "organization": null, "email": "evan4@example.com" }, "net_terms": 0, "memo": "Thanks for your business! If you have any questions, please contact your account manager.", "billing_address": { "street": "200 Billing Rd.", "line2": "Suite 100", "city": "Needham", "state": "MA", "zip": "02494", "country": "US" }, "shipping_address": { "street": "100 Shipping St.", "line2": "Apt 200", "city": "Pleasantville", "state": "NC", "zip": "12345", "country": "US" }, "line_items": [ { "uid": "li_8gk5bwkct3gqk", "title": "Standard Plan", "description": "08/01/2018 - 09/01/2018", "quantity": "1.0", "unit_price": "99.0", "subtotal_amount": "99.0", "discount_amount": "9.9", "tax_amount": "6.01425", "tax_included": false, "total_amount": "95.11425", "tiered_unit_price": false, "period_range_start": "2018-08-01", "period_range_end": "2018-09-01", "transaction_id": 120, "product_id": 84, "product_version": 1, "component_id": null, "price_point_id": null, "hide": false }, { "uid": "li_8gk5bwkct3gqm", "title": "Small Instance (Hourly)", "description": "07/22/2018 - 08/01/2018", "quantity": "162.0", "unit_price": "0.09567901", "subtotal_amount": "15.5", "discount_amount": "1.55", "tax_amount": "0.941625", "tax_included": false, "total_amount": "14.891625", "tiered_unit_price": true, "period_range_start": "2018-07-22", "period_range_end": "2018-08-01", "transaction_id": 121, "product_id": 84, "product_version": 1, "component_id": 76, "price_point_id": null, "hide": false, "component_cost_data": { "rates": [ { "component_code_id": null, "price_point_id": 160, "product_id": 84, "quantity": "162.0", "amount": "15.5", "pricing_scheme": "tiered", "tiers": [ { "starting_quantity": 1, "ending_quantity": 100, "quantity": "100.0", "unit_price": "0.0", "amount": "0.0" }, { "starting_quantity": 101, "ending_quantity": null, "quantity": "62.0", "unit_price": "0.25", "amount": "15.5" } ] } ] } }, { "uid": "li_8gk5bwkct3gqn", "title": "Large Instance (Hourly)", "description": "07/22/2018 - 08/01/2018", "quantity": "194.0", "unit_price": "0.24226804", "subtotal_amount": "47.0", "discount_amount": "4.7", "tax_amount": "2.85525", "tax_included": false, "total_amount": "45.15525", "tiered_unit_price": true, "period_range_start": "2018-07-22", "period_range_end": "2018-08-01", "transaction_id": 122, "product_id": 84, "product_version": 1, "component_id": 77, "price_point_id": null, "hide": false, "component_cost_data": { "rates": [ { "component_code_id": null, "price_point_id": 161, "product_id": 84, "quantity": "194.0", "amount": "47.0", "pricing_scheme": "tiered", "tiers": [ { "starting_quantity": 1, "ending_quantity": 100, "quantity": "100.0", "unit_price": "0.0", "amount": "0.0" }, { "starting_quantity": 101, "ending_quantity": null, "quantity": "94.0", "unit_price": "0.5", "amount": "47.0" } ] } ] } }, { "uid": "li_8gk5bwkct3gqp", "title": "IP Addresses", "description": "08/01/2018 - 09/01/2018", "quantity": "7.0", "unit_price": "2.0", "subtotal_amount": "14.0", "discount_amount": "1.4", "tax_amount": "0.8505", "tax_included": false, "total_amount": "13.4505", "tiered_unit_price": false, "period_range_start": "2018-08-01", "period_range_end": "2018-09-01", "transaction_id": 123, "product_id": 84, "product_version": 1, "component_id": 79, "price_point_id": 163, "hide": false, "component_cost_data": { "rates": [ { "component_code_id": null, "price_point_id": 163, "product_id": 84, "quantity": "7.0", "amount": "14.0", "pricing_scheme": "per_unit", "tiers": [ { "starting_quantity": 1, "ending_quantity": null, "quantity": "7.0", "unit_price": "2.0", "amount": "14.0" } ] } ] } } ], "subtotal_amount": "175.5", "discount_amount": "17.55", "discounts": [ { "uid": "dli_8gk5bwkct3gqq", "title": "Multi-service discount (10%)", "description": null, "code": "MULTI3", "source_type": "Coupon", "source_id": 40, "discount_type": "percentage", "percentage": "10.0", "eligible_amount": "175.5", "discount_amount": "17.55", "transaction_id": 124, "line_item_breakouts": [ { "uid": "li_8gk5bwkct3gqk", "eligible_amount": "99.0", "discount_amount": "9.9" }, { "uid": "li_8gk5bwkct3gqm", "eligible_amount": "15.5", "discount_amount": "1.55" }, { "uid": "li_8gk5bwkct3gqn", "eligible_amount": "47.0", "discount_amount": "4.7" }, { "uid": "li_8gk5bwkct3gqp", "eligible_amount": "14.0", "discount_amount": "1.4" } ] } ], "tax_amount": "10.66", "taxes": [ { "uid": "tli_8gk5bwkct3gqr", "title": "NC Sales Tax", "description": null, "source_type": "Tax", "source_id": 1, "percentage": "6.75", "taxable_amount": "157.95", "tax_amount": "10.66", "transaction_id": 125, "line_item_breakouts": [ { "uid": "li_8gk5bwkct3gqk", "taxable_amount": "89.1", "tax_amount": "6.01425" }, { "uid": "li_8gk5bwkct3gqm", "taxable_amount": "13.95", "tax_amount": "0.941625" }, { "uid": "li_8gk5bwkct3gqn", "taxable_amount": "42.3", "tax_amount": "2.85525" }, { "uid": "li_8gk5bwkct3gqp", "taxable_amount": "12.6", "tax_amount": "0.8505" } ], "tax_component_breakouts": [ { "tax_rule_id": 1, "percentage": "6.75", "country_code": "US", "subdivision_code": "NC", "tax_amount": "10.66", "taxable_amount": "157.95", "tax_exempt_amount": "0.0", "non_taxable_amount": "0.0", "tax_name": "NC STATE TAX", "tax_type": "Sales", "rate_type": "General", "tax_authority_type": 45, "state_assigned_no": "", "tax_sub_type": "S" } ], "eu_vat": false, "type": "Sales", "tax_exempt_amount": "0.0" } ], "credit_amount": "0.0", "refund_amount": "0.0", "total_amount": "168.61", "paid_amount": "168.61", "due_amount": "0.0", "payments": [ { "memo": "Non-Resumable Canceled On Purpose - Standard Plan: Renewal payment", "original_amount": "168.61", "applied_amount": "168.61", "transaction_time": "2018-08-01T16:00:00Z", "payment_method": { "card_brand": "visa", "card_expiration": "12/2022", "last_four": null, "masked_card_number": "XXXX-XXXX-XXXX-1111", "type": "credit_card" }, "transaction_id": 126, "prepayment": false } ], "display_settings": { "hide_zero_subtotal_lines": false, "include_discounts_on_lines": false } } } ], "page": 48, "per_page": 1, "total_pages": 102 } ``` ##### Record Payment for Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/record-payment-for-invoice Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the [Record Payment for Multiple Invoices](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/record-payment-for-multiple-invoices) endpoint. ```http POST /invoices/{uid}/payments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | | `body` | [`Create Invoice Payment Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-payment-request) | Body, Optional | - | # Response Type **200**: OK [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/invoices/uid0/payments.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "payment": { "amount": 124.33, "memo": "for John Smith", "method": "check", "details": "#0102" } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Record Payment for Multiple Invoices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/record-payment-for-multiple-invoices Records an external payment against multiple invoices. To apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. Note that the invoice payment amounts must be greater than 0. Total amount must be greater or equal to invoices payment amount sum. ```http POST /invoices/payments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Multi Invoice Payment Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-multi-invoice-payment-request) | Body, Optional | - | # Response Type **200**: OK [`Multi Invoice Payment Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/multi-invoice-payment-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/invoices/payments.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "payment": { "memo": "to pay the bills", "details": "check number 8675309", "method": "check", "amount": "100.00", "applications": [ { "invoice_uid": "inv_8gk5bwkct3gqt", "amount": "50.00" }, { "invoice_uid": "inv_7bc6bwkct3lyt", "amount": "50.00" } ] } }' ``` # Example Response *(as JSON)* ```json { "payment": { "transaction_id": 1, "total_amount": "100.00", "currency_code": "USD", "applications": [ { "invoice_uid": "inv_8gk5bwkct3gqt", "application_uid": "pmt_1tr0hgsct3ybx", "applied_amount": "50.00" }, { "invoice_uid": "inv_7bc6bwkct3lyt", "application_uid": "pmt_2", "applied_amount": "50.00" } ] } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Credit Notes Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/list-credit-notes Lists credit notes for a site. Credit Notes are like inverse invoices. They reduce the amount a customer owes. By default, the credit notes returned by this endpoint will exclude the arrays of `line_items`, `discounts`, `taxes`, `applications`, or `refunds`. To include these arrays, pass the specific field as a key in the query with a value set to `true`. ```http GET /credit_notes.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Query, Optional | The subscription's Advanced Billing id | | `date_field` | [`Credit Note Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-note-date-field) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`. If a date range is provided without an explicit `date_field`, it defaults to `issue_date`. If only `start_datetime`/`end_datetime` are provided without an explicit `date_field`, it defaults to `created_at` instead. An unrecognized `date_field` is ignored rather than raising an error.

**Default**: `issue_date` | | `start_date` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns credit notes with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns credit notes with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `start_datetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns credit notes with a timestamp at or after exact time provided in query. If provided, this parameter will be used instead of start_date. If no timezone offset is included in the value, it is interpreted as UTC. Allowed to be used only along with date_field set to created_at or updated_at. | | `end_datetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns credit notes with a timestamp at or before exact time provided in query. If provided, this parameter will be used instead of end_date. If no timezone offset is included in the value, it is interpreted as UTC. Allowed to be used only along with date_field set to created_at or updated_at. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction) | Query, Optional | The sort direction of the returned credit notes, sorted by sequence_number.

**Default**: `desc` | | `line_items` | `Boolean` | Query, Optional | Include line items data.

**Default**: `false` | | `discounts` | `Boolean` | Query, Optional | Include discounts data.

**Default**: `false` | | `taxes` | `Boolean` | Query, Optional | Include taxes data.

**Default**: `false` | | `refunds` | `Boolean` | Query, Optional | Include refunds data.

**Default**: `false` | | `applications` | `Boolean` | Query, Optional | Include applications data.

**Default**: `false` | # Response Type **200**: OK [`List Credit Notes Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-credit-notes-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/credit_notes.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'date_field=issue_date' \ -d 'page=1' \ -d 'per_page=50' \ -d 'direction=desc' \ -d 'line_items=false' \ -d 'discounts=false' \ -d 'taxes=false' \ -d 'refunds=false' \ -d 'applications=false' ``` # Example Response *(as JSON)* ```json { "credit_notes": [ { "uid": "cn_8m9vbd5kkv7kr", "site_id": 20, "customer_id": 3, "subscription_id": 2, "number": "77", "sequence_number": 78, "issue_date": "2018-12-31", "applied_date": "2018-12-31", "status": "applied", "currency": "USD", "memo": "Refund for overpayment", "seller": { "name": "Acme, Inc.", "address": { "street": "122 E Houston St", "line2": "Suite 105", "city": "San Antonio", "state": "TX", "zip": "78205", "country": "US" }, "phone": "555-555-1234 x137" }, "customer": { "chargify_id": 3, "first_name": "Marty", "last_name": "McFly", "organization": "Time Travellers, Inc.", "email": "timetraveller1985@example.com", "reference": null }, "billing_address": { "street": "200 Billing Rd.", "line2": "Suite 100", "city": "Needham", "state": "MA", "zip": "02494", "country": "US" }, "shipping_address": { "street": "100 Shipping St.", "line2": "Apt 200", "city": "Pleasantville", "state": "NC", "zip": "12345", "country": "US" }, "subtotal_amount": "208.69341779", "discount_amount": "20.87125167", "tax_amount": "12.67783387", "total_amount": "200.5", "applied_amount": "200.5", "remaining_amount": "0.0", "line_items": [ { "uid": "cnli_8k5jvdzct4h9x", "title": "IP Addresses: 5 to 10 addresses", "description": "38.2% credit", "quantity": "0.9855", "unit_price": "2.0", "subtotal_amount": "1.971004", "discount_amount": "0.19862831", "tax_amount": "0.11963536", "tax_included": false, "total_amount": "1.89201105", "tiered_unit_price": false, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 81, "price_point_id": 165 }, { "uid": "cnli_8kjttvjcjx8b4", "title": "Professional Plan", "description": "38.2% credit", "quantity": "0.382", "unit_price": "299.0", "subtotal_amount": "114.21127834", "discount_amount": "11.42112783", "tax_amount": "6.93833516", "tax_included": false, "total_amount": "109.72848567", "tiered_unit_price": false, "period_range_start": "2018-12-30", "period_range_end": "2018-12-30", "product_id": 85, "product_version": 1, "component_id": null, "price_point_id": null }, { "uid": "cnli_8kjttvjknzhx7", "title": "Small Instance (Hourly)", "description": "38.2% credit", "quantity": "74.8676", "unit_price": "0.12244898", "subtotal_amount": "9.16746047", "discount_amount": "0.91674605", "tax_amount": "0.55692322", "tax_included": false, "total_amount": "8.80763764", "tiered_unit_price": true, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 78, "price_point_id": null }, { "uid": "cnli_8kjttvjnmh25w", "title": "Large Instance (Hourly)", "description": "38.2% credit", "quantity": "183.3492", "unit_price": "0.39583333", "subtotal_amount": "72.57572871", "discount_amount": "7.25757287", "tax_amount": "4.40897552", "tax_included": false, "total_amount": "69.72713136", "tiered_unit_price": true, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 79, "price_point_id": null }, { "uid": "cnli_8kjttvjqn86kc", "title": "Email Messages", "description": "38.2% credit", "quantity": "10076.9489", "unit_price": "0.00031045", "subtotal_amount": "3.12839588", "discount_amount": "0.31322157", "tax_amount": "0.19002427", "tax_included": false, "total_amount": "3.00519858", "tiered_unit_price": true, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 80, "price_point_id": null }, { "uid": "cnli_8kjttvjtxxbdd", "title": "IP Addresses", "description": "38.2% credit", "quantity": "3.8198", "unit_price": "2.0", "subtotal_amount": "7.63955039", "discount_amount": "0.76395504", "tax_amount": "0.46410269", "tax_included": false, "total_amount": "7.33969804", "tiered_unit_price": false, "period_range_start": "2018-12-30", "period_range_end": "2018-12-30", "product_id": 85, "product_version": 1, "component_id": 81, "price_point_id": 165 } ], "discounts": [ { "uid": "cndli_8k5jvdzct4h9y", "title": "Multi-service discount (10%)", "code": "MULTI3", "source_type": "Coupon", "source_id": 40, "discount_type": "percentage", "percentage": "10.0", "eligible_amount": "208.69341779", "discount_amount": "20.87125167", "line_item_breakouts": [ { "uid": "cnli_8k5jvdzct4h9x", "eligible_amount": "1.971004", "discount_amount": "0.19862831" }, { "uid": "cnli_8kjttvjcjx8b4", "eligible_amount": "114.21127834", "discount_amount": "11.42112783" }, { "uid": "cnli_8kjttvjknzhx7", "eligible_amount": "9.16746047", "discount_amount": "0.91674605" }, { "uid": "cnli_8kjttvjnmh25w", "eligible_amount": "72.57572871", "discount_amount": "7.25757287" }, { "uid": "cnli_8kjttvjqn86kc", "eligible_amount": "3.12839588", "discount_amount": "0.31322157" }, { "uid": "cnli_8kjttvjtxxbdd", "eligible_amount": "7.63955039", "discount_amount": "0.76395504" } ] } ], "taxes": [ { "uid": "cntli_8k5jvdzct4h9z", "title": "NC Sales Tax", "source_type": "Tax", "source_id": 1, "percentage": "6.75", "taxable_amount": "187.82216613", "tax_amount": "12.67783387", "line_item_breakouts": [ { "uid": "cnli_8k5jvdzct4h9x", "taxable_amount": "1.77237569", "tax_amount": "0.11963536" }, { "uid": "cnli_8kjttvjcjx8b4", "taxable_amount": "102.7901505", "tax_amount": "6.93833516" }, { "uid": "cnli_8kjttvjknzhx7", "taxable_amount": "8.25071442", "tax_amount": "0.55692322" }, { "uid": "cnli_8kjttvjnmh25w", "taxable_amount": "65.31815584", "tax_amount": "4.40897552" }, { "uid": "cnli_8kjttvjqn86kc", "taxable_amount": "2.81517432", "tax_amount": "0.19002427" }, { "uid": "cnli_8kjttvjtxxbdd", "taxable_amount": "6.87559535", "tax_amount": "0.46410269" } ], "tax_component_breakouts": [ { "tax_rule_id": 1, "percentage": "6.75", "country_code": "US", "subdivision_code": "NC", "tax_amount": "10.66", "taxable_amount": "157.95", "tax_exempt_amount": "0.0", "non_taxable_amount": "0.0", "tax_name": "NC STATE TAX", "tax_type": "Sales", "rate_type": "General", "tax_authority_type": 45, "state_assigned_no": "", "tax_sub_type": "S" } ], "eu_vat": false, "type": "Sales", "tax_exempt_amount": "0.0" } ], "applications": [ { "uid": "cdt_8m9vbdbdwd28n", "transaction_time": "2018-12-31T21:19:28Z", "invoice_uid": "inv_8k5jvdzct4hb2", "memo": "Refund for overpayment", "applied_amount": "200.5" } ], "refunds": [ { "transaction_id": 329, "payment_id": 39, "memo": "Refund for overpayment", "original_amount": "524.9", "applied_amount": "200.5" } ] } ] } ``` ##### Read Credit Note Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/read-credit-note Returns the details for a credit note. ```http GET /credit_notes/{uid}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier of the credit note | # Response Type **200**: OK [`Credit Note`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/credit_notes/uid0.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "uid": "cn_8m9vbd5kkv7kr", "site_id": 20, "customer_id": 3, "subscription_id": 2, "number": "77", "sequence_number": 78, "issue_date": "2018-12-31", "applied_date": "2018-12-31", "status": "applied", "currency": "USD", "memo": "Refund for overpayment", "seller": { "name": "Acme, Inc.", "address": { "street": "122 E Houston St", "line2": "Suite 105", "city": "San Antonio", "state": "TX", "zip": "78205", "country": "US" }, "phone": "555-555-1234 x137" }, "customer": { "chargify_id": 3, "first_name": "Marty", "last_name": "McFly", "organization": "Time Travellers, Inc.", "email": "timetraveller1985@example.com", "reference": null }, "billing_address": { "street": "200 Billing Rd.", "line2": "Suite 100", "city": "Needham", "state": "MA", "zip": "02494", "country": "US" }, "shipping_address": { "street": "100 Shipping St.", "line2": "Apt 200", "city": "Pleasantville", "state": "NC", "zip": "12345", "country": "US" }, "subtotal_amount": "208.69341779", "discount_amount": "20.87125167", "tax_amount": "12.67783387", "total_amount": "200.5", "applied_amount": "200.5", "remaining_amount": "0.0", "line_items": [ { "uid": "cnli_8k5jvdzct4h9x", "title": "IP Addresses: 5 to 10 addresses", "description": "38.2% credit", "quantity": "0.9855", "unit_price": "2.0", "subtotal_amount": "1.971004", "discount_amount": "0.19862831", "tax_amount": "0.11963536", "tax_included": false, "total_amount": "1.89201105", "tiered_unit_price": false, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 81, "price_point_id": 165, "billing_schedule_item_id": null, "custom_item": false }, { "uid": "cnli_8kjttvjcjx8b4", "title": "Professional Plan", "description": "38.2% credit", "quantity": "0.382", "unit_price": "299.0", "subtotal_amount": "114.21127834", "discount_amount": "11.42112783", "tax_amount": "6.93833516", "tax_included": false, "total_amount": "109.72848567", "tiered_unit_price": false, "period_range_start": "2018-12-30", "period_range_end": "2018-12-30", "product_id": 85, "product_version": 1, "component_id": null, "price_point_id": null, "billing_schedule_item_id": null, "custom_item": false }, { "uid": "cnli_8kjttvjknzhx7", "title": "Small Instance (Hourly)", "description": "38.2% credit", "quantity": "74.8676", "unit_price": "0.12244898", "subtotal_amount": "9.16746047", "discount_amount": "0.91674605", "tax_amount": "0.55692322", "tax_included": false, "total_amount": "8.80763764", "tiered_unit_price": true, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 78, "price_point_id": null, "billing_schedule_item_id": null, "custom_item": false }, { "uid": "cnli_8kjttvjnmh25w", "title": "Large Instance (Hourly)", "description": "38.2% credit", "quantity": "183.3492", "unit_price": "0.39583333", "subtotal_amount": "72.57572871", "discount_amount": "7.25757287", "tax_amount": "4.40897552", "tax_included": false, "total_amount": "69.72713136", "tiered_unit_price": true, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 79, "price_point_id": null, "billing_schedule_item_id": null, "custom_item": false }, { "uid": "cnli_8kjttvjqn86kc", "title": "Email Messages", "description": "38.2% credit", "quantity": "10076.9489", "unit_price": "0.00031045", "subtotal_amount": "3.12839588", "discount_amount": "0.31322157", "tax_amount": "0.19002427", "tax_included": false, "total_amount": "3.00519858", "tiered_unit_price": true, "period_range_start": "2018-11-30", "period_range_end": "2018-11-30", "product_id": 85, "product_version": 1, "component_id": 80, "price_point_id": null, "billing_schedule_item_id": null, "custom_item": false }, { "uid": "cnli_8kjttvjtxxbdd", "title": "IP Addresses", "description": "38.2% credit", "quantity": "3.8198", "unit_price": "2.0", "subtotal_amount": "7.63955039", "discount_amount": "0.76395504", "tax_amount": "0.46410269", "tax_included": false, "total_amount": "7.33969804", "tiered_unit_price": false, "period_range_start": "2018-12-30", "period_range_end": "2018-12-30", "product_id": 85, "product_version": 1, "component_id": 81, "price_point_id": 165, "billing_schedule_item_id": null, "custom_item": false } ], "discounts": [ { "uid": "cndli_8k5jvdzct4h9y", "title": "Multi-service discount (10%)", "code": "MULTI3", "source_type": "Coupon", "source_id": 40, "discount_type": "percentage", "percentage": "10.0", "eligible_amount": "208.69341779", "discount_amount": "20.87125167", "line_item_breakouts": [ { "uid": "cnli_8k5jvdzct4h9x", "eligible_amount": "1.971004", "discount_amount": "0.19862831" }, { "uid": "cnli_8kjttvjcjx8b4", "eligible_amount": "114.21127834", "discount_amount": "11.42112783" }, { "uid": "cnli_8kjttvjknzhx7", "eligible_amount": "9.16746047", "discount_amount": "0.91674605" }, { "uid": "cnli_8kjttvjnmh25w", "eligible_amount": "72.57572871", "discount_amount": "7.25757287" }, { "uid": "cnli_8kjttvjqn86kc", "eligible_amount": "3.12839588", "discount_amount": "0.31322157" }, { "uid": "cnli_8kjttvjtxxbdd", "eligible_amount": "7.63955039", "discount_amount": "0.76395504" } ] } ], "taxes": [ { "uid": "cntli_8k5jvdzct4h9z", "title": "NC Sales Tax", "source_type": "Tax", "source_id": 1, "percentage": "6.75", "taxable_amount": "187.82216613", "tax_amount": "12.67783387", "line_item_breakouts": [ { "uid": "cnli_8k5jvdzct4h9x", "taxable_amount": "1.77237569", "tax_amount": "0.11963536" }, { "uid": "cnli_8kjttvjcjx8b4", "taxable_amount": "102.7901505", "tax_amount": "6.93833516" }, { "uid": "cnli_8kjttvjknzhx7", "taxable_amount": "8.25071442", "tax_amount": "0.55692322" }, { "uid": "cnli_8kjttvjnmh25w", "taxable_amount": "65.31815584", "tax_amount": "4.40897552" }, { "uid": "cnli_8kjttvjqn86kc", "taxable_amount": "2.81517432", "tax_amount": "0.19002427" }, { "uid": "cnli_8kjttvjtxxbdd", "taxable_amount": "6.87559535", "tax_amount": "0.46410269" } ], "tax_component_breakouts": [ { "tax_rule_id": 1, "percentage": "6.75", "country_code": "US", "subdivision_code": "NC", "tax_amount": "10.66", "taxable_amount": "157.95", "tax_exempt_amount": "0.0", "non_taxable_amount": "0.0", "tax_name": "NC STATE TAX", "tax_type": "Sales", "rate_type": "General", "tax_authority_type": 45, "state_assigned_no": "", "tax_sub_type": "S" } ], "eu_vat": false, "type": "Sales", "tax_exempt_amount": "0.0" } ], "applications": [ { "uid": "cdt_8m9vbdbdwd28n", "transaction_time": "2018-12-31T21:19:28Z", "invoice_uid": "inv_8k5jvdzct4hb2", "memo": "Refund for overpayment", "applied_amount": "200.5" } ], "refunds": [ { "transaction_id": 329, "payment_id": 39, "memo": "Refund for overpayment", "original_amount": "524.9", "applied_amount": "200.5" } ] } ``` ##### Record Payment for Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/record-payment-for-subscription Records an external payment made against a subscription that will pay partially or in full one or more invoices. Payment will be applied starting with the oldest open invoice and then next oldest, and so on until the amount of the payment is fully consumed. Excess payment will result in the creation of a prepayment on the Invoice Account. Only ungrouped or primary subscriptions may be paid using the "bulk" payment request. ```http POST /subscriptions/{subscription_id}/payments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Record Payment Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/record-payment-request) | Body, Optional | - | # Response Type **201**: OK [`Record Payment Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/record-payment-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/payments.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "payment": { "amount": "10.0", "memo": "to pay the bills", "payment_details": "check number 8675309", "payment_method": "check" } }' ``` # Example Response *(as JSON)* ```json { "paid_invoices": [ { "invoice_id": "inv_bchyhr6z5grby", "status": "paid", "due_amount": "0.0", "paid_amount": "50.0" }, { "invoice_id": "inv_bchyhrgvyb6vm", "status": "paid", "due_amount": "0.0", "paid_amount": "50.0" } ], "prepayment": null } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Reopen Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/reopen-invoice Reopens any invoice with the "canceled" status. Invoices enter "canceled" status if they were open at the time the subscription was canceled (whether through dunning or an intentional cancellation). Invoices with "canceled" status are no longer considered to be due. Once reopened, they are considered due for payment. Payment may then be captured in one of the following ways: - Reactivating the subscription, which will capture all open invoices (See note below about automatic reopening of invoices.) - Recording a payment directly against the invoice A note about reactivations: any canceled invoices from the most recent active period are automatically opened as a part of the reactivation process. Reactivating via this endpoint prior to reactivation is only necessary when you wish to capture older invoices from previous periods during the reactivation. ### Reopening Consolidated Invoices When reopening a consolidated invoice, all of its canceled segments will also be reopened. ```http POST /invoices/{uid}/reopen.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | # Response Type **200**: OK [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/invoices/uid0/reopen.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Void Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/void-invoice Voids any invoice with the "open" or "canceled" status. It will also allow voiding of an invoice with the "pending" status if it is not a consolidated invoice. ```http POST /invoices/{uid}/void.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | | `body` | [`Void Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-request) | Body, Optional | - | # Response Type **200**: OK [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/invoices/uid0/void.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "void": { "reason": "Duplicate invoice" } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Consolidated Invoice Segments Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/list-consolidated-invoice-segments Lists segments for a consolidated invoice. Invoice segments returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. ```http GET /invoices/{invoice_uid}/segments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `invoice_uid` | `String` | Template, Required | The unique identifier of the consolidated invoice | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction) | Query, Optional | Sort direction of the returned segments.

**Default**: `asc` | # Response Type **200**: OK [`Consolidated Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/consolidated-invoice) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/invoices/invoice_uid0/segments.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'direction=asc' ``` # Example Response *(as JSON)* ```json { "invoices": [ { "uid": "inv_8htcd29wcq3q6", "site_id": 51288, "customer_id": 20153415, "subscription_id": 23277588, "number": "125", "sequence_number": 125, "issue_date": "2018-09-20", "due_date": "2018-09-20", "paid_date": "2018-09-20", "status": "paid", "collection_method": "automatic", "payment_instructions": "Make checks payable to Acme, Inc.", "currency": "USD", "consolidation_level": "parent", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": 23277588, "product_name": "Trial and setup fee", "product_family_name": "Billing Plans", "seller": { "name": "General Goods", "address": { "street": "123 General Goods Way", "line2": "Apt. 10", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "phone": "555-555-1212" }, "customer": { "chargify_id": 20153415, "first_name": "Meg", "last_name": "Example", "organization": "", "email": "meg@example.com" }, "memo": "Payment due within 15 days of receipt.", "billing_address": { "street": "123 I Love Cats Way", "line2": "", "city": "Boston", "state": "MA", "zip": "90210", "country": "US" }, "shipping_address": { "street": "123 I Love Cats Way", "line2": "", "city": "Boston", "state": "MA", "zip": "90210", "country": "US" }, "subtotal_amount": "100.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "100.0", "credit_amount": "0.0", "paid_amount": "100.0", "refund_amount": "0.0", "due_amount": "0.0", "public_url": "https://www.chargifypay.com/invoice/inv_8htcd29wcq3q6?token=fb6kpjz5rcr2vttyjs4rcv6y" }, { "uid": "inv_8hr3546xp4h8n", "site_id": 51288, "customer_id": 21687686, "subscription_id": 22007644, "number": "124", "sequence_number": 124, "issue_date": "2018-09-18", "due_date": "2018-09-18", "paid_date": null, "status": "open", "collection_method": "remittance", "payment_instructions": "Make checks payable to Acme, Inc.", "currency": "USD", "consolidation_level": "none", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": null, "product_name": "Trial and setup fee", "product_family_name": "Billing Plans", "seller": { "name": "General Goods", "address": { "street": "123 General Goods Way", "line2": "Apt. 10", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "phone": "555-555-1212" }, "customer": { "chargify_id": 21687686, "first_name": "Charlene", "last_name": "Tester", "organization": "", "email": "food@example.com" }, "memo": "Payment due within 15 days of receipt.", "billing_address": { "street": "", "line2": "", "city": "", "state": "", "zip": "", "country": "" }, "shipping_address": { "street": "", "line2": "", "city": "", "state": "", "zip": "", "country": "" }, "subtotal_amount": "100.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "100.0", "credit_amount": "0.0", "paid_amount": "0.0", "refund_amount": "0.0", "due_amount": "100.0", "public_url": "https://www.chargifypay.com/invoice/inv_8hr3546xp4h8n?token=fb6kpjz5rcr2vttyjs4rcv6y" }, { "uid": "inv_8hr3546wdwxkr", "site_id": 51288, "customer_id": 21687670, "subscription_id": 22007627, "number": "123", "sequence_number": 123, "issue_date": "2018-09-18", "due_date": "2018-09-18", "paid_date": "2018-09-18", "status": "paid", "collection_method": "automatic", "payment_instructions": "Make checks payable to Acme, Inc.", "currency": "USD", "consolidation_level": "none", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": null, "product_name": "Trial End - Free", "product_family_name": "Billing Plans", "seller": { "name": "General Goods", "address": { "street": "123 General Goods Way", "line2": "Apt. 10", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "phone": "555-555-1212" }, "customer": { "chargify_id": 21687670, "first_name": "Hello", "last_name": "World", "organization": "123", "email": "example@example.com" }, "memo": "Payment due within 15 days of receipt.", "billing_address": { "street": "123 Anywhere Street", "line2": "", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "shipping_address": { "street": "", "line2": "", "city": "Boston", "state": "AL", "zip": "02120", "country": "US" }, "subtotal_amount": "0.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "0.0", "credit_amount": "0.0", "paid_amount": "0.0", "refund_amount": "0.0", "due_amount": "0.0", "public_url": "https://www.chargifypay.com/invoice/inv_8hr3546wdwxkr?token=fb6kpjz5rcr2vttyjs4rcv6y" }, { "uid": "inv_8hjtk8bz56bbp", "site_id": 51288, "customer_id": 20137757, "subscription_id": 20541100, "number": "122", "sequence_number": 122, "issue_date": "2018-09-10", "due_date": "2018-09-10", "paid_date": "2018-09-10", "status": "paid", "collection_method": "automatic", "payment_instructions": "Make checks payable to Acme, Inc.", "currency": "USD", "consolidation_level": "none", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": null, "product_name": "$0 Product", "product_family_name": "Billing Plans", "seller": { "name": "General Goods", "address": { "street": "123 General Goods Way", "line2": "Apt. 10", "city": "Boston", "state": "MA", "zip": "02120", "country": "US" }, "phone": "555-555-1212" }, "customer": { "chargify_id": 20137757, "first_name": "Sasha", "last_name": "Example", "organization": "", "email": "example@example.com" }, "memo": "Payment due within 15 days of receipt.", "billing_address": { "street": "123 I Love Cats Way", "line2": "", "city": "Catville", "state": "MA", "zip": "90210", "country": "US" }, "shipping_address": { "street": "123 I Love Cats Way", "line2": "", "city": "Catville", "state": "AL", "zip": "90210", "country": "US" }, "subtotal_amount": "0.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "0.0", "credit_amount": "0.0", "paid_amount": "0.0", "refund_amount": "0.0", "due_amount": "0.0", "public_url": "https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y" } ] } ``` ##### Create Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/create-invoice Creates an ad hoc invoice. ### Basic Behavior You can create a basic invoice by sending an array of line items to this endpoint. Each line item, at a minimum, must include a title, a quantity and a unit price. Example: ```json { "invoice": { "line_items": [ { "title": "A Product", "quantity": 12, "unit_price": "150.00" } ] } } ``` ### Catalog items Instead of creating custom products like in above example, You can pass existing items like products, components. ```json { "invoice": { "line_items": [ { "product_id": "handle:gold-product", "quantity": 2, } ] } } ``` The price for each line item will be calculated as well as a total due amount for the invoice. Multiple line items can be sent. ### Line item types When defining a line item, You can choose one of 3 types for a line item: #### Custom item As shown in the basic behavior example, You can pass `title` and `unit_price` for custom item. #### Product id Product handle (with handle: prefix) or id from the scope of current subscription's site can be provided with `product_id`. By default `unit_price` is taken from product's default price point, but can be overwritten by passing `unit_price` or `product_price_point_id`. If `product_id` is used, following fields cannot be used: `title`, `component_id`. #### Component id Component handle (with handle: prefix) or id from the scope of current subscription's site can be provided with `component_id`. If `component_id` is used, following fields cannot be used: `title`, `product_id`. By default `unit_price` is taken from product's default price point, but can be overwritten by passing `unit_price` or `price_point_id`. At this moment price points are supported only for quantity based, on/off and metered components. For prepaid and event based billing components `unit_price` is required. ### Coupons When creating ad hoc invoice, new discounts can be applied in following way: ```json { "invoice": { "line_items": [ { "product_id": "handle:gold-product", "quantity": 1 } ], "coupons": [ { "code": "COUPONCODE", "percentage": 50.0 } ] } } ``` If You want to use existing coupon for discount creation, only `code` and optional `product_family_id` is needed ```json ... "coupons": [ { "code": "FREESETUP", "product_family_id": 1 } ] ... ``` #### Using Coupon Subcodes You can also use coupon subcodes to apply existing coupons with specific subcodes: ```json ... "coupons": [ { "subcode": "SUB1", "product_family_id": 1 } ] ... ``` **Important:** You cannot specify both `code` and `subcode` for the same coupon. Use either: - `code` to apply a main coupon - `subcode` to apply a specific coupon subcode The API response will include both the main coupon code and the subcode used: ```json ... "coupons": [ { "code": "MAIN123", "subcode": "SUB1", "product_family_id": 1, "percentage": 10, "description": "Special discount" } ] ... ``` ### Coupon options #### Code Coupon `code` will be displayed on invoice discount section. Coupon code can only contain uppercase letters, numbers, and allowed special characters. Lowercase letters will be converted to uppercase. It can be used to select an existing coupon from the catalog, or as an ad hoc coupon when passed with `percentage` or `amount`. #### Subcode Coupon `subcode` allows you to apply existing coupons using their subcodes. When a subcode is used, the API response will include both the main coupon code and the specific subcode that was applied. Subcodes are case-insensitive and will be converted to uppercase automatically. #### Percentage Coupon `percentage` can take values from 0 to 100 and up to 4 decimal places. It cannot be used with `amount`. Only for ad hoc coupons, will be ignored if `code` is used to select an existing coupon from the catalog. #### Amount Coupon `amount` takes number value. It cannot be used with `percentage`. Used only when not matching existing coupon by `code`. #### Description Optional `description` will be displayed with coupon `code`. Used only when not matching existing coupon by `code`. #### Product Family id Optional `product_family_id` handle (with handle: prefix) or id is used to match existing coupon within site, when codes are not unique. #### Compounding Strategy Optional `compounding_strategy` for percentage coupons, can take values `compound` or `full-price`. For amount coupons, discounts will be always calculated against the original item price, before other discounts are applied. `compound` strategy: Percentage-based discounts will be calculated against the remaining price, after prior discounts have been calculated. It is set by default. `full-price` strategy: Percentage-based discounts will always be calculated against the original item price, before other discounts are applied. ### Line Item Options #### Period Date Range A custom period date range can be defined for each line item with the `period_range_start` and `period_range_end` parameters. Dates must be sent in the `YYYY-MM-DD` format. `period_range_end` must be greater or equal `period_range_start`. #### Taxes The `taxable` parameter can be sent as `true` if taxes should be calculated for a specific line item. For this to work, the site should be configured to use and calculate taxes. Further, if the site uses Avalara for tax calculations, a `tax_code` parameter should also be sent. For existing catalog items: products/components taxes cannot be overwritten. #### Price Point Price point handle (with handle: prefix) or id from the scope of current subscription's site can be provided with `price_point_id` for components with `component_id` or `product_price_point_id` for products with `product_id` parameter. If price point is passed `unit_price` cannot be used. It can be used only with catalog items products and components. #### Description Optional `description` parameter, it will overwrite default generated description for line item. ### Invoice Options #### Issue Date By default, invoices will be created with a issue date set to today in your site's time zone. The `issue_date` parameter can be sent to alter the default. Only today or dates in the past are accepted. This date is interpreted and validated in your site's time zone. The format for `issue_date` is `YYYY-MM-DD`. #### Net Terms By default, invoices will be created with a due date matching the date of invoice creation. If a different due date is desired, the `net_terms` parameter can be sent indicating the number of days in advance the due date should be. #### Addresses The seller, shipping and billing addresses can be sent to override the site's defaults. Each address requires to send a `first_name` at a minimum in order to work. See below for the details on which parameters can be sent for each address object. #### Memo and Payment Instructions A custom memo can be sent with the `memo` parameter to override the site's default. Likewise, custom payment instructions can be sent with the `payment_instructions` parameter. #### Status By default, invoices will be created with open status. Possible alternative is `draft`. ```http POST /subscriptions/{subscription_id}/invoices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Create Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-request) | Body, Optional | - | # Response Type **200**: OK **201**: Created [`Invoice Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/invoices.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "invoice": { "line_items": [ { "title": "A Product", "quantity": 12.0, "unit_price": "150.00" } ] } }' ``` # Example Response *(as JSON)* ```json { "invoice": { "uid": "inv_98nbmb93gxjz8", "site_id": 5, "customer_id": 13, "subscription_id": 17, "number": "1", "sequence_number": 1, "issue_date": "2020-12-02", "due_date": "2020-12-02", "paid_date": null, "status": "open", "collection_method": "remittance", "payment_instructions": "", "currency": "USD", "consolidation_level": "none", "parent_invoice_uid": null, "parent_invoice_number": null, "group_primary_subscription_id": null, "product_name": "Digitized discrete initiative", "product_family_name": "Networked bottom-line orchestration", "role": "adhoc", "seller": { "name": "Steuber, West and Hegmann 1", "address": { "street": null, "line2": null, "city": null, "state": null, "zip": null, "country": null }, "phone": "(766) 316-0492" }, "customer": { "chargify_id": 13, "first_name": "Dean", "last_name": "Adams", "organization": null, "email": "brandi1@example.com", "vat_number": null, "reference": null }, "memo": "", "billing_address": { "street": null, "line2": null, "city": null, "state": null, "zip": null, "country": null }, "shipping_address": { "street": null, "line2": null, "city": null, "state": null, "zip": null, "country": null }, "subtotal_amount": "1800.0", "discount_amount": "0.0", "tax_amount": "0.0", "total_amount": "1800.0", "credit_amount": "0.0", "paid_amount": "0.0", "refund_amount": "0.0", "due_amount": "1800.0", "line_items": [ { "uid": "li_98nbmb9jgz84c", "title": "Some product", "description": "12/02/2020 - 12/02/2020", "quantity": "12.0", "unit_price": "150.0", "subtotal_amount": "1800.0", "discount_amount": "0.0", "tax_amount": "0.0", "tax_included": false, "total_amount": "1800.0", "tiered_unit_price": false, "period_range_start": "2020-12-02", "period_range_end": "2020-12-02", "product_id": null, "product_version": null, "product_price_point_id": null, "component_id": null, "price_point_id": null } ], "public_url": "https://www.test-chargifypay.com/invoice/inv_98nbmb93gxjz8?token=rmfmwvbdy4xmyw5f29j5gc6x" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### Update Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/update-invoice Updates an ad hoc invoice while it is in the `draft` state. **Important: only invoices with the `adhoc` role and `draft` status can be updated.** Any other invoice — issued, or with a different role (e.g. `renewal`, `signup`) — cannot be updated through this endpoint and the request returns a `422` error. If the invoice does not belong to the provided subscription, a `404` error is returned. Only the attributes submitted in the request are changed — omitted attributes keep their current values. ### Line Items The `line_items` array describes changes to the invoice's line items. Line items not referenced in the array remain unchanged. #### Adding a line item A line item without a `uid` is added to the invoice. The same line item types and options as on invoice creation are supported (custom items, `product_id`, `component_id`, price points, period date ranges, taxes). #### Updating a line item A line item with the `uid` of an existing line item updates that line item with the submitted attributes. Amounts and taxes are recalculated. #### Removing a line item A line item with a `uid` and `"_destroy": true` is removed from the invoice. Other line items remain unchanged. Referencing a `uid` which does not exist on the invoice returns a `422` error. ### Coupons When the `coupons` key is present, the submitted coupons replace all discounts currently applied to the invoice. Send an empty array to remove all discounts. Coupon options are the same as on invoice creation. ### Invoice Options #### Issue Date and Net Terms The `issue_date` parameter can be sent to change the invoice's issue date. Only today or dates in the past are accepted. The date is interpreted and validated in your site's time zone, using the `YYYY-MM-DD` format. The `net_terms` parameter indicates the number of days after the issue date on which the invoice is due. The due date is recalculated whenever the issue date or net terms change. #### Addresses The seller, shipping and billing addresses can be sent to replace the addresses on the invoice. Each address requires to send a `first_name` at a minimum in order to work. Taxes are recalculated after an address change. #### Memo and Payment Instructions A custom memo can be sent with the `memo` parameter. Likewise, custom payment instructions can be sent with the `payment_instructions` parameter. ```http PUT /subscriptions/{subscription_id}/invoices/{uid}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | | `body` | [`Update Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-invoice-request) | Body, Optional | Request payload for updating a draft ad hoc invoice. | # Response Type **200**: OK [`Invoice Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/invoices/uid0.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "invoice": { "memo": "Updated memo", "net_terms": 30 } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### Delete Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/delete-invoice Deletes an ad hoc invoice while it is in the `draft` state. **Important: only invoices with the `adhoc` role and `draft` status can be deleted.** Any other invoice — issued, or with a different role (e.g. `renewal`, `signup`) — cannot be deleted through this endpoint and the request returns a `422` error. Issued invoices should be voided instead. If the invoice does not belong to the provided subscription, a `404` error is returned. A successful deletion returns a `204 No Content` response and the invoice is permanently removed. ```http DELETE /subscriptions/{subscription_id}/invoices/{uid}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscriptions/222/invoices/uid0.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Send Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/send-invoice Sends an invoice to the customer via email. This endpoint supports the delivery of both ad-hoc and automatically generated invoices. Additionally, this endpoint supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. **File Attachments**: You can attach files to invoice emails using `attachment_urls[]` parameter by providing URLs to the files you want to attach. When using attachments, the request must use `multipart/form-data` content type. Max 10 files, 10MB per file. If no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address. On success, a 204 no-content response will be returned. The response does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for delivery. If _any_ invalid or malformed email address is found in the request body, the entire request will be rejected and a 422 response will be returned. ```http POST /invoices/{uid}/deliveries.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | | `body` | [`Send Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/send-invoice-request) | Body, Optional | - | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/invoices/uid0/deliveries.json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "recipient_emails": [ "user0@example.com" ], "cc_recipient_emails": [ "user1@example.com" ], "bcc_recipient_emails": [ "user2@example.com" ] }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Preview Customer Information Changes Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/preview-customer-information-changes Previews the effect of customer information changes on an open invoice. Customer information may change after an invoice is issued, which may lead to a mismatch between customer information that is present on an open invoice and actual customer information. This endpoint allows you to preview these differences, if any. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. ```http POST /invoices/{uid}/customer_information/preview.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | # Response Type **200**: OK [`Customer Changes Preview Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-changes-preview-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/invoices/uid0/customer_information/preview.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "changes": { "payer": { "before": { "last_name": "Beatty" }, "after": { "last_name": "Doe" } }, "shipping_address": { "before": { "line2": "Suite 703" }, "after": { "line2": "Suite 702" } }, "billing_address": { "before": { "line2": "Suite 703" }, "after": { "line2": "Suite 702" } }, "custom_fields": { "before": [ { "owner_id": 1002, "owner_type": "Customer", "name": "Color", "value": "blue", "metadatum_id": 20 } ], "after": [ { "owner_id": 1002, "owner_type": "Customer", "name": "Color", "value": "green", "metadatum_id": 20 } ] } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Update Customer Information Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/update-customer-information Updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint first. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. ```http PUT /invoices/{uid}/customer_information.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | # Response Type **200**: OK [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/invoices/uid0/customer_information.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "uid": "elit Ut", "site_id": 46283786, "customer_id": -62349460, "subscription_id": 12801726, "number": "dolore et ut", "sequence_number": -84210096, "issue_date": "2017-01-01", "due_date": "2017-01-30", "paid_date": "2017-01-28", "status": "open", "collection_method": "automatic", "payment_instructions": "enim officia", "currency": "dolore", "consolidation_level": "none", "product_name": "occaecat veniam culpa", "product_family_name": "qui commodo ea dolore cillum", "seller": { "name": "co", "phone": "ullamco in officia" }, "customer": { "chargify_id": -55826334, "first_name": "deserunt", "last_name": "velit dolore", "email": "aliquip sed velit Lorem" }, "memo": "ea cupidatat deserunt", "billing_address": { "street": "qui commodo cupidatat sunt", "line2": "ut officia enim", "city": "velit minim dolore sint nulla", "state": "velit", "zip": "ullamco", "country": "irure est laborum deserun" }, "shipping_address": { "street": "do fugiat dolore deserunt officia", "line2": "ipsum cillum", "city": "aliqua laboris incididunt ut", "state": "et fugiat sit", "zip": "dolore do", "country": "Excepteur consequat cillum" }, "subtotal_amount": "dolore mollit", "discount_amount": "aute", "tax_amount": "eu aliqua est velit ea", "total_amount": "ut non", "credit_amount": "sit", "refund_amount": "et eiusmod qui sed", "paid_amount": "amet nulla s", "due_amount": "non esse ullamco", "line_items": [ { "description": "qui", "price_point_id": 123, "tax_amount": "occaecat deserunt veniam", "subtotal_amount": "commodo consequat tempor et Duis" }, { "uid": "", "subtotal_amount": "ven" }, { "price_point_id": 94750853, "product_id": 79058036, "tax_amount": "1.0", "subtotal_amount": "128.5" }, { "unit_price": "eiusmod consequat ut nostrud", "tax_amount": "quis nulla proident" }, { "period_range_end": "2022-02-02", "product_id": 57352537, "description": "minim in dolore Ut Excepteur", "uid": "sit qui in ullamco anim" } ], "discounts": [ { "title": "nostrud" } ], "taxes": [ { "source_type": "Tax", "line_item_breakouts": [ { "uid": "in ipsum", "tax_amount": "velit", "taxable_amount": "quis sint" }, { "uid": "co" } ] }, { "uid": "enim irure in", "title": "incididunt est mollit irure" } ], "credits": [ { "uid": "exercitation eiusmod", "transaction_time": "2024-01-23T13:51:27Z", "credit_note_number": "qui fugiat labore laborum", "credit_note_uid": "ipsum sunt" }, { "memo": "dolor" } ], "refunds": [ { "memo": "deserunt elit" }, { "original_amount": "Duis nulla" } ], "payments": [ { "prepayment": false, "memo": "enim Excepteur Lorem magna sit" }, { "transaction_time": "2024-01-23T13:51:27Z", "prepayment": false, "payment_method": { "details": "labore ut et", "kind": "dolor qui", "memo": "ea commodo", "type": "fugiat veniam", "card_brand": "consequat", "card_expiration": "aliqua a", "last_four": "ut in consectetur sed", "masked_card_number": "minim ea ullamco nostrud tempor" } }, { "prepayment": true, "transaction_id": 67527234 }, { "original_amount": "c", "memo": "dolore fugiat labore" } ], "custom_fields": [ { "name": "CustomerStatus", "value": "Gold", "owner_type": "Customer", "owner_id": 18482224, "metadatum_id": 13924 }, { "name": "SubscriptionTag", "value": "Special Subscriber", "owner_type": "Subscription", "owner_id": 21344, "metadatum_id": 139245 } ], "public_url": "dolo", "previous_balance_data": { "captured_at": "2024-01-09T11:22:23-05:00", "invoices": [ { "number": "veniam dolore labore ipsum cupidatat", "uid": "tempor", "outstanding_amount": "Excepteur nostrud irur" }, { "outstanding_amount": "id" } ] }, "public_url_expires_on": "2024-11-21" } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Issue Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/invoices/issue-invoice Issues an invoice that is in "pending" or "draft" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. You cannot issue a pending child invoice that was created for a member subscription in a group. For Remittance subscriptions, the invoice will go into "open" status and payment won't be attempted. The value for `on_failed_payment` would be rejected if sent. Any prepayments or service credits that exist on the subscription will be automatically applied. Additionally, if the setting is enabled, an email will be sent for the issued invoice. For Automatic subscriptions, prepayments and service credits will apply to the invoice before payment is attempted. On successful payment, the invoice will go into "paid" status and email will be sent to the customer (if setting applies). When payment fails, the next event depends on the `on_failed_payment` value: - `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option. - `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history. - `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings). ```http POST /invoices/{uid}/issue.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | | `body` | [`Issue Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-invoice-request) | Body, Optional | - | # Response Type **200**: OK [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/invoices/uid0/issue.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "on_failed_payment": "leave_open_invoice" }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Offers ##### Create Offer Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/offers/create-offer Creates an offer within your site. Offers allow you to package complicated combinations of products, components and coupons into a convenient package which can then be subscribed to just like products. Once an offer is defined it can be used as an alternative to the product when creating subscriptions. For more information, see [Offers](https://maxio.zendesk.com/hc/en-us/articles/24261295098637-Offers-Overview) in the product documentation. ## Using a Product Price Point You can optionally pass in a `product_price_point_id` that corresponds with the `product_id` and the offer will use that price point. If a `product_price_point_id` is not passed in, the product's default price point will be used. ```http POST /offers.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Offer Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-offer-request) | Body, Optional | - | # Response Type **201**: Created [`Offer Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/offers.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "offer": { "name": "Solo", "handle": "han_shot_first", "description": "A Star Wars Story", "product_id": 31, "product_price_point_id": 102, "components": [ { "component_id": 24, "starting_quantity": 1 } ], "coupons": [ "DEF456" ] } }' ``` # Example Response *(as JSON)* ```json { "offer": { "id": 3, "site_id": 2, "product_family_id": 4, "product_family_name": "Chargify", "product_id": 31, "product_name": "30-Day Square Trial", "product_price_in_cents": 2000, "product_revisable_number": 0, "name": "Solo", "handle": "han_shot_first", "description": "A Star Wars Story", "created_at": "2018-06-08T14:51:52-04:00", "updated_at": "2018-06-08T14:51:52-04:00", "archived_at": null, "product_price_point_name": "Default", "offer_items": [ { "component_id": 24, "component_name": "Invoices", "component_unit_price": "3.0", "price_point_id": 104, "price_point_name": "Original", "starting_quantity": "1.0", "editable": false } ], "offer_discounts": [ { "coupon_id": 3, "coupon_code": "DEF456", "coupon_name": "IB Loyalty" } ] } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### List Offers Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/offers/list-offers Lists offers for a site. ```http GET /offers.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `include_archived` | `Boolean` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | # Response Type **200**: OK [`List Offers Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-offers-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/offers.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'include_archived=true' ``` # Example Response *(as JSON)* ```json { "offers": [ { "id": 239, "site_id": 48110, "product_family_id": 1025627, "product_family_name": "Gold", "product_id": 110, "product_name": "Pro", "product_price_in_cents": 1000, "product_revisable_number": 0, "product_price_point_id": 138, "product_price_point_name": "Default", "name": "Third Offer", "handle": "third", "description": "", "created_at": "2018-08-03T09:56:11-05:00", "updated_at": "2018-08-03T09:56:11-05:00", "archived_at": null, "offer_items": [ { "component_id": 426665, "component_name": "Database Size (GB)", "component_unit_price": "1.0", "price_point_id": 149438, "price_point_name": "Auto-created", "starting_quantity": "0.0", "editable": false } ], "offer_discounts": [ { "coupon_id": 234, "coupon_code": "GR8_CUSTOMER", "coupon_name": "Multi-service Discount" } ], "offer_signup_pages": [ { "id": 356482, "nickname": "ggoods", "enabled": true, "return_url": "", "return_params": "", "url": "https://general-goods.chargifypay.com/subscribe/hjpvhnw63tzy" } ] } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Offer Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/offers/read-offer Returns a specific offer's attributes. This is different from listing all offers for a site, as it requires an `offer_id`. ```http GET /offers/{offer_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `offer_id` | `Number` | Template, Required | The Chargify id of the offer | # Response Type **200**: OK [`Offer Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/offers/130.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` ##### Archive Offer Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/offers/archive-offer Archives an existing offer. Please provide an `offer_id` in order to archive the correct item. ```http PUT /offers/{offer_id}/archive.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `offer_id` | `Number` | Template, Required | The Chargify id of the offer | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/offers/130/archive.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` ##### Unarchive Offer Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/offers/unarchive-offer Unarchives a previously archived offer. Please provide an `offer_id` in order to unarchive the correct item. ```http PUT /offers/{offer_id}/unarchive.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `offer_id` | `Number` | Template, Required | The Chargify id of the offer | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/offers/130/unarchive.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` #### Payment Profiles ##### Create Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/create-payment-profile Creates a payment profile for a customer. When you create a new payment profile for a customer via the API, it does not automatically make the profile current for any of the customer’s subscriptions. To use the payment profile as the default, you must set it explicitly for the subscription or subscription group. Select an option from the **Request Examples** drop-down on the right side of the portal to see examples of common scenarios for creating payment profiles. Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox. Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information. See the following articles to learn more about subscriptions and payments: + [Subscriber Payment Details](https://maxio.zendesk.com/hc/en-us/articles/24251599929613-Subscription-Summary-Payment-Details-Tab) + [Self Service Pages](https://maxio.zendesk.com/hc/en-us/articles/24261425318541-Self-Service-Pages) (Allows credit card updates by Subscriber) + [Public Signup Pages payment settings](https://maxio.zendesk.com/hc/en-us/articles/24261368332557-Individual-Page-Settings) + [Taxes](https://developers.chargify.com/docs/developer-docs/d2e9e34db740e-signups#taxes) + [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview) + [Maxio.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) + [Maxio.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) + [Maxio.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) + [Maxio.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7) + [Maxio.js with Stripe BECS Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway) + [Maxio.js with Stripe BECS Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway) + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) + [Full documentation on Stripe SEPA Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) + [Full documentation on Stripe BECS Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) + [Full documentation on Stripe BACS Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) ## 3D Secure (3DS) Authentication post-authentication flow When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```http POST /payment_profiles.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Payment Profile Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-payment-profile-request) | Body, Optional | When following the IBAN or the Local Bank details examples, a customer, bank account and mandate will be created in your current vault. If the customer, bank account, and mandate already exist in your vault, follow the Import example to link the payment profile into Advanced Billing. | # Response Type **200**: OK [`Payment Profile Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/payment_profiles.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "payment_profile": { "customer_id": 1036, "chargify_token": "tok_w68qcpnftyv53jk33jv6wk3w" } }' ``` # Example Response *(as JSON)* ```json { "payment_profile": { "first_name": "Jessica", "last_name": "Test", "card_type": "visa", "masked_card_number": "XXXX-XXXX-XXXX-1111", "expiration_month": 10, "expiration_year": 2018, "customer_id": 19195410, "current_vault": "bogus", "vault_token": "1", "billing_address": "123 Main St.", "billing_city": "Boston", "billing_state": "MA", "billing_zip": "02120", "billing_country": "US", "customer_vault_token": null, "billing_address_2": null, "payment_type": "credit_card", "site_gateway_setting_id": 1, "gateway_handle": "handle", "disabled": false } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Payment Profiles Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/list-payment-profiles Lists all active payment profiles for a site, or for one customer within a site. If no payment profiles are found, this endpoint returns an empty array. ```http GET /payment_profiles.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `customer_id` | `Number` | Query, Optional | The ID of the customer for which you wish to list payment profiles | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/payment_profiles.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json [ { "payment_profile": { "id": 10089892, "first_name": "Chester", "last_name": "Tester", "created_at": "2025-01-01T00:00:00-05:00", "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", "billing_address": "456 Juniper Court", "billing_city": "Boulder", "billing_state": "CO", "billing_zip": "80302", "billing_country": "US", "customer_vault_token": null, "billing_address_2": "", "bank_name": "Bank of Kansas City", "masked_bank_routing_number": "XXXX6789", "masked_bank_account_number": "XXXX3344", "bank_account_type": "checking", "bank_account_holder_type": "personal", "payment_type": "bank_account", "verified": true, "site_gateway_setting_id": 1, "gateway_handle": "handle" } }, { "payment_profile": { "id": 10188522, "first_name": "Frankie", "last_name": "Tester", "created_at": "2025-01-01T00:00:00-05:00", "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543712, "current_vault": "bogus", "vault_token": "123456789", "billing_address": "123 Montana Way", "billing_city": "Los Angeles", "billing_state": "CA", "billing_zip": "90210", "billing_country": "US", "customer_vault_token": null, "billing_address_2": "", "bank_name": "Bank of Kansas City", "masked_bank_routing_number": "XXXX6789", "masked_bank_account_number": "XXXX6789", "bank_account_type": "checking", "bank_account_holder_type": "personal", "payment_type": "bank_account", "verified": true, "site_gateway_setting_id": 1, "gateway_handle": "handle" } } ] ``` ##### Read Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/read-payment-profile Returns a payment profile identified by its unique ID. Note that a different JSON object will be returned if the card method on file is a bank account. ### Response for Bank Account Example response for Bank Account: ``` { "payment_profile": { "id": 10089892, "first_name": "Chester", "last_name": "Tester", "created_at": "2025-01-01T00:00:00-05:00", "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", "billing_address": "456 Juniper Court", "billing_city": "Boulder", "billing_state": "CO", "billing_zip": "80302", "billing_country": "US", "customer_vault_token": null, "billing_address_2": "", "bank_name": "Bank of Kansas City", "masked_bank_routing_number": "XXXX6789", "masked_bank_account_number": "XXXX3344", "bank_account_type": "checking", "bank_account_holder_type": "personal", "payment_type": "bank_account", "site_gateway_setting_id": 1, "gateway_handle": null } } ``` ```http GET /payment_profiles/{payment_profile_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile_id` | `Number` | Template, Required | The Chargify id of the payment profile | # Response Type **200**: OK [`Payment Profile Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/payment_profiles/198.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "payment_profile": { "id": 10088716, "first_name": "Test", "last_name": "Subscription", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 1, "expiration_year": 2022, "created_at": "2025-01-01T00:00:00-05:00", "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "1", "billing_address": "123 Montana Way", "billing_city": "Billings", "billing_state": "MT", "billing_zip": "59101", "billing_country": "US", "customer_vault_token": null, "billing_address_2": "", "payment_type": "credit_card", "site_gateway_setting_id": 1, "gateway_handle": null } } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Update Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/update-payment-profile Updates a payment profile. ## Partial Card Updates In the event that you are using the Authorize.net, Stripe, Cybersource, Forte or Braintree Blue payment gateways, you can update just the billing and contact information for a payment method. Note the lack of credit-card related data contained in the JSON payload. In this case, the following JSON is acceptable: ``` { "payment_profile": { "first_name": "Kelly", "last_name": "Test", "billing_address": "789 Juniper Court", "billing_city": "Boulder", "billing_state": "CO", "billing_zip": "80302", "billing_country": "US", "billing_address_2": null } } ``` The result will be that you have updated the billing information for the card, yet retained the original card number data. ## Specific notes on updating payment profiles - Merchants with **Authorize.net**, **Cybersource**, **Forte**, **Braintree Blue** or **Stripe** as their payment gateway can update their Customer’s credit cards without passing in the full credit card number and CVV. - If you are using **Authorize.net**, **Cybersource**, **Forte**, **Braintree Blue** or **Stripe**, Advanced Billing will ignore the credit card number and CVV when processing an update via the API, and attempt a partial update instead. If you wish to change the card number on a payment profile, you will need to create a new payment profile for the given customer. - A Payment Profile cannot be updated with the attributes of another type of Payment Profile. For example, if the payment profile you are attempting to update is a credit card, you cannot pass in bank account attributes (like `bank_account_number`), and vice versa. - Updating a payment profile directly will not trigger an attempt to capture a past-due balance. If this is the intent, update the card details via the Subscription instead. - If you are using Authorize.net or Stripe, you may elect to manually trigger a retry for a past due subscription after a partial update. ```http PUT /payment_profiles/{payment_profile_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile_id` | `Number` | Template, Required | The Chargify id of the payment profile | | `body` | [`Update Payment Profile Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-payment-profile-request) | Body, Optional | - | # Response Type **200**: OK [`Payment Profile Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/payment_profiles/198.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "payment_profile": { "first_name": "Graham", "last_name": "Test", "billing_address": "456 Juniper Court", "billing_city": "Boulder", "billing_state": "CO", "billing_zip": "80302", "billing_country": "US", "billing_address_2": "billing_address_22" } }' ``` # Example Response *(as JSON)* ```json { "payment_profile": { "id": 10088716, "first_name": "Test", "last_name": "Subscription", "billing_address": "123 Montana Way", "billing_city": "Billings", "billing_state": "MT", "billing_zip": "59101", "billing_country": "US", "billing_address_2": "", "payment_type": "bank_account" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error String Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-string-map-response) | ##### Delete Unused Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/delete-unused-payment-profile Deletes an unused payment profile. If the payment profile is in use by one or more subscriptions or groups, an error message is returned. ```http DELETE /payment_profiles/{payment_profile_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile_id` | `Number` | Template, Required | The Chargify id of the payment profile | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/payment_profiles/198.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Delete Subscriptions Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/delete-subscriptions-payment-profile Deletes a payment profile belonging to the customer on the subscription. If the customer has multiple subscriptions, the payment profile is removed from all of them. If you delete the default payment profile for a subscription, you need to specify another payment profile to be the default through the API, or either prompt the user to enter a card in the billing portal or on the self-service page, or visit the Payment Details tab on the subscription in the Admin UI and use the “Add New Credit Card” or “Make Active Payment Method” link, (depending on whether there are other cards present). ```http DELETE /subscriptions/{subscription_id}/payment_profiles/{payment_profile_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `payment_profile_id` | `Number` | Template, Required | The Chargify id of the payment profile | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscriptions/222/payment_profiles/198.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` ##### Verify Bank Account Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/verify-bank-account Verifies a bank account. Submit the two small deposit amounts the customer received in their bank account to verify the bank account. (Stripe only) ```http PUT /bank_accounts/{bank_account_id}/verification.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `bank_account_id` | `Number` | Template, Required | Identifier of the bank account in the system. | | `body` | [`Bank Account Verification Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-verification-request) | Body, Optional | - | # Response Type **200**: OK [`Bank Account Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/bank_accounts/252/verification.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "bank_account_verification": { "deposit_1_in_cents": 32, "deposit_2_in_cents": 45 } }' ``` # Example Response *(as JSON)* ```json { "payment_profile": { "id": 10089892, "first_name": "John", "last_name": "Doe", "customer_id": 14543792, "current_vault": "stripe_connect", "vault_token": "cus_0123abc456def", "billing_address": "456 Juniper Court", "billing_city": "Boulder", "billing_state": "CO", "billing_zip": "80302", "billing_country": "US", "customer_vault_token": null, "billing_address_2": "", "bank_name": "Bank of Kansas City", "masked_bank_routing_number": "XXXX6789", "masked_bank_account_number": "XXXX3344", "bank_account_type": "checking", "bank_account_holder_type": "personal", "payment_type": "bank_account" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Delete Subscription Group Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/delete-subscription-group-payment-profile Deletes a Payment Profile belonging to a Subscription Group. **Note**: If the Payment Profile belongs to multiple Subscription Groups and/or Subscriptions, it will be removed from all of them. ```http DELETE /subscription_groups/{uid}/payment_profiles/{payment_profile_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `payment_profile_id` | `Number` | Template, Required | The Chargify id of the payment profile | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/payment_profiles/198.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` ##### Change Subscription Default Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/change-subscription-default-payment-profile Changes the default payment profile on the subscription to the existing payment profile with the specified ID. You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint. ```http POST /subscriptions/{subscription_id}/payment_profiles/{payment_profile_id}/change_payment_profile.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `payment_profile_id` | `Number` | Template, Required | The Chargify id of the payment profile | # Response Type **201**: Created [`Payment Profile Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/payment_profiles/198/change_payment_profile.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "payment_profile": { "id": 10211899, "first_name": "Amelia", "last_name": "Example", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 2, "expiration_year": 2018, "customer_id": 14399371, "current_vault": "bogus", "vault_token": "1", "billing_address": "", "billing_city": "", "billing_state": "", "billing_zip": "", "billing_country": "", "customer_vault_token": null, "billing_address_2": "", "payment_type": "credit_card", "site_gateway_setting_id": 1, "gateway_handle": null } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Change Subscription Group Default Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/change-subscription-group-default-payment-profile Changes the default payment profile on the subscription group to the existing payment profile with the specified ID. You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint. The new payment profile must belong to the subscription group's customer, otherwise you will receive an error. ```http POST /subscription_groups/{uid}/payment_profiles/{payment_profile_id}/change_payment_profile.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `payment_profile_id` | `Number` | Template, Required | The Chargify id of the payment profile | # Response Type **201**: Created [`Payment Profile Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/payment_profiles/198/change_payment_profile.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "payment_profile": { "id": 10211899, "first_name": "Amelia", "last_name": "Example", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 2, "expiration_year": 2018, "customer_id": 14399371, "current_vault": "bogus", "vault_token": "1", "billing_address": "", "billing_city": "", "billing_state": "", "billing_zip": "", "billing_country": "", "customer_vault_token": null, "billing_address_2": "", "payment_type": "credit_card", "site_gateway_setting_id": 1, "gateway_handle": null } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read One Time Token Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/read-one-time-token Returns the one-time token data, including credit card or ACH details, associated with the provided token ID. One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Authorize.Net or Stripe only) data for a customer. You can use One Time Tokens while creating a subscription or payment profile instead of passing all bank account or credit card data directly to a given API endpoint. To obtain a One Time Token you have to use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). ```http GET /one_time_tokens/{chargify_token}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `chargify_token` | `String` | Template, Required | Advanced Billing Token | # Response Type **200**: OK [`Get One Time Token Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/get-one-time-token-request) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/one_time_tokens/chargify_token8.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Send Request Update Payment Email Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/send-request-update-payment-email Sends a "request payment update" email to the customer associated with the subscription. If you attempt to send a "request payment update" email more than five times within a 30-minute period, you will receive a `422` response with an error message in the body. This error message will indicate that the request has been rejected due to excessive attempts, and will provide instructions on how to resubmit the request. Additionally, if you attempt to send a "request payment update" email for a subscription that does not exist, you will receive a `404` error response. This error message will indicate that the subscription could not be found, and will provide instructions on how to correct the error and resubmit the request. These error responses are designed to prevent excessive or invalid requests, and to provide clear and helpful information to users who encounter errors during the request process. ```http POST /subscriptions/{subscription_id}/request_payment_profiles_update.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **201**: Created `Void` # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/request_payment_profiles_update.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Product Families ##### List Products for Product Family Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-families/list-products-for-product-family Retrieves a list of Products belonging to a Product Family. ```http GET /product_families/{product_family_id}/products.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `String` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `date_field` | [`Basic Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `filter` | [`List Products Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-products-filter) | Query, Optional | Filter to use for List Products operations | | `start_date` | `Date` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `Date` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `start_datetime` | `DateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `end_datetime` | `DateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `include_archived` | `Boolean` | Query, Optional | Include archived products. | | `include` | [`List Products Include`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-products-include) | Query, Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/product_families/product_family_id4/products.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'date_field=updated_at' \ -d 'filter[ids]=1%2C2%2C3' \ -d 'include=prepaid_product_price_point' ``` # Example Response *(as JSON)* ```json [ { "product": { "id": 3801242, "name": "Free product", "handle": "zero-dollar-product", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2016-04-21T16:08:39-04:00", "updated_at": "2016-08-03T11:27:53-04:00", "price_in_cents": 10000, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": 0, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": false, "return_params": "", "taxable": false, "update_return_url": "", "initial_charge_after_trial": false, "version_number": 4, "update_return_params": "", "product_family": { "id": 527890, "name": "Acme Projects", "description": "", "handle": "billing-plans", "accounting_code": null }, "public_signup_pages": [ { "id": 283460, "return_url": null, "return_params": "", "url": "https://general-goods.chargify.com/subscribe/smcc4j3d2w6h/zero-dollar-product" } ], "product_price_point_name": "Default", "use_site_exchange_rate": true } }, { "product": { "id": 3858146, "name": "Calendar Billing Product", "handle": "calendar-billing-product", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2016-07-05T13:07:38-04:00", "updated_at": "2016-07-05T13:07:38-04:00", "price_in_cents": 10000, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": true, "return_params": "", "taxable": false, "update_return_url": "", "initial_charge_after_trial": false, "version_number": 1, "update_return_params": "", "product_family": { "id": 527890, "name": "Acme Projects", "description": "", "handle": "billing-plans", "accounting_code": null }, "public_signup_pages": [ { "id": 289193, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/gxdbfxzxhcjq/calendar-billing-product" } ], "product_price_point_name": "Default", "use_site_exchange_rate": true } } ] ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Create Product Family Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-families/create-product-family Creates a Product Family within your site. Create a Product Family to act as a container for your products, components, and coupons. Full documentation on how Product Families operate within the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-Families). ```http POST /product_families.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Product Family Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-family-request) | Body, Optional | - | # Response Type **201**: Created [`Product Family Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-family-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/product_families.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "product_family": { "name": "Acme Projects", "description": "Amazing project management tool", "surcharging": false } }' ``` # Example Response *(as JSON)* ```json { "product_family": { "id": 933860, "name": "Acme Projects", "description": "Amazing project management tool", "handle": "acme-projects", "accounting_code": null, "surcharging": false } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Product Families Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-families/list-product-families Lists Product Families for a site. ```http GET /product_families.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `date_field` | [`Basic Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `start_date` | `Date` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `Date` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `start_datetime` | `DateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `end_datetime` | `DateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-family-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/product_families.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'date_field=updated_at' ``` # Example Response *(as JSON)* ```json [ { "product_family": { "id": 37, "name": "Acme Projects", "description": null, "handle": "acme-projects", "accounting_code": null, "surcharging": false, "created_at": "2013-02-20T15:05:51-07:00", "updated_at": "2013-02-20T15:05:51-07:00", "archived_at": null } }, { "product_family": { "id": 155, "name": "Bat Family", "description": "Another family.", "handle": "bat-family", "accounting_code": null, "surcharging": true, "created_at": "2014-04-16T12:41:13-06:00", "updated_at": "2014-04-16T12:41:13-06:00", "archived_at": "2024-11-05T09:30:00-07:00" } } ] ``` ##### Read Product Family Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-families/read-product-family Retrieves a Product Family via the `product_family_id`. The response will contain a Product Family object. The product family can be specified either with the id number, or with the `handle:my-family` format. ```http GET /product_families/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Template, Required | The Advanced Billing id of the product family | # Response Type **200**: OK [`Product Family Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-family-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/product_families/112.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "product_family": { "id": 527890, "name": "Acme Projects", "description": "", "handle": "billing-plans", "accounting_code": null, "surcharging": false, "archived_at": null } } ``` #### Product Features ##### List Product Features Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-features/list-product-features Returns the feature catalog items attached to this product, including price-point-specific overrides. ```http GET /products/{product_id}/features.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product. | # Response Type **200**: OK [`Feature Catalog Items List Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-items-list-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/products/202/features.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | ##### Create Product Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-features/create-product-feature Attaches a feature template to this product with a concrete value. Pass `price_point_type: "ProductPricePoint"` and `price_point_id` to create an override scoped to a single product price point instead of the whole product. ```http POST /products/{product_id}/features.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product. | | `body` | [`Create Feature Catalog Item Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-feature-catalog-item-request) | Body, Optional | The owning product or component is taken from the URL and must not be included in the request body. | # Response Type **201**: Created [`Feature Catalog Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/products/202/features.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "feature": { "feature_template_id": 196, "value": "value6", "propagate_to_subscriptions": false } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Product Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-features/read-product-feature Returns a single feature catalog item attached to this product. ```http GET /products/{product_id}/features/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product. | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature catalog item. | # Response Type **200**: OK [`Feature Catalog Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/products/202/features/112.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | ##### Update Product Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-features/update-product-feature Updates the value or periodicity of a feature catalog item attached to this product. ```http PUT /products/{product_id}/features/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product. | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature catalog item. | | `body` | [`Update Feature Catalog Item Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-feature-catalog-item-request) | Body, Optional | - | # Response Type **200**: OK [`Feature Catalog Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/products/202/features/112.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "feature": { "propagate_to_subscriptions": false } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Remove Product Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-features/remove-product-feature Removes a feature catalog item from this product. ```http DELETE /products/{product_id}/features/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product. | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature catalog item. | | `destroy_entitlements` | `Boolean` | Query, Optional | When `true`, permanently deletes this feature catalog item and every entitlement it created, revoking subscriber access immediately. When `false` (default), the feature catalog item is archived and existing entitlements are preserved.

**Default**: `false` | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE -G \ --url 'https://subdomain.chargify.com/products/202/features/112.json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'destroy_entitlements=false' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | ##### Restore Product Feature Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-features/restore-product-feature Returns `422` if the parent feature template is still archived — restore the feature template first. ```http POST /products/{product_id}/features/{id}/restore.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product. | | `id` | `Number` | Template, Required | The Advanced Billing id of the feature catalog item. | # Response Type **200**: OK [`Feature Catalog Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/products/202/features/112/restore.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 403 | Forbidden | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Products ##### Create Product Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/create-product Creates a product in your site. If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, the `auto_create_signup_page` parameter is not supported. If `auto_create_signup_page` is included (with any value) an error is returned. For more information, see: + [Products Overview](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview) + [Changing a Subscription's Product](https://maxio.zendesk.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations) ```http POST /product_families/{product_family_id}/products.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_family_id` | `String` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | | `body` | [`Create or Update Product Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-product-request) | Body, Optional | - | # Response Type **201**: Created [`Product Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/product_families/product_family_id4/products.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "product": { "name": "Gold Plan", "handle": "gold", "description": "This is our gold plan.", "accounting_code": "123", "require_credit_card": true, "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "auto_create_signup_page": true, "tax_code": "D0000000" } }' ``` # Example Response *(as JSON)* ```json { "product": { "id": 4364984, "name": "Gold Plan", "handle": "gold", "description": "This is our gold plan.", "accounting_code": "123", "request_credit_card": true, "created_at": "2016-11-04T16:31:15-04:00", "updated_at": "2016-11-04T16:31:15-04:00", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "expiration_interval_unit": null, "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": null, "archived_at": null, "require_credit_card": true, "return_params": null, "taxable": false, "update_return_url": null, "initial_charge_after_trial": false, "version_number": 1, "update_return_params": null, "product_family": { "id": 527890, "name": "Acme Projects", "description": "", "handle": "billing-plans", "accounting_code": null }, "public_signup_pages": [ { "id": 301078, "return_url": null, "return_params": null, "url": "https://general-goods.chargify.com/subscribe/ftgbpq7f5qpr/gold" } ], "product_price_point_name": "Default" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Product Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/read-product Reads the current details of a product. ```http GET /products/{product_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product | | `include_features` | `Boolean` | Query, Optional | When `true`, embeds the active feature catalog items for each result in a `features` array. Default value is `false`.

**Default**: `false` | # Response Type **200**: OK [`Product Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/products/202.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'include_features=false' ``` # Example Response *(as JSON)* ```json { "product": { "id": 4535635, "name": "Paid Annual Seats", "handle": "paid-annual-seats", "description": "Paid annual seats for our commercial enterprise product", "accounting_code": "paid-annual-seats", "request_credit_card": true, "expiration_interval": 1, "expiration_interval_unit": "day", "created_at": "2017-08-25T10:25:31-05:00", "updated_at": "2018-01-16T12:58:04-06:00", "price_in_cents": 10000, "interval": 12, "interval_unit": "month", "initial_charge_in_cents": 4900, "trial_price_in_cents": 1000, "trial_interval": 14, "trial_interval_unit": "day", "archived_at": null, "require_credit_card": true, "return_params": "id={subscription_id}&ref={customer_reference}", "taxable": true, "update_return_url": "http://www.example.com", "tax_code": "D0000000", "initial_charge_after_trial": false, "version_number": 4, "update_return_params": "id={subscription_id}&ref={customer_reference}", "product_family": { "id": 1025627, "name": "Acme Products", "description": "", "handle": "acme-products", "accounting_code": null }, "product_price_point_name": "Default" } } ``` ##### Update Product Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/update-product Updates aspects of an existing product. ### Input Attributes Update Notes + `update_return_params` The parameters we will append to your `update_return_url`. See Return URLs and Parameters ### Product Price Point Updating a product using this endpoint will create a new price point and set it as the default price point for this product. If you should like to update an existing product price point, that must be done separately. ```http PUT /products/{product_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product | | `body` | [`Create or Update Product Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-product-request) | Body, Optional | - | # Response Type **200**: OK [`Product Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/products/202.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "product": { "id": 4365034, "name": "Platinum Plan", "handle": "platinum", "description": "This is our platinum plan.", "accounting_code": "123", "request_credit_card": true, "created_at": "2016-11-04T16:34:29-04:00", "updated_at": "2016-11-04T16:37:11-04:00", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": null, "archived_at": null, "require_credit_card": true, "return_params": null, "taxable": false, "update_return_url": null, "initial_charge_after_trial": false, "version_number": 1, "update_return_params": null, "product_family": { "id": 527890, "name": "Acme Projects", "description": "", "handle": "billing-plans", "accounting_code": null }, "public_signup_pages": [ { "id": 301079, "return_url": null, "return_params": null, "url": "https://general-goods.chargify.com/subscribe/wgyd96tb5pj9/platinum" } ], "product_price_point_name": "Original" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Archive Product Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/archive-product Archives the product. All current subscribers will be unaffected; their subscription/purchase will continue to be charged monthly. This will restrict the option to chose the product for purchase via the Billing Portal, as well as disable Public Signup Pages for the product. ```http DELETE /products/{product_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product | # Response Type **200**: OK [`Product Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/products/202.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "product": { "id": 4535638, "name": "Business Monthly", "handle": null, "description": "Business Monthly", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2017-08-25T10:25:31-05:00", "updated_at": "2018-01-16T13:02:44-06:00", "price_in_cents": 4900, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": 0, "trial_interval": 1, "trial_interval_unit": "day", "archived_at": "2018-01-16T13:02:44-06:00", "require_credit_card": false, "return_params": "", "taxable": false, "update_return_url": "", "tax_code": "", "initial_charge_after_trial": false, "version_number": 1, "update_return_params": "", "product_family": { "id": 1025627, "name": "Acme Products", "description": "", "handle": "acme-products", "accounting_code": null }, "product_price_point_name": "Default" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Product by Handle Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/read-product-by-handle Retrieves a Product object by its `api_handle`. ```http GET /products/handle/{api_handle}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `api_handle` | `String` | Template, Required | The handle of the product | # Response Type **200**: OK [`Product Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/products/handle/api_handle6.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "product": { "id": 3903594, "name": "No cost product", "handle": "no-cost-product", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2016-09-02T17:11:29-04:00", "updated_at": "2016-11-30T11:46:13-05:00", "price_in_cents": 0, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": 5, "trial_interval": 1, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": false, "return_params": "reference=5678", "taxable": false, "update_return_url": "", "initial_charge_after_trial": false, "version_number": 1, "update_return_params": "reference=5678", "product_family": { "id": 527890, "name": "Acme Projects", "description": "", "handle": "billing-plans", "accounting_code": null }, "public_signup_pages": [ { "id": 281174, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/xgdxtk4vhtbz/no-cost-product" }, { "id": 282270, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/xxqmrgtsbd9k/no-cost-product" }, { "id": 291587, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/pvhwss7zjjnh/no-cost-product" }, { "id": 294832, "return_url": "http://www.example.com/", "return_params": "engine=md7a", "url": "https://general-goods.chargify.com/subscribe/m6tbcq4mcgpw/no-cost-product" } ], "product_price_point_name": "Default" } } ``` ##### List Products Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/products/list-products Lists products belonging to a site. ```http GET /products.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `date_field` | [`Basic Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | | `filter` | [`List Products Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-products-filter) | Query, Optional | Filter to use for List Products operations | | `end_date` | `Date` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `end_datetime` | `DateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. | | `start_date` | `Date` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `start_datetime` | `DateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `include_archived` | `Boolean` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | | `include` | [`List Products Include`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-products-include) | Query, Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | | `include_features` | `Boolean` | Query, Optional | When `true`, embeds the active feature catalog items for each result in a `features` array. Default value is `false`.

**Default**: `false` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/products.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'date_field=updated_at' \ -d 'filter[ids]=1%2C2%2C3' \ -d 'page=1' \ -d 'per_page=50' \ -d 'include_archived=true' \ -d 'include=prepaid_product_price_point' \ -d 'include_features=false' ``` # Example Response *(as JSON)* ```json [ { "product": { "id": 0, "name": "string", "handle": "string", "description": "string", "accounting_code": "string", "request_credit_card": true, "expiration_interval": 0, "expiration_interval_unit": "month", "created_at": "2023-11-23T10:28:34-05:00", "updated_at": "2023-11-23T10:28:34-05:00", "price_in_cents": 0, "interval": 0, "interval_unit": "month", "initial_charge_in_cents": 0, "trial_price_in_cents": 0, "trial_interval": 0, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": true, "return_params": "string", "taxable": true, "update_return_url": "string", "initial_charge_after_trial": true, "version_number": 0, "update_return_params": "string", "product_family": { "id": 0, "name": "string", "handle": "string", "accounting_code": null, "description": "string", "created_at": "2021-05-05T16:00:21-04:00", "updated_at": "2021-05-05T16:00:21-04:00" }, "public_signup_pages": [ { "id": 0, "return_url": "string", "return_params": "string", "url": "string" } ], "product_price_point_name": "string", "request_billing_address": true, "require_billing_address": true, "require_shipping_address": true, "use_site_exchange_rate": true, "tax_code": "string", "default_product_price_point_id": 0 } } ] ``` #### Product Price Points ##### Create Product Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/create-product-price-point Creates a Product Price Point. See the [Product Price Point](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points) documentation for details. ```http POST /products/{product_id}/price_points.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-product-price-point-product-id) | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:` | | `body` | [`Create Product Price Point Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-price-point-request) | Body, Optional | - | # Response Type **201**: Created [`Product Price Point Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/products/124/price_points.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "price_point": { "name": "Educational", "handle": "educational", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month" } }' ``` # Example Response *(as JSON)* ```json { "price_point": { "id": 283, "name": "Educational", "handle": "educational", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month", "product_id": 901, "archived_at": "2023-11-30T06:37:20-05:00", "created_at": "2023-11-27T06:37:20-05:00", "updated_at": "2023-11-27T06:37:20-05:00" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Product Price Point Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/product-price-point-error-response) | ##### List Product Price Points Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/list-product-price-points Retrieves a list of product price points. ```http GET /products/{product_id}/price_points.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-product-price-points-product-id) | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:` | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

**Default**: `10`

**Constraints**: `<= 200` | | `currency_prices` | `Boolean` | Query, Optional | (Optional) If you have defined multiple currencies at the site level, you can pass ?currency_prices=true to include an array of currency price data in the response. If the product price point is set to use_site_exchange_rate: true, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. | | `filter[type]` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type) | Query, Optional | Use in query: `filter[type]=catalog,default`. | | `archived` | `Boolean` | Query, Optional | Set to include archived price points in the response. | # Response Type **200**: OK [`List Product Price Points Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-product-price-points-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/products/124/price_points.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=10' \ -d 'filter[type]=Liquid error: Value cannot be null. (Parameter 'key')' ``` # Example Response *(as JSON)* ```json { "price_points": [ { "id": 283, "name": "Educational", "handle": "educational", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month", "product_id": 901, "archived_at": "2023-11-30T06:37:20-05:00", "created_at": "2023-11-27T06:37:20-05:00", "updated_at": "2023-11-27T06:37:20-05:00" } ] } ``` ##### Update Product Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/update-product-price-point Updates a product price point. Note: Custom product price points cannot be updated. ```http PUT /products/{product_id}/price_points/{price_point_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-product-price-point-product-id) | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle. | | `price_point_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-product-price-point-price-point-id) | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-price-point-handle` for a string handle. | | `body` | [`Update Product Price Point Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-product-price-point-request) | Body, Optional | - | # Response Type **200**: OK [`Product Price Point Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/products/124/price_points/188.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "price_point": { "handle": "educational", "price_in_cents": 1250 } }' ``` # Example Response *(as JSON)* ```json { "price_point": { "id": 283, "name": "Educational", "handle": "educational", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month", "product_id": 901, "archived_at": "2023-11-30T06:37:20-05:00", "created_at": "2023-11-27T06:37:20-05:00", "updated_at": "2023-11-27T06:37:20-05:00" } } ``` ##### Read Product Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/read-product-price-point Returns details for a specific product price point. You can achieve this by using either the product price point ID or handle. ```http GET /products/{product_id}/price_points/{price_point_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-product-price-point-product-id) | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle. | | `price_point_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-product-price-point-price-point-id) | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-price-point-handle` for a string handle. | | `currency_prices` | `Boolean` | Query, Optional | (Optional) If you have defined multiple currencies at the site level, you can pass ?currency_prices=true to include an array of currency price data in the response. If the product price point is set to use_site_exchange_rate: true, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. | # Response Type **200**: OK [`Product Price Point Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/products/124/price_points/188.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "price_point": { "id": 283, "name": "Educational", "handle": "educational", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month", "product_id": 901, "archived_at": "2023-11-30T06:37:20-05:00", "created_at": "2023-11-27T06:37:20-05:00", "updated_at": "2023-11-27T06:37:20-05:00" } } ``` ##### Archive Product Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/archive-product-price-point Archives a product price point. ```http DELETE /products/{product_id}/price_points/{price_point_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-product-price-point-product-id) | Template, Required | The id or handle of the product. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle. | | `price_point_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-product-price-point-price-point-id) | Template, Required | The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-price-point-handle` for a string handle. | # Response Type **200**: OK [`Product Price Point Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-response) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/products/124/price_points/188.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "price_point": { "id": 283, "name": "Educational", "handle": "educational", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month", "product_id": 901, "archived_at": "2023-11-30T06:37:20-05:00", "created_at": "2023-11-27T06:37:20-05:00", "updated_at": "2023-11-27T06:37:20-05:00" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Unarchive Product Price Point Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/unarchive-product-price-point Unarchives an archived product price point. ```http PATCH /products/{product_id}/price_points/{price_point_id}/unarchive.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product to which the price point belongs | | `price_point_id` | `Number` | Template, Required | The Advanced Billing id of the product price point | # Response Type **200**: OK [`Product Price Point Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-response) # Example Usage ```bash curl -X PATCH \ --url 'https://subdomain.chargify.com/products/202/price_points/10/unarchive.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "price_point": { "id": 283, "name": "Educational", "handle": "educational", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month", "product_id": 901, "archived_at": "2023-11-30T06:37:20-05:00", "created_at": "2023-11-27T06:37:20-05:00", "updated_at": "2023-11-27T06:37:20-05:00" } } ``` ##### Promote Product Price Point to Default Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/promote-product-price-point-to-default Sets a product price point as the default for the product. Note: Custom product price points cannot be set as the default for a product. ```http PATCH /products/{product_id}/price_points/{price_point_id}/default.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product to which the price point belongs | | `price_point_id` | `Number` | Template, Required | The Advanced Billing id of the product price point | # Response Type **200**: OK [`Product Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response) # Example Usage ```bash curl -X PATCH \ --url 'https://subdomain.chargify.com/products/202/price_points/10/default.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "product": { "id": 29778, "name": "Educational", "handle": "educational", "description": null, "accounting_code": null, "request_credit_card": true, "expiration_interval": 12, "expiration_interval_unit": "month", "created_at": "2023-12-01T06:56:12-05:00", "updated_at": "2023-12-01T06:56:26-05:00", "price_in_cents": 100, "interval": 2, "interval_unit": "month", "initial_charge_in_cents": 120000, "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": true, "return_params": null, "taxable": false, "update_return_url": null, "tax_code": null, "initial_charge_after_trial": false, "version_number": 1, "update_return_params": null, "default_product_price_point_id": 32395, "request_billing_address": false, "require_billing_address": false, "require_shipping_address": false, "use_site_exchange_rate": true, "item_category": null, "product_price_point_id": 32395, "product_price_point_name": "Default", "product_price_point_handle": "uuid:8c878f50-726e-013c-c71b-0286551bb34f", "product_family": { "id": 933860, "name": "Acme Projects", "description": "Amazing project management tool", "handle": "acme-projects", "accounting_code": null, "created_at": "2023-12-01T06:56:12-05:00", "updated_at": "2023-12-01T06:56:12-05:00" } } } ``` ##### Bulk Create Product Price Points Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/bulk-create-product-price-points Creates multiple product price points in one request. ```http POST /products/{product_id}/price_points/bulk.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Template, Required | The Advanced Billing id of the product to which the price points belong | | `body` | [`Bulk Create Product Price Points Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-create-product-price-points-request) | Body, Optional | - | # Response Type **201**: Created [`Bulk Create Product Price Points Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-create-product-price-points-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/products/202/price_points/bulk.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "price_points": [ { "name": "Educational", "handle": "educational", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month" }, { "name": "More Educational", "handle": "more-educational", "price_in_cents": 2000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month" } ] }' ``` # Example Response *(as JSON)* ```json { "price_points": [ { "id": 283, "name": "Educational", "handle": "educational", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "trial_price_in_cents": 4900, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "initial_charge_in_cents": 120000, "initial_charge_after_trial": false, "expiration_interval": 12, "expiration_interval_unit": "month", "product_id": 901, "archived_at": "2023-11-30T06:37:20-05:00", "created_at": "2023-11-27T06:37:20-05:00", "updated_at": "2023-11-27T06:37:20-05:00" } ] } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 422 | Unprocessable Entity (WebDAV) | ##### Create Product Currency Prices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/create-product-currency-prices Creates currency prices for a given currency that has been defined on the site level in your settings. When creating currency prices, they need to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee. Note: Currency Prices are not able to be created for custom product price points. ```http POST /product_price_points/{product_price_point_id}/currency_prices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_price_point_id` | `Number` | Template, Required | The Advanced Billing id of the product price point | | `body` | [`Create Product Currency Prices Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-currency-prices-request) | Body, Optional | - | # Response Type **200**: OK [`Currency Prices Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-prices-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/product_price_points/234/currency_prices.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "currency_prices": [ { "currency": "EUR", "price": 60, "role": "baseline" }, { "currency": "EUR", "price": 30, "role": "trial" }, { "currency": "EUR", "price": 100, "role": "initial" } ] }' ``` # Example Response *(as JSON)* ```json { "currency_prices": [ { "id": 100, "currency": "EUR", "price": 123, "formatted_price": "€123,00", "product_price_point_id": 32669, "role": "baseline" } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### Update Product Currency Prices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/update-product-currency-prices Updates the `price`s of currency prices for a given currency that exists on the product price point. When updating the pricing, it needs to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee. Note: Currency Prices cannot be updated for custom product price points. ```http PUT /product_price_points/{product_price_point_id}/currency_prices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `product_price_point_id` | `Number` | Template, Required | The Advanced Billing id of the product price point | | `body` | [`Update Currency Prices Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-currency-prices-request) | Body, Optional | - | # Response Type **200**: OK [`Currency Prices Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-prices-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/product_price_points/234/currency_prices.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "currency_prices": [ { "id": 200, "price": 15.0 }, { "id": 201, "price": 5.0 } ] }' ``` # Example Response *(as JSON)* ```json { "currency_prices": [ { "id": 123, "currency": "EUR", "price": 100, "formatted_price": "€123,00", "product_price_point_id": 32669, "role": "baseline" } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### List All Product Price Points Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/product-price-points/list-all-product-price-points Lists Product Price Points belonging to a site. ```http GET /products_price_points.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`List Price Points Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-price-points-filter) | Query, Optional | Filter to use for List PricePoints operations | | `include` | [`List Products Price Points Include`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-products-price-points-include) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | # Response Type **200**: OK [`List Product Price Points Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-product-price-points-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/products_price_points.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'filter[start_date]=2011-12-17' \ -d 'filter[end_date]=2011-12-15' \ -d 'filter[start_datetime]=2011-12-19T10%3A15%3A30%2B01%3A00' \ -d 'filter[end_datetime]=2019-06-07T17%3A20%3A06Z' \ -d 'filter[type]=catalog%2Cdefault%2Ccustom' \ -d 'filter[ids]=1%2C2%2C3' \ -d 'include=currency_prices' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json { "price_points": [ { "id": 0, "name": "My pricepoint", "handle": "handle", "price_in_cents": 10, "interval": 5, "interval_unit": "month", "trial_price_in_cents": 10, "trial_interval": 1, "trial_interval_unit": "month", "trial_type": "payment_expected", "introductory_offer": true, "initial_charge_in_cents": 0, "initial_charge_after_trial": true, "expiration_interval": 0, "expiration_interval_unit": "month", "product_id": 1230, "created_at": "2021-04-02T17:52:09-04:00", "updated_at": "2021-04-02T17:52:09-04:00", "use_site_exchange_rate": true } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Proforma Invoices ##### Create Consolidated Proforma Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/create-consolidated-proforma-invoice Creates a consolidated proforma invoice asynchronously. To find and view the new consolidated proforma invoice, you can poll the subscription group listing for proforma invoices; only one consolidated proforma invoice can be created per group at a time. If the information becomes outdated, simply void the old consolidated proforma invoice and generate a new one. ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. To create a proforma invoice, the subscription must not be prepaid, and must be in a live state. ```http POST /subscription_groups/{uid}/proforma_invoices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | # Response Type **201**: Created `Void` # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/proforma_invoices.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Subscription Group Proforma Invoices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/list-subscription-group-proforma-invoices Lists proforma invoices with a `consolidation_level` of parent for the subscription group. By default, proforma invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to true. ```http GET /subscription_groups/{uid}/proforma_invoices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `line_items` | `Boolean` | Query, Optional | Include line items data.

**Default**: `false` | | `discounts` | `Boolean` | Query, Optional | Include discounts data.

**Default**: `false` | | `taxes` | `Boolean` | Query, Optional | Include taxes data.

**Default**: `false` | | `credits` | `Boolean` | Query, Optional | Include credits data.

**Default**: `false` | | `payments` | `Boolean` | Query, Optional | Include payments data.

**Default**: `false` | | `custom_fields` | `Boolean` | Query, Optional | Include custom fields data.

**Default**: `false` | # Response Type **200**: OK [`List Proforma Invoices Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-proforma-invoices-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/proforma_invoices.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'line_items=false' \ -d 'discounts=false' \ -d 'taxes=false' \ -d 'credits=false' \ -d 'payments=false' \ -d 'custom_fields=false' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Read Proforma Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/read-proforma-invoice Returns the details of an existing proforma invoice. ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. ```http GET /proforma_invoices/{proforma_invoice_uid}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `proforma_invoice_uid` | `String` | Template, Required | The uid of the proforma invoice | # Response Type **200**: OK [`Proforma Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/proforma_invoices/proforma_invoice_uid4.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Create Proforma Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/create-proforma-invoice Creates a proforma invoice and returns it as a response. If the information becomes outdated, simply void the old proforma invoice and generate a new one. If you would like to preview the next billing amounts without generating a full proforma invoice, use the renewal preview endpoint. ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. To create a proforma invoice, the subscription must not be in a group, must not be prepaid, and must be in a live state. ```http POST /subscriptions/{subscription_id}/proforma_invoices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **200**: OK [`Proforma Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/proforma_invoices.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Proforma Invoices Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/list-proforma-invoices Lists proforma invoices for a subscription. By default, results only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. ```http GET /subscriptions/{subscription_id}/proforma_invoices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `start_date` | `String` | Query, Optional | The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format. | | `end_date` | `String` | Query, Optional | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. | | `status` | [`Proforma Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-status) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction) | Query, Optional | The sort direction of the returned invoices.

**Default**: `desc` | | `line_items` | `Boolean` | Query, Optional | Include line items data.

**Default**: `false` | | `discounts` | `Boolean` | Query, Optional | Include discounts data.

**Default**: `false` | | `taxes` | `Boolean` | Query, Optional | Include taxes data.

**Default**: `false` | | `credits` | `Boolean` | Query, Optional | Include credits data.

**Default**: `false` | | `payments` | `Boolean` | Query, Optional | Include payments data.

**Default**: `false` | | `custom_fields` | `Boolean` | Query, Optional | Include custom fields data.

**Default**: `false` | # Response Type **200**: OK [`List Proforma Invoices Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-proforma-invoices-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/222/proforma_invoices.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'direction=desc' \ -d 'line_items=false' \ -d 'discounts=false' \ -d 'taxes=false' \ -d 'credits=false' \ -d 'payments=false' \ -d 'custom_fields=false' ``` ##### Deliver Proforma Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/deliver-proforma-invoice Delivers a proforma invoice programmatically via email. Supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. If `recipient_emails` is omitted, the system will fall back to the primary recipient derived from the invoice or subscription. At least one recipient must be present, either via the request body or via this default behavior, so an empty body may still succeed when defaults are available. ```http POST /proforma_invoices/{proforma_invoice_uid}/deliveries.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `proforma_invoice_uid` | `String` | Template, Required | The uid of the proforma invoice | | `body` | [`Deliver Proforma Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/deliver-proforma-invoice-request) | Body, Optional | - | # Response Type **201**: Created [`Proforma Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/proforma_invoices/proforma_invoice_uid4/deliveries.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "recipient_emails": [ "user0@example.com" ], "cc_recipient_emails": [ "user1@example.com" ], "bcc_recipient_emails": [ "user2@example.com" ] }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Void Proforma Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/void-proforma-invoice Voids a proforma invoice that has the status "draft". ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. Only proforma invoices that have the appropriate status may be reopened. If the invoice identified by {uid} does not have the appropriate status, the response will have HTTP status code 422 and an error message. A reason for the void operation is required to be included in the request body. If one is not provided, the response will have HTTP status code 422 and an error message. ```http POST /proforma_invoices/{proforma_invoice_uid}/void.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `proforma_invoice_uid` | `String` | Template, Required | The uid of the proforma invoice | | `body` | [`Void Invoice Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-request) | Body, Optional | - | # Response Type **200**: OK [`Proforma Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/proforma_invoices/proforma_invoice_uid4/void.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Preview Proforma Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/preview-proforma-invoice Previews the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. The preview endpoint is subject to all the same conditions as the proforma invoice endpoint. For example, previews are only available on the Relationship Invoicing architecture, and previews cannot be made for end-of-life subscriptions. If all the data returned in the preview is as expected, you may then create a static proforma invoice and send it to your customer. The data within a preview will not be saved and will not be accessible after the call is made. Alternatively, if you have some proforma invoices already, you may make a preview call to determine whether any billing information for the subscription's upcoming renewal has changed. ```http POST /subscriptions/{subscription_id}/proforma_invoices/preview.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **200**: OK [`Proforma Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/proforma_invoices/preview.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Create Signup Proforma Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/create-signup-proforma-invoice Creates a proforma invoice to preview costs before a subscription's signup. This endpoint is only available for Relationship Invoicing sites and cannot be used to create consolidated proforma invoices or preview prepaid subscriptions. Like other proforma invoices, it can be emailed to the customer, voided, and publicly viewed on the chargifypay domain. Pass a payload that resembles a subscription create or signup preview request. For example, you can specify components, coupons/a referral, offers, custom pricing, and an existing customer or payment profile to populate a shipping or billing address. A product and customer first name, last name, and email are the minimum requirements. We recommend associating the proforma invoice with a customer_id to easily find their proforma invoices, since the subscription_id will always be blank. ```http POST /subscriptions/proforma_invoices.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Subscription Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-request) | Body, Optional | - | # Response Type **201**: Created [`Proforma Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/proforma_invoices.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "subscription": { "product_handle": "gold-product", "customer_attributes": { "first_name": "Myra", "last_name": "Maisel", "email": "mmaisel@example.com" } } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 400 | Bad Request | [`Proforma Bad Request Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/proforma-bad-request-error-response) | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | ##### Preview Signup Proforma Invoice Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/proforma-invoices/preview-signup-proforma-invoice Creates a signup preview in the format of a proforma invoice to preview costs before a subscription's signup. This endpoint is only available for Relationship Invoicing sites and cannot be used to create consolidated proforma invoice previews or preview prepaid subscriptions. You have the option of previewing the first renewal's costs as well. The proforma invoice preview will not be persisted. Pass a payload that resembles a subscription create or signup preview request. For example, you can specify components, coupons/a referral, offers, custom pricing, and an existing customer or payment profile to populate a shipping or billing address. A product and customer first name, last name, and email are the minimum requirements. ```http POST /subscriptions/proforma_invoices/preview.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `include` | [`Create Signup Proforma Preview Include`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/create-signup-proforma-preview-include) | Query, Optional | Choose to include a proforma invoice preview for the first renewal. Use in query `include=next_proforma_invoice`. | | `body` | [`Create Subscription Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-request) | Body, Optional | - | # Response Type **201**: Created [`Signup Proforma Preview Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/signup-proforma-preview-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/proforma_invoices/preview.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "subscription": { "product_handle": "gold-plan", "customer_attributes": { "first_name": "first", "last_name": "last", "email": "flast@example.com" } } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 400 | Bad Request | [`Proforma Bad Request Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/proforma-bad-request-error-response) | | 422 | Unprocessable Entity (WebDAV) | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | #### Reason Codes ##### Create Reason Code Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/reason-codes/create-reason-code Creates a reason code for a given site. Reason Codes are a way to gain a high-level view of why your customers are cancelling the subscription to your product or service. Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. For more information, see [Churn Reason Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Reason-Codes). ```http POST /reason_codes.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Reason Code Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-reason-code-request) | Body, Optional | - | # Response Type **200**: OK [`Reason Code Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/reason-code-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/reason_codes.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "reason_code": { "code": "NOTHANKYOU", "description": "No thank you!", "position": 5 } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Reason Codes Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/reason-codes/list-reason-codes Lists all current churn codes for a given site. ```http GET /reason_codes.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/reason-code-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/reason_codes.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json [ { "reason_code": { "id": 2, "site_id": 2, "code": "LARGE", "description": "This is too complicated", "position": 1, "created_at": "2017-02-16T16:49:07-05:00", "updated_at": "2017-02-17T16:29:51-05:00" } }, { "reason_code": { "id": 1, "site_id": 2, "code": "CH1", "description": "This does not meet my needs", "position": 2, "created_at": "2017-02-16T16:48:45-05:00", "updated_at": "2017-02-17T16:29:59-05:00" } }, { "reason_code": { "id": 5, "site_id": 2, "code": "HAN99", "description": "Hard to setup", "position": 3, "created_at": "2017-02-17T16:29:42-05:00", "updated_at": "2017-02-17T16:29:59-05:00" } } ] ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Reason Code Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/reason-codes/read-reason-code Returns a particular churn reason code for a given site by its unique ID. ```http GET /reason_codes/{reason_code_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `reason_code_id` | `Number` | Template, Required | The Advanced Billing id of the reason code | # Response Type **200**: OK [`Reason Code Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/reason-code-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/reason_codes/32.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Update Reason Code Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/reason-codes/update-reason-code Updates an existing reason code for a given site. ```http PUT /reason_codes/{reason_code_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `reason_code_id` | `Number` | Template, Required | The Advanced Billing id of the reason code | | `body` | [`Update Reason Code Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-reason-code-request) | Body, Optional | - | # Response Type **200**: OK [`Reason Code Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/reason-code-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/reason_codes/32.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Delete Reason Code Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/reason-codes/delete-reason-code Deletes a reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversible. ```http DELETE /reason_codes/{reason_code_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `reason_code_id` | `Number` | Template, Required | The Advanced Billing id of the reason code | # Response Type **200**: OK [`Ok Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/ok-response) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/reason_codes/32.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "ok": "ok" } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | #### Referral Codes ##### Validate Referral Code Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/referral-codes/validate-referral-code Validates whether a referral code is valid and applicable within your site. This method is useful for validating referral codes that are entered by a customer. For more information, see [Understanding Referrals](https://docs.maxio.com/hc/en-us/articles/24286981223693-Understanding-Referrals) in the product documentation. ```http GET /referral_codes/validate.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `code` | `String` | Query, Required | The referral code you are trying to validate | # Response Type **200**: OK [`Referral Validation Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/referral-validation-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/referral_codes/validate.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'code=code8' ``` # Example Response *(as JSON)* ```json { "referral_code": { "id": 1032514, "site_id": 31615, "subscription_id": 16254270, "code": "9b6cdw" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | [`Single String Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-string-error-response) | #### Sales Commissions ##### List Sales Commission Settings Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sales-commissions/list-sales-commission-settings Lists subscriptions with associated sales reps. ## Modified Authentication Process The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support. > Note: The request is at seller level, it means `<>` variable will be replaced by `app`. ```http GET /sellers/{seller_id}/sales_commission_settings.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `seller_id` | `String` | Template, Required | The Chargify id of your seller account | | `Authorization` | `String` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `Bearer <>` | | `live_mode` | `Boolean` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep-settings) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/sellers/seller_id8/sales_commission_settings.json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <>' \ -d 'page=1' \ -d 'per_page=100' ``` # Example Response *(as JSON)* ```json [ { "customer_name": "Ziomek Ziomeczek", "subscription_id": 81746, "site_link": "https://chargify9.staging-chargify.com/dashboard", "site_name": "Chargify", "subscription_mrr": "$200.00", "sales_rep_id": 48, "sales_rep_name": "John Candy" }, { "customer_name": "Ziom Kom", "subscription_id": 83758, "site_link": "https://chargify9.staging-chargify.com/dashboard", "site_name": "Chargify", "subscription_mrr": "$200.00", "sales_rep_id": 49, "sales_rep_name": "Josh Acme" }, { "customer_name": "George Bush", "subscription_id": 83790, "site_link": "https://chargify9.staging-chargify.com/dashboard", "site_name": "Chargify", "subscription_mrr": "$200.00", "sales_rep_id": 48, "sales_rep_name": "John Candy" } ] ``` ##### List Sales Reps Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sales-commissions/list-sales-reps Lists sales reps with details. ## Modified Authentication Process The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support. > Note: The request is at seller level, it means `<>` variable will be replaced by `app`. ```http GET /sellers/{seller_id}/sales_reps.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `seller_id` | `String` | Template, Required | The Chargify id of your seller account | | `Authorization` | `String` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `Bearer <>` | | `live_mode` | `Boolean` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-sale-rep-item) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/sellers/seller_id8/sales_reps.json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <>' \ -d 'page=1' \ -d 'per_page=100' ``` # Example Response *(as JSON)* ```json [ { "id": 48, "full_name": "John Candy", "subscriptions_count": 2, "mrr_data": { "november_2019": { "mrr": "$0.00", "usage": "$0.00", "recurring": "$0.00" }, "december_2019": { "mrr": "$0.00", "usage": "$0.00", "recurring": "$0.00" }, "january_2020": { "mrr": "$400.00", "usage": "$0.00", "recurring": "$400.00" }, "february_2020": { "mrr": "$400.00", "usage": "$0.00", "recurring": "$400.00" }, "march_2020": { "mrr": "$400.00", "usage": "$0.00", "recurring": "$400.00" }, "april_2020": { "mrr": "$400.00", "usage": "$0.00", "recurring": "$400.00" } }, "test_mode": true }, { "id": 49, "full_name": "Josh Acme", "subscriptions_count": 1, "mrr_data": { "november_2019": { "mrr": "$0.00", "usage": "$0.00", "recurring": "$0.00" }, "december_2019": { "mrr": "$0.00", "usage": "$0.00", "recurring": "$0.00" }, "january_2020": { "mrr": "$200.00", "usage": "$0.00", "recurring": "$200.00" }, "february_2020": { "mrr": "$200.00", "usage": "$0.00", "recurring": "$200.00" }, "march_2020": { "mrr": "$200.00", "usage": "$0.00", "recurring": "$200.00" }, "april_2020": { "mrr": "$200.00", "usage": "$0.00", "recurring": "$200.00" } }, "test_mode": true } ] ``` ##### Read Sales Rep Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sales-commissions/read-sales-rep Returns a sales rep and attached subscription details. ## Modified Authentication Process The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support. > Note: The request is at seller level, it means `<>` variable will be replaced by `app`. ```http GET /sellers/{seller_id}/sales_reps/{sales_rep_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `seller_id` | `String` | Template, Required | The Chargify id of your seller account | | `sales_rep_id` | `String` | Template, Required | The Advanced Billing id of sales rep. | | `Authorization` | `String` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `Bearer <>` | | `live_mode` | `Boolean` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | # Response Type **200**: OK [`Sale Rep`](https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/sellers/seller_id8/sales_reps/sales_rep_id4.json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <>' \ -d 'page=1' \ -d 'per_page=100' ``` # Example Response *(as JSON)* ```json { "id": 48, "full_name": "John Candy", "subscriptions_count": 2, "test_mode": true, "subscriptions": [ { "id": 81746, "site_name": "Chargify", "subscription_url": "https://chargify9.staging-chargify.com/subscriptions/81746", "customer_name": "Ziomek Ziomeczek", "created_at": "2020-01-03T02:36:27-05:00", "mrr": "$200.00", "usage": "$0.00", "recurring": "$200.00", "last_payment": "2020-04-03T03:40:27-04:00", "churn_date": null }, { "id": 83790, "site_name": "Chargify", "subscription_url": "https://chargify9.staging-chargify.com/subscriptions/83790", "customer_name": "George Bush", "created_at": "2020-01-17T07:34:32-05:00", "mrr": "$200.00", "usage": "$0.00", "recurring": "$200.00", "last_payment": "2020-04-17T08:41:03-04:00", "churn_date": null } ] } ``` #### Sites ##### Read Site Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sites/read-site Retrieves site data. For more information, see [Sites](https://maxio.zendesk.com/hc/en-us/sections/24250550707085-Sites) in the product documentation. Specifically, the [Clearing Site Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) section is relevant to this endpoint. #### Relationship invoicing enabled If the site has Relationship invoicing enabled, additional properties are returned in the response: ``` "customer_hierarchy_enabled": true, "whopays_enabled": true, "whopays_default_payer": "self" ``` For more information, see [Who Pays & Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays). ```http GET /site.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Response Type **200**: OK [`Site Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/site-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/site.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "site": { "id": 0, "name": "string", "subdomain": "string", "currency": "string", "seller_id": 0, "non_primary_currencies": [ "string" ], "relationship_invoicing_enabled": true, "schedule_subscription_cancellation_enabled": true, "customer_hierarchy_enabled": true, "whopays_enabled": true, "whopays_default_payer": "string", "default_payment_collection_method": "string", "organization_address": { "street": null, "line2": null, "city": null, "state": null, "zip": null, "country": null, "name": "string", "phone": "string" }, "tax_configuration": { "kind": "custom", "fully_configured": true, "destination_address": "shipping_then_billing" }, "net_terms": { "default_net_terms": 0, "automatic_net_terms": 0, "remittance_net_terms": 0, "net_terms_on_remittance_signups_enabled": false, "custom_net_terms_enabled": false }, "test": true, "allocation_settings": { "upgrade_charge": "prorated", "downgrade_credit": "none", "accrue_charge": "true" } } } ``` ##### Clear Site Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sites/clear-site Clears all data from a test site asynchronously. This call is asynchronous and there may be a delay before the site data is fully deleted. If you are clearing site data for an automated test, you will need to build in a delay and/or check that there are no products, etc., in the site before proceeding. **This functionality will only work on sites in TEST mode. Attempts to perform this on sites in “live” mode will result in a response of 403 FORBIDDEN.** ```http POST /sites/clear_data.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `cleanup_scope` | [`Cleanup Scope`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/cleanup-scope) | Query, Optional | `all`: Will clear all products, customers, and related subscriptions from the site.
`customers`: Will clear only customers and related subscriptions (leaving the products untouched) for the site.
Revenue will also be reset to 0.
Use in query `cleanup_scope=all`.

**Default**: `all` | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X POST -G \ --url 'https://subdomain.chargify.com/sites/clear_data.json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'cleanup_scope=all' ``` ##### List Chargify Js Public Keys Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sites/list-chargify-js-public-keys Lists public keys used for Maxio.js (formerly Chargify.js). ```http GET /chargify_js_keys.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | # Response Type **200**: OK [`List Public Keys Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-public-keys-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/chargify_js_keys.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json { "chargify_js_keys": [ { "public_key": "chjs_ftrxt7c4fv6f74wchjs_5zyn7gnwv", "requires_security_token": false, "created_at": "2021-01-01T05:00:00-04:00" } ], "meta": { "total_count": 1, "current_page": 1, "total_pages": 1, "per_page": 10 } } ``` #### Subscriptions ##### Create Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/create-subscription Creates a Subscription for a customer and product. Specify the product with `product_id` or `product_handle`. To set a specific product price point, use `product_price_point_handle` or `product_price_point_id`. Identify an existing customer with `customer_id` or `customer_reference`. Optionally, include an existing payment profile using `payment_profile_id`. To create a new customer, pass customer_attributes. Select an option from the **Request Examples** drop-down on the right side of the portal to see examples of common scenarios for creating subscriptions. ## List vs Sales Pricing When a subscription uses custom pricing as the sales price, you can optionally provide a list price for any item. If omitted, the list price defaults to the sales price. The difference between the list price and sales price is used to calculate implicit discounts, which appear on Invoices and in reporting. List price can also support revenue allocations in [Advanced Revenue](https://docs.maxio.com/hc/en-us/articles/24177001342861-Create-and-Configure-RevenueBooks). If your site has list pricing enabled, the API accepts `custom_price.list_price_point_id` for custom pricing, validates and persists it, and returns list price metadata in subscription responses. If list pricing is disabled, this input is ignored and related response fields are omitted. When list pricing is enabled: - Subscription → Product `product_price_point_list_price_point_id` (integer) - `product_price_point_list_price_point_handle` (string) - Subscription Components (when components are included in the response, such as with subscriptions built from components or component serialization paths) `component_id` (integer) - `price_point_id` (integer) - `list_price_point_id` (integer) When list pricing is disabled: - Subscription → Product `product_price_point_list_price_point_id`: omitted - `product_price_point_list_price_point_handle`: omitted - Subscription Components `list_price_point_id`: omitted This functionality is supported in the API, but is not currently supported in SDKs. ## Subscriptions can now work independently from the catalog If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, you can create subscriptions without a `product_id` or `product_handle` using POST /subscriptions, building them entirely from components. A valid subscription must include at least one active component with: - a positive `allocated_quantity`, - a positive `unit_balance`, or - 'enabled: true' (for on/off components) - a configured metered component `component_id` can be provided as a numeric ID or in handle: format. If `trial_interval` and `trial_interval_unit` are included, they are applied at creation. In the response, product and product price point fields are null, and component details are returned instead. This functionality is supported in the API, but is not currently supported in SDKs. ## Payment information Payment information may be required to create a subscription, depending on the options for the Product being subscribed. See [product options](https://docs.maxio.com/hc/en-us/articles/24261076617869-Edit-Products) for more information. See the [Payments Profile](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/create-payment-profile) endpoint for details on payment parameters. See the [Subscription Signups](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing. ## Payment information Payment information may be required to create a subscription, depending on the options for the Product being subscribed. See [product options](https://docs.maxio.com/hc/en-us/articles/24261076617869-Edit-Products) for more information. See the [Payments Profile](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/payment-profiles/create-payment-profile) endpoint for details on payment parameters. Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox. Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Maxio.js (formerly Chargify.js)](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information. ## 3D Secure (3DS) Authentication post-authentication flow When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```http POST /subscriptions.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Subscription Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-request) | Body, Optional | - | # Response Type **201**: Created [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "subscription": { "product_handle": "basic", "customer_attributes": { "first_name": "Joe", "last_name": "Smith", "email": "joe@example.com", "zip": "02120", "state": "MA", "reference": "XYZ", "phone": "(617) 111 - 0000", "organization": "Acme", "country": "US", "city": "Boston", "address_2": "address_24", "address": "123 Mass Ave." }, "payment_collection_method": "remittance" } }' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 15236915, "state": "active", "balance_in_cents": 0, "total_revenue_in_cents": 14000, "product_price_in_cents": 1000, "product_version_number": 7, "current_period_ends_at": "2016-11-15T14:48:10-05:00", "next_assessment_at": "2016-11-15T14:48:10-05:00", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2016-11-14T14:48:12-05:00", "expires_at": null, "created_at": "2016-11-14T14:48:10-05:00", "updated_at": "2016-11-14T15:24:41-05:00", "cancellation_message": null, "cancellation_method": "merchant_api", "cancel_at_end_of_period": null, "canceled_at": null, "current_period_started_at": "2016-11-14T14:48:10-05:00", "previous_state": "active", "signup_payment_id": 162269766, "signup_revenue": "260.00", "delayed_cancel_at": null, "coupon_code": "5SNN6HFK3GBH", "payment_collection_method": "automatic", "snap_day": null, "reason_code": null, "receives_invoice_emails": false, "customer": { "first_name": "Curtis", "last_name": "Test", "email": "curtis@example.com", "cc_emails": "jeff@example.com", "organization": "", "reference": null, "id": 14714298, "created_at": "2016-11-14T14:48:10-05:00", "updated_at": "2016-11-14T14:48:13-05:00", "address": "123 Anywhere Street", "address_2": "", "city": "Boulder", "state": "CO", "zip": "80302", "country": "US", "phone": "", "verified": false, "portal_customer_created_at": "2016-11-14T14:48:13-05:00", "portal_invite_last_sent_at": "2016-11-14T14:48:13-05:00", "portal_invite_last_accepted_at": null, "tax_exempt": false, "vat_number": "012345678" }, "product": { "id": 3792003, "name": "$10 Basic Plan", "handle": "basic", "description": "lorem ipsum", "accounting_code": "basic", "price_in_cents": 1000, "interval": 1, "interval_unit": "day", "initial_charge_in_cents": null, "expiration_interval": null, "expiration_interval_unit": "never", "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "initial_charge_after_trial": false, "return_params": "", "request_credit_card": false, "require_credit_card": false, "created_at": "2016-03-24T13:38:39-04:00", "updated_at": "2016-11-03T13:03:05-04:00", "archived_at": null, "update_return_url": "", "update_return_params": "", "product_family": { "id": 527890, "name": "Acme Projects", "handle": "billing-plans", "accounting_code": null, "description": "" }, "public_signup_pages": [ { "id": 281054, "url": "https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic" }, { "id": 281240, "url": "https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic" }, { "id": 282694, "url": "https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic" } ], "taxable": false, "version_number": 7, "product_price_point_name": "Default" }, "credit_card": { "id": 10191713, "payment_type": "credit_card", "first_name": "Curtis", "last_name": "Test", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 1, "expiration_year": 2026, "billing_address": "123 Anywhere Street", "billing_address_2": "", "billing_city": "Boulder", "billing_state": null, "billing_country": "", "billing_zip": "80302", "current_vault": "bogus", "vault_token": "1", "customer_vault_token": null, "customer_id": 14714298 }, "payment_type": "credit_card", "referral_code": "w7kjc9", "next_product_id": null, "coupon_use_count": 1, "coupon_uses_allowed": 1, "next_product_handle": null, "stored_credential_transaction_id": 125566112256688, "dunning_communication_delay_enabled": true, "dunning_communication_delay_time_zone": "Eastern Time (US & Canada)" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Subscriptions Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/list-subscriptions Lists subscriptions for a site. Use the query string filters and pagination to control responses from the server. If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. ## Search for a subscription Use the query strings below to search for a subscription using the criteria available. The return value will be an array. ## Self-Service Page token Self-Service Page token for the subscriptions is not returned by default. If this information is desired, the include[]=self_service_page_token parameter must be provided with the request. ```http GET /subscriptions.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `sort` | [`Subscription Sort`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-sort) | Query, Optional | The attribute by which to sort

**Default**: `signup_date` | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `state` | [`Subscription State Filter`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state-filter) | Query, Optional | The current state of the subscription | | `product` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-subscriptions-product) | Query, Optional | Filter subscriptions by product. Accepts product ID or exact product name. Product handle is not supported. | | `q` | `String` | Query, Optional | Search string. | | `q_scope` | [`Q Scope`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/q-scope) | Query, Optional | Scope of fields used by the q search. | | `customer_id` | `Number` | Query, Optional | The Advanced Billing id of the customer. | | `product_price_point_id` | `Number` | Query, Optional | The ID of the product price point. If supplied, product is required. | | `coupon` | `Number` | Query, Optional | The numeric id of the coupon currently applied to the subscription. (This can be found in the URL when editing a coupon. Note that the coupon code cannot be used.) | | `coupon_code` | `String` | Query, Optional | The coupon code currently applied to the subscription | | `collection_method` | [`Collection Method 1`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method-1) | Query, Optional | The collection method for the subscription. | | `branding_theme_id` | `Number` | Query, Optional | Filter subscriptions by the ID of an assigned Branding Theme. Branding Themes is a beta feature. See [Understand Branding Themes](https://docs.maxio.com/hc/en-us/articles/43796895662093-Understand-Branding-Themes#understand-branding-themes-0-0) for more information. | | `date_field` | [`Subscription Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-date-field) | Query, Optional | The type of filter you'd like to apply to your search. Allowed Values: , current_period_ends_at, current_period_starts_at, created_at, activated_at, canceled_at, expires_at, trial_started_at, trial_ended_at, updated_at | | `start_date` | `Date` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `start_date=2022-07-01`. | | `end_date` | `Date` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `end_date=2022-08-01`. | | `start_datetime` | `DateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns subscriptions with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `start_datetime=2022-07-01 09:00:05`. | | `end_datetime` | `DateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns subscriptions with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `end_datetime=2022-08-01 10:00:05`. | | `metadata` | `map` | Query, Optional | The value of the metadata field specified in the parameter. Use in query `metadata[my-field]=value&metadata[other-field]=another_value`. | | `group_status` | [`Group Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/group-status) | Query, Optional | Filter by whether a subscription is in a group. | | `dunning_exemption` | `Boolean` | Query, Optional | Filter by dunning exemption status. | | `payment_gateways` | `String` | Query, Optional | Comma-separated payment gateway identifiers. | | `currencies` | `String` | Query, Optional | Comma-separated currency codes. | | `include` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-list-include) | Query, Optional | Allows including additional data in the response. Use in query: `include[]=self_service_page_token`. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'sort=signup_date' \ -d 'include[]=self_service_page_token' ``` ##### Update Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/update-subscription Updates one or more attributes of a subscription. ## Update Subscription Payment Method Change the card that your subscriber uses for their subscription. You can also use this method to change the expiration date of the card **if your gateway allows**. Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox. Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information. > Note: Partial card updates for **Authorize.Net** are not allowed via this endpoint. The existing Payment Profile must be directly updated instead. ## Update Product You also use this method to change the subscription to a different product by setting a new value for product_handle. A product change can be done in two different ways, **product change** or **delayed product change**. ### Product Change You can change a subscription's product. The new payment amount is calculated and charged at the normal start of the next period. If you require complex product changes or prorated upgrades and downgrades instead, please see the documentation on [Migrating Subscription Products](https://docs.maxio.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations#product-changes-and-migrations-0-0). To perform a product change, set either the `product_handle` or `product_id` attribute to that of a different product from the same site as the subscription. You can also change the price point by passing in either `product_price_point_id` or `product_price_point_handle` - otherwise the new product's default price point is used. ### Delayed Product Change This method also changes the product and/or price point, and the new payment amount is calculated and charged at the normal start of the next period. This method schedules the product change to happen automatically at the subscription’s next renewal date. To perform a delayed product change, set the `product_handle` attribute as you would in a regular product change, but also set the `product_change_delayed` attribute to `true`. No proration applies in this case. You can also perform a delayed change to the price point by passing in either `product_price_point_id` or `product_price_point_handle` > **Note:** To cancel a delayed product change, set `next_product_id` to an empty string. ## Billing Date Changes You can update dates for a subscription. ### Regular Billing Date Changes Send the `next_billing_at` to set the next billing date for the subscription. After that date passes and the subscription is processed, the following billing date will be set according to the subscription's product period. > Note: If you pass an invalid date, the correct date is automatically set to the correct date. For example, if February 30 is passed, the next billing would be set to March 2nd in a non-leap year. The server response will not return data under the key/value pair of `next_billing_at`. View the key/value pair of `current_period_ends_at` to verify that the `next_billing_at` date has been changed successfully. ### Calendar Billing and Snap Day Changes For a subscription using Calendar Billing, setting the next billing date is a bit different. Send the `snap_day` attribute to change the calendar billing date for **a subscription using a product eligible for calendar billing**. > Note: If you change the product associated with a subscription that contains a `snap_day` and immediately READ/GET the subscription data, it will still contain the original `snap_day`. The `snap_day` will be reset to `null` on the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription. If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, `product`, `product_price_point_id`, and `product_price_point_type` are returned as `null`. ```http PUT /subscriptions/{subscription_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Update Subscription Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "subscription": { "payment_collection_method": "remittance", "next_billing_at": "2010-08-06T15:34:00Z" } }' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 18220670, "state": "active", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2017-06-27T13:45:15-05:00", "created_at": "2017-06-27T13:45:13-05:00", "updated_at": "2017-06-30T09:26:50-05:00", "expires_at": null, "balance_in_cents": 10000, "current_period_ends_at": "2017-06-30T12:00:00-05:00", "next_assessment_at": "2017-06-30T12:00:00-05:00", "canceled_at": null, "cancellation_message": null, "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "automatic", "snap_day": "end", "cancellation_method": null, "current_period_started_at": "2017-06-27T13:45:13-05:00", "previous_state": "active", "signup_payment_id": 191819284, "signup_revenue": "0.00", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": 0, "product_price_in_cents": 0, "product_version_number": 1, "payment_type": null, "referral_code": "d3pw7f", "coupon_use_count": null, "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": null, "current_billing_amount_in_cents": 10000, "receives_invoice_emails": false, "customer": { "id": 17780587, "first_name": "Catie", "last_name": "Test", "organization": "Acme, Inc.", "email": "catie@example.com", "created_at": "2017-06-27T13:01:05-05:00", "updated_at": "2017-06-30T09:23:10-05:00", "reference": "123ABC", "address": "123 Anywhere Street", "address_2": "Apartment #10", "city": "Los Angeles", "state": "CA", "zip": "90210", "country": "US", "phone": "555-555-5555", "portal_invite_last_sent_at": "2017-06-27T13:45:16-05:00", "portal_invite_last_accepted_at": null, "verified": true, "portal_customer_created_at": "2017-06-27T13:01:08-05:00", "cc_emails": "support@example.com", "tax_exempt": true }, "product": { "id": 4470347, "name": "Zero Dollar Product", "handle": "zero-dollar-product", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2017-03-23T10:54:12-05:00", "updated_at": "2017-04-20T15:18:46-05:00", "price_in_cents": 0, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": false, "return_params": "", "taxable": false, "update_return_url": "", "tax_code": "", "initial_charge_after_trial": false, "version_number": 1, "update_return_params": "", "product_family": { "id": 997233, "name": "Acme Products", "description": "", "handle": "acme-products", "accounting_code": null }, "public_signup_pages": [ { "id": 316810, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product" } ] } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/read-subscription Retrieves subscription details. If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. ## Self-Service Page token Self-Service Page token for the subscription is not returned by default. If this information is desired, the include[]=self_service_page_token parameter must be provided with the request. ```http GET /subscriptions/{subscription_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `include` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-include) | Query, Optional | Allows including additional data in the response. Use in query: `include[]=coupons&include[]=self_service_page_token`. | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/222.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'include[]=coupons' \ -d 'include[]=self_service_page_token' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 15236915, "state": "active", "balance_in_cents": 0, "total_revenue_in_cents": 14000, "product_price_in_cents": 1000, "product_version_number": 7, "current_period_ends_at": "2016-11-15T14:48:10-05:00", "next_assessment_at": "2016-11-15T14:48:10-05:00", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2016-11-14T14:48:12-05:00", "expires_at": null, "created_at": "2016-11-14T14:48:10-05:00", "updated_at": "2016-11-14T15:24:41-05:00", "cancellation_message": null, "cancellation_method": null, "cancel_at_end_of_period": null, "canceled_at": null, "current_period_started_at": "2016-11-14T14:48:10-05:00", "previous_state": "active", "signup_payment_id": 162269766, "signup_revenue": "260.00", "delayed_cancel_at": null, "coupon_code": "5SNN6HFK3GBH", "payment_collection_method": "automatic", "snap_day": null, "reason_code": null, "receives_invoice_emails": false, "net_terms": 0, "customer": { "first_name": "Curtis", "last_name": "Test", "email": "curtis@example.com", "cc_emails": "jeff@example.com", "organization": "", "reference": null, "id": 14714298, "created_at": "2016-11-14T14:48:10-05:00", "updated_at": "2016-11-14T14:48:13-05:00", "address": "123 Anywhere Street", "address_2": "", "city": "Boulder", "state": "CO", "zip": "80302", "country": "US", "phone": "", "verified": false, "portal_customer_created_at": "2016-11-14T14:48:13-05:00", "portal_invite_last_sent_at": "2016-11-14T14:48:13-05:00", "portal_invite_last_accepted_at": null, "tax_exempt": false, "vat_number": "012345678" }, "product": { "id": 3792003, "name": "$10 Basic Plan", "handle": "basic", "description": "lorem ipsum", "accounting_code": "basic", "price_in_cents": 1000, "interval": 1, "interval_unit": "day", "initial_charge_in_cents": null, "expiration_interval": null, "expiration_interval_unit": "never", "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "initial_charge_after_trial": false, "return_params": "", "request_credit_card": false, "require_credit_card": false, "created_at": "2016-03-24T13:38:39-04:00", "updated_at": "2016-11-03T13:03:05-04:00", "archived_at": null, "update_return_url": "", "update_return_params": "", "product_family": { "id": 527890, "name": "Acme Projects", "handle": "billing-plans", "accounting_code": null, "description": "" }, "public_signup_pages": [ { "id": 281054, "url": "https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic" }, { "id": 281240, "url": "https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic" }, { "id": 282694, "url": "https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic" } ], "taxable": false, "version_number": 7, "product_price_point_name": "Default" }, "credit_card": { "id": 10191713, "payment_type": "credit_card", "first_name": "Curtis", "last_name": "Test", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 1, "expiration_year": 2026, "billing_address": "123 Anywhere Street", "billing_address_2": "", "billing_city": "Boulder", "billing_state": null, "billing_country": "", "billing_zip": "80302", "current_vault": "bogus", "vault_token": "1", "customer_vault_token": null, "customer_id": 14714298 }, "payment_type": "credit_card", "referral_code": "w7kjc9", "next_product_id": null, "coupon_use_count": 1, "coupon_uses_allowed": 1, "stored_credential_transaction_id": 166411599220288, "on_hold_at": null, "scheduled_cancellation_at": "2016-11-14T14:48:13-05:00" } } ``` ##### Override Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/override-subscription Sets certain subscription fields that are usually managed automatically. Some of the fields can be set via the normal Subscriptions Update API, but others can only be set using this endpoint. This endpoint is provided for cases where you need to “align” Advanced Billing data with data that happened in your system, perhaps before you started using Advanced Billing. For example, you may choose to import your historical subscription data, and would like the activation and cancellation dates in Advanced Billing to match your existing historical dates. Advanced Billing does not backfill historical events (i.e. from the Events API), but some static data can be changed via this API. Why are some fields only settable from this endpoint, and not the normal subscription create and update endpoints? Because we want users of this endpoint to be aware that these fields are usually managed by Advanced Billing, and using this API means **you are stepping out on your own.** Changing these fields will not affect any other attributes. For example, adding an expiration date will not affect the next assessment date on the subscription. If you regularly need to override the current_period_starts_at for new subscriptions, this can also be accomplished by setting both `previous_billing_at` and `next_billing_at` at subscription creation. See the documentation on [Importing Subscriptions](./b3A6MTQxMDgzODg-create-subscription#subscriptions-import) for more information. ## Limitations When passing `current_period_starts_at` some validations are made: 1. The subscription needs to be unbilled (no statements or invoices). 2. The value passed must be a valid date/time. We recommend using the iso 8601 format. 3. The value passed must be before the current date/time. If unpermitted parameters are sent, a 400 HTTP response is sent along with a string giving the reason for the problem. ```http PUT /subscriptions/{subscription_id}/override.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Override Subscription Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/override-subscription-request) | Body, Optional | Only these fields are available to be set. | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/override.json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "subscription": { "activated_at": "1999-12-01T10:28:34-05:00", "canceled_at": "2000-12-31T10:28:34-05:00", "cancellation_message": "Original cancellation in 2000", "expires_at": "2001-07-15T10:28:34-05:00" } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Single Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response) | ##### Find Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/find-subscription Finds a subscription by its reference. ```http GET /subscriptions/lookup.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `reference` | `String` | Query, Optional | Subscription reference | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/lookup.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Purge Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/purge-subscription Purges an individual subscription for sites in test mode. Provide the subscription ID in the URL. To confirm, supply the customer ID in the query string `ack` parameter. You may also delete the customer record and/or payment profiles by passing `cascade` parameters. For example, to delete just the customer record, the query params would be: `?ack={customer_id}&cascade[]=customer` If you need to remove subscriptions from a live site, contact support to discuss your use case. ### Delete customer and payment profile The query params will be: `?ack={customer_id}&cascade[]=customer&cascade[]=payment_profile` ```http POST /subscriptions/{subscription_id}/purge.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `ack` | `Number` | Query, Required | id of the customer. | | `cascade` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-purge-type) | Query, Optional | Options are "customer" or "payment_profile".
Use in query: `cascade[]=customer&cascade[]=payment_profile`. | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X POST -G \ --url 'https://subdomain.chargify.com/subscriptions/222/purge.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'ack=252' \ -d 'cascade[]=customer' \ -d 'cascade[]=payment_profile' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 400 | Bad Request | [`Subscription Response_ErrorException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-response-error) | ##### Update Prepaid Subscription Configuration Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/update-prepaid-subscription-configuration Updates a subscription's prepaid configuration. ```http POST /subscriptions/{subscription_id}/prepaid_configurations.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Upsert Prepaid Configuration Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/upsert-prepaid-configuration-request) | Body, Optional | - | # Response Type **200**: OK [`Prepaid Configuration Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-configuration-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/prepaid_configurations.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "prepaid_configuration": { "initial_funding_amount_in_cents": 50000, "replenish_to_amount_in_cents": 50000, "auto_replenish": true, "replenish_threshold_amount_in_cents": 10000 } }' ``` # Example Response *(as JSON)* ```json { "prepaid_configuration": { "id": 55, "initial_funding_amount_in_cents": 2500, "auto_replenish": true, "replenish_to_amount_in_cents": 50000, "replenish_threshold_amount_in_cents": 10000 } } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 422 | Unprocessable Entity (WebDAV) | ##### Preview Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/preview-subscription Previews a subscription by POSTing the same JSON or XML as for a subscription creation. The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. This endpoint does not create a subscription; it is meant to serve as a prediction. For more information, see [Subscriber Interface Overview](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). ## Subscriptions can now work independently from the catalog If you have the new [Catalog experience](https://developers.maxio.com/http/help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, you can create subscriptions without a `product_id` or `product_handle` using POST /subscriptions, building them entirely from components. A valid subscription must include at least one active component with: - a positive `allocated_quantity`, - a positive `unit_balance`, or - 'enabled: true' (for on/off components) `component_id` can be provided as a numeric ID or in handle: format. If `trial_interval` and `trial_interval_unit` are included, they are applied at creation. In the response, product and product price point fields are null, and component details are returned instead. This functionality is supported in the API, but is not currently supported in SDKs. ## Taxable Subscriptions This endpoint previews taxes applicable to a purchase. For taxes to be previewed, the following conditions must be met: + Taxes must be configured on the subscription + The preview must be for the purchase of a taxable product or component, or combination of the two. + The subscription payload must contain a full billing or shipping address to calculate tax For more information about creating taxable previews, see [Taxes](https://maxio.zendesk.com/hc/en-us/sections/24287012349325-Taxes). You do **not** need to include a card number to generate tax information when you are previewing a subscription. However, when you actually want to create the subscription, you must include the credit card information if you want the billing address to be stored. The billing address and the credit card information are stored together within the payment profile object. Also, you cannot send a billing address without payment profile information, as the address is stored on the card. You can pass shipping and billing addresses and still decide not to calculate taxes. To do that, pass `skip_billing_manifest_taxes: true` attribute. ## Non-taxable Subscriptions If you'd like to calculate subscriptions that do not include tax, you can leave off the billing information. ```http POST /subscriptions/preview.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Subscription Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Preview Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-preview-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/preview.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "subscription": { "product_handle": "gold-product" } }' ``` # Example Response *(as JSON)* ```json { "subscription_preview": { "current_billing_manifest": { "line_items": [ { "transaction_type": "charge", "kind": "baseline", "amount_in_cents": 5000, "memo": "Gold Product (08/21/2018 - 09/21/2018)", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0, "product_id": 1, "product_handle": "gold-product", "product_name": "Gold Product", "period_range_start": "13 Oct 2023", "period_range_end": "13 Nov 2023" }, { "transaction_type": "charge", "kind": "component", "amount_in_cents": 28000, "memo": "Component name: 14 Unit names", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0, "component_id": 462149, "component_handle": "handle", "component_name": "Component name" }, { "transaction_type": "charge", "kind": "component", "amount_in_cents": 2000, "memo": "Fractional Metered Components: 20.0 Fractional Metereds", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0, "component_id": 426665, "component_handle": "handle", "component_name": "Fractional Metered Components" }, { "transaction_type": "charge", "kind": "component", "amount_in_cents": 0, "memo": "On/Off Component", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0, "component_id": 426670, "component_handle": "handle", "component_name": "On/Off Component" }, { "transaction_type": "adjustment", "kind": "coupon", "amount_in_cents": 0, "memo": "Coupon: 1DOLLAR - You only get $1.00 off", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0 } ], "total_in_cents": 35000, "total_discount_in_cents": 0, "total_tax_in_cents": 0, "subtotal_in_cents": 35000, "start_date": "2018-08-21T21:25:21Z", "end_date": "2018-09-21T21:25:21Z", "period_type": "recurring", "existing_balance_in_cents": 0 }, "next_billing_manifest": { "line_items": [ { "transaction_type": "charge", "kind": "baseline", "amount_in_cents": 5000, "memo": "Gold Product (09/21/2018 - 10/21/2018)", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0, "product_id": 1, "product_handle": "gold-product", "product_name": "Gold Product" }, { "transaction_type": "charge", "kind": "component", "amount_in_cents": 28000, "memo": "Component name: 14 Unit names", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0, "component_id": 462149, "component_handle": "handle", "component_name": "Component name" }, { "transaction_type": "charge", "kind": "component", "amount_in_cents": 0, "memo": "On/Off Component", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0, "component_id": 426670, "component_handle": "handle", "component_name": "On/Off Component" } ], "total_in_cents": 33000, "total_discount_in_cents": 0, "total_tax_in_cents": 0, "subtotal_in_cents": 33000, "start_date": "2018-09-21T21:25:21Z", "end_date": "2018-10-21T21:25:21Z", "period_type": "recurring", "existing_balance_in_cents": 0 } } } ``` ##### Apply Coupons to Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/apply-coupons-to-subscription Applies one or more coupon codes to an existing subscription. An existing subscription can accommodate multiple discounts/coupon codes. This is only applicable if each coupon is stackable. For more information on stackable coupons, we recommend reviewing our [coupon documentation.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#stackability-rules) ## Query Parameters vs Request Body Parameters Passing in a coupon code as a query parameter will add the code to the subscription, completely replacing all existing coupon codes on the subscription. For this reason, using this query parameter on this endpoint has been deprecated in favor of using the request body parameters as described below. When passing in request body parameters, the list of coupon codes will simply be added to any existing list of codes on the subscription. ```http POST /subscriptions/{subscription_id}/add_coupon.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `code` | `String` | Query, Optional | A code for the coupon that would be applied to a subscription | | `body` | [`Add Coupons Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/add-coupons-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/add_coupon.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "codes": [ "COUPON_1", "COUPON_2" ] }' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 21607180, "state": "active", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2018-04-20T14:20:57-05:00", "created_at": "2018-04-20T14:20:57-05:00", "updated_at": "2018-05-11T13:53:44-05:00", "expires_at": null, "balance_in_cents": 49000, "current_period_ends_at": "2018-05-12T11:33:03-05:00", "next_assessment_at": "2018-05-12T11:33:03-05:00", "canceled_at": null, "cancellation_message": null, "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "remittance", "snap_day": null, "cancellation_method": null, "current_period_started_at": "2018-05-11T11:33:03-05:00", "previous_state": "active", "signup_payment_id": 237154761, "signup_revenue": "0.00", "delayed_cancel_at": null, "coupon_code": "COUPONA", "total_revenue_in_cents": 52762, "product_price_in_cents": 100000, "product_version_number": 2, "payment_type": "credit_card", "referral_code": "x45nc8", "coupon_use_count": 0, "coupon_uses_allowed": 1, "reason_code": null, "automatically_resume_at": null, "coupon_codes": [ "COUPONA", "COUPONB" ], "customer": { "id": 21259051, "first_name": "K", "last_name": "C", "organization": "", "email": "example@chargify.com", "created_at": "2018-04-20T14:20:57-05:00", "updated_at": "2018-04-23T15:29:28-05:00", "reference": null, "address": "", "address_2": "", "city": "", "state": "", "zip": "", "country": "", "phone": "", "portal_invite_last_sent_at": "2018-04-20T14:20:59-05:00", "portal_invite_last_accepted_at": null, "verified": false, "portal_customer_created_at": "2018-04-20T14:20:59-05:00", "cc_emails": "", "tax_exempt": false }, "product": { "id": 4581816, "name": "Basic", "handle": "basic", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2017-11-02T15:00:11-05:00", "updated_at": "2018-04-10T09:02:59-05:00", "price_in_cents": 100000, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": 100000, "trial_price_in_cents": 1000, "trial_interval": 10, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": true, "return_params": "", "taxable": false, "update_return_url": "", "tax_code": "", "initial_charge_after_trial": false, "version_number": 2, "update_return_params": "", "product_family": { "id": 1025627, "name": "My Product Family", "description": "", "handle": "acme-products", "accounting_code": null }, "public_signup_pages": [ { "id": 333589, "return_url": "", "return_params": "", "url": "https://general-goods.chargifypay.com/subscribe/hbwtd98j3hk2/basic" }, { "id": 335926, "return_url": "", "return_params": "", "url": "https://general-goods.chargifypay.com/subscribe/g366zy67c7rm/basic" }, { "id": 345555, "return_url": "", "return_params": "", "url": "https://general-goods.chargifypay.com/subscribe/txqyyqk7d8rz/basic" }, { "id": 345556, "return_url": "", "return_params": "", "url": "https://general-goods.chargifypay.com/subscribe/2zss3qpf4249/basic" } ] }, "credit_card": { "id": 14839830, "first_name": "John", "last_name": "Doe", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 1, "expiration_year": 2028, "customer_id": 21259051, "current_vault": "bogus", "vault_token": "1", "billing_address": null, "billing_city": null, "billing_state": null, "billing_zip": "99999", "billing_country": null, "customer_vault_token": null, "billing_address_2": null, "payment_type": "credit_card" } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Subscription Add Coupon ErrorException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-add-coupon-error) | ##### Remove Coupon from Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/remove-coupon-from-subscription Removes a coupon from an existing subscription. For more information on the expected behavior of removing a coupon from a subscription, see [Coupons and Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon). ```http DELETE /subscriptions/{subscription_id}/remove_coupon.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `coupon_code` | `String` | Query, Optional | The coupon code | # Response Type **200**: OK `String` # Example Usage ```bash curl -X DELETE -G \ --url 'https://subdomain.chargify.com/subscriptions/222/remove_coupon.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response ``` "Coupon successfully removed" ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Subscription Remove Coupon ErrorsException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-remove-coupon-errors) | ##### Activate Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscriptions/activate-subscription Activates awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group cannot be activated immediately. The `revert_on_failure` parameter controls the behavior upon activation failure. - If set to `true` and something goes wrong i.e. payment fails, the subscription's state does not change. The subscription’s billing period also remains the same. - If set to `false` and something goes wrong i.e. payment fails, the activation continues and enters an end of life state. For trialing subscriptions, that is either trial ended (if the trial is no obligation), past due (if the trial has an obligation), or canceled (if the site has no dunning strategy, or has a strategy that says to cancel immediately). For awaiting signup subscriptions, that is always canceled. The default activation failure behavior can be configured per activation attempt, or you can set a default value under Config > Settings > Subscription Activation Settings. ## Activation Scenarios ### Activate Awaiting Signup subscription - Given you have a product without trial - Given you have a site without dunning strategy ```mermaid flowchart LR AS[Awaiting Signup] --> A{Activate} A -->|Success| Active A -->|Failure| ROF{revert_on_failure} ROF -->|true| AS ROF -->|false| Canceled ``` - Given you have a product with trial - Given you have a site with dunning strategy ```mermaid flowchart LR AS[Awaiting Signup] --> A{Activate} A -->|Success| Trialing A -->|Failure| ROF{revert_on_failure} ROF -->|true| AS ROF -->|false| PD[Past Due] ``` ### Activate Trialing subscription For more information about the behavior of trialing subscriptions, see [Trialing Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24252155721869-Trialing-Subscriptions). When the `revert_on_failure` parameter is set to `true`, the subscription's state remains Trialing; the invoice from activation is voided, and any prepayments and credits applied to the invoice are returned to the subscription. ```http PUT /subscriptions/{subscription_id}/activate.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Activate Subscription Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/activate-subscription-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/activate.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 400 | Bad Request | [`Error Array Map ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) | #### Subscription Components ##### Read Subscription Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/read-subscription-component Returns information for a specific component on a subscription. ```http GET /subscriptions/{subscription_id}/components/{component_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component. Alternatively, the component's handle prefixed by `handle:` | # Response Type **200**: OK [`Subscription Component Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/subscriptions/222/components/222.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "component": { "component_id": 193028, "subscription_id": 14593192, "allocated_quantity": 1, "pricing_scheme": "per_unit", "name": "Users", "kind": "quantity_based_component", "unit_name": "Users", "price_point_id": 1, "price_point_handle": "top-tier", "enabled": true } } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### List Subscription Components Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/list-subscription-components Lists a subscription's applied components. ## Archived Components When requesting to list components for a given subscription, if the subscription contains **archived** components they will be listed in the server response. ```http GET /subscriptions/{subscription_id}/components.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `date_field` | [`Subscription List Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-list-date-field) | Query, Optional | The type of filter you'd like to apply to your search. Use in query `date_field=updated_at`. | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`List Subscription Components Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-components-filter) | Query, Optional | Filter to use for List Subscription Components operation | | `end_date` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `end_datetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. | | `price_point_ids` | [`Include Not Null`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-not-null) | Query, Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | | `product_family_ids` | `array` | Query, Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | | `sort` | [`List Subscription Components Sort`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-subscription-components-sort) | Query, Optional | The attribute by which to sort. Use in query `sort=updated_at`. | | `start_date` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `start_datetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. | | `include` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-subscription-components-include) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | | `in_use` | `Boolean` | Query, Optional | If in_use is set to true, it returns only components that are currently in use. However, if it's set to false or not provided, it returns all components connected with the subscription. | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/222/components.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'date_field=updated_at' \ -d 'filter[currencies]=EUR%2CUSD' \ -d 'price_point_ids=not_null' \ -d 'product_family_ids=1%2C2%2C3' \ -d 'sort=updated_at' \ -d 'include=subscription%2Chistoric_usages' \ -d 'in_use=true' ``` # Example Response *(as JSON)* ```json [ { "component": { "component_id": 0, "subscription_id": 0, "allocated_quantity": 0, "pricing_scheme": "per_unit", "name": "string", "kind": "quantity_based_component", "unit_name": "string", "price_point_id": 0, "price_point_handle": "string", "price_point_type": "default", "price_point_name": "string", "enabled": true, "unit_balance": 0, "id": 0, "created_at": "2022-02-22T14:07:00-05:00", "updated_at": "2022-02-22T14:07:00-05:00", "component_handle": "string", "archived_at": null } } ] ``` ##### Bulk Update Subscription Components Price Points Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/bulk-update-subscription-components-price-points Updates the price points on one or more of a subscription's components. The `price_point` key can take either a: 1. Price point id (integer) 2. Price point handle (string) 3. `"_default"` string, which will reset the price point to the component's current default price point. ```http POST /subscriptions/{subscription_id}/price_points.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Bulk Components Price Point Assignment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-components-price-point-assignment) | Body, Optional | - | # Response Type **200**: OK [`Bulk Components Price Point Assignment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-components-price-point-assignment) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/price_points.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "components": [ { "component_id": 997, "price_point": 1022 }, { "component_id": 998, "price_point": "wholesale-handle" }, { "component_id": 999, "price_point": "_default" } ] }' ``` # Example Response *(as JSON)* ```json { "components": [ { "component_id": 123, "price_point": 456 }, { "component_id": 789, "price_point": 987 } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Component PricePoint ErrorException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/component-price-point-error) | ##### Bulk Reset Subscription Components Price Points Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/bulk-reset-subscription-components-price-points Resets all of a subscription's components to use the current default. **Note**: this will update the price point for all of the subscription's components, even ones that have not been allocated yet. ```http POST /subscriptions/{subscription_id}/price_points/reset.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **201**: Created [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/price_points/reset.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 80293620, "state": "active", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2023-11-23T10:28:34-05:00", "created_at": "2023-11-23T10:28:34-05:00", "updated_at": "2023-11-23T10:28:34-05:00", "expires_at": null, "balance_in_cents": 50504234, "current_period_ends_at": "2023-11-23T10:28:34-05:00", "next_assessment_at": "2023-11-23T10:28:34-05:00", "canceled_at": null, "cancellation_message": "lorem ipsum", "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "remittance", "snap_day": null, "cancellation_method": "dunning", "current_period_started_at": "2023-11-23T10:28:34-05:00", "previous_state": "active", "signup_payment_id": -45156092, "signup_revenue": "do aliquip ea", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": -49740952, "product_price_in_cents": 87617888, "product_version_number": 13656635, "payment_type": null, "referral_code": null, "coupon_use_count": null, "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": null, "current_billing_amount_in_cents": -26151968, "customer": { "id": 15208337, "first_name": "ipsum culpa in labore eiusmod", "last_name": "esse", "organization": null, "email": "ex eiusmod", "created_at": "2021-05-05T16:00:21-04:00", "updated_at": "2021-05-05T16:00:21-04:00", "reference": "laboris ea cupidatat", "address": null, "address_2": null, "city": "id eiusmod proident", "state": "magna eiusmod anim non", "zip": null, "country": null, "phone": null, "portal_invite_last_sent_at": null, "portal_invite_last_accepted_at": "2021-05-05T20:00:21-04:00", "portal_customer_created_at": "2021-05-05T16:00:21-04:00", "cc_emails": "eiusmod sunt", "tax_exempt": true }, "product": { "id": -74447756, "name": "eu mollit nulla ut aute", "handle": "esse dolor anim", "description": "Lorem ut et non", "accounting_code": "nisi", "request_credit_card": false, "expiration_interval": 1, "expiration_interval_unit": "day", "created_at": "2022-11-23T10:28:34-05:00", "updated_at": "2022-11-23T10:28:34-05:00", "price_in_cents": -4151649, "interval": 20680876, "interval_unit": "day", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "day", "archived_at": null, "require_credit_card": true, "return_params": "magna eu", "taxable": true, "update_return_url": "exercitation in", "tax_code": "Excepteur aliqua sunt in", "initial_charge_after_trial": true, "version_number": 41642597, "update_return_params": "dolore labore", "product_family": { "id": -5356997, "name": "officia amet Lorem proident enim", "description": "Duis", "handle": "ea dolore dolore sunt", "accounting_code": null } } } } ``` ##### Allocate Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/allocate-component Creates an allocation, sets the current allocated quantity for the component, and records a memo. Allocations can only be updated for Quantity, On/Off, and Prepaid Components. When creating an allocation via the API, you can pass the `upgrade_charge`, `downgrade_credit`, and `accrue_charge` to be applied. > **Note:** These proration and accrual fields are ignored for Prepaid Components since this component type always generates charges immediately without proration. For information on prorated components and upgrade/downgrade schemes, see [Setting Component Allocations.](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration) ### Order of Resolution for upgrade_charge and downgrade_credit 1. Per allocation in API call (within a single allocation of the `allocations` array) 2. [Component-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) 3. Allocation API call top level (outside of the `allocations` array) 4. [Site-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) ### Order of Resolution for accrue charge 1. Allocation API call top level (outside of the `allocations` array) 2. [Site-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) > **Note:** Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong. For more information, see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product Documentation. ```http POST /subscriptions/{subscription_id}/components/{component_id}/allocations.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component | | `body` | [`Create Allocation Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-allocation-request) | Body, Optional | - | # Response Type **200**: OK [`Allocation Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/components/222/allocations.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "allocation": { "quantity": 10.0, "decimal_quantity": "10.0", "previous_quantity": 5.0, "decimal_previous_quantity": "5.0", "memo": "Increase seats to 10", "proration_upgrade_scheme": "full-price-attempt-capture", "proration_downgrade_scheme": "prorate", "accrue_charge": false, "upgrade_charge": "full", "downgrade_credit": "prorated", "price_point_id": 789, "billing_schedule": { "initial_billing_at": "2025-02-28" }, "custom_price": { "pricing_scheme": "per_unit", "tax_included": false, "renew_prepaid_allocation": false, "rollover_prepaid_remainder": false, "expiration_interval": 150, "expiration_interval_unit": "never", "interval": 1, "interval_unit": "month", "list_price_point_id": 4321, "use_default_list_price": false, "prices": [ { "starting_quantity": 1, "ending_quantity": 25, "unit_price": "49.00" }, { "starting_quantity": 26, "ending_quantity": null, "unit_price": "39.00" } ] } } }' ``` # Example Response *(as JSON)* ```json { "allocation": { "component_id": 4034995, "subscription_id": 23737320, "quantity": 3, "previous_quantity": 2, "memo": "dolore cupidatat elit", "timestamp": "2022-11-23T10:28:34-05:00", "proration_upgrade_scheme": "laboris ipsum dolore", "proration_downgrade_scheme": "eiusmod dolore", "price_point_id": -69720370, "previous_price_point_id": -76493052, "accrue_charge": true, "upgrade_charge": "full", "downgrade_credit": "full", "payment": { "id": -44566528, "amount_in_cents": 123, "success": false, "memo": "aliqua" } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Allocations Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/list-allocations Lists the 50 most recent Allocations, ordered by most recent first. ## On/Off Components When a subscription's on/off component has been toggled to on (`1`) or off (`0`), usage will be logged in this response. ```http GET /subscriptions/{subscription_id}/components/{component_id}/allocations.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/222/components/222/allocations.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' ``` # Example Response *(as JSON)* ```json [ { "allocation": { "allocation_id": 2370199, "component_id": 41028, "subscription_id": 352827, "quantity": 10, "previous_quantity": 0, "memo": "Recoding component allocation", "timestamp": "2024-02-28T09:31:05Z", "proration_upgrade_scheme": "full-price-attempt-capture", "proration_downgrade_scheme": "no-prorate", "price_point_id": 2957424, "price_point_handle": "uuid:03190e20-b84a-013c-ca77-0286551bb34f", "price_point_name": "Original", "previous_price_point_id": 2957424, "component_handle": "test-prepaid-component-4982065948", "accrue_charge": false, "upgrade_charge": "full", "downgrade_credit": "none", "created_at": "2024-02-28T04:31:05-05:00", "initiate_dunning": false, "expires_at": "2024-08-03T20:00:00-04:00", "used_quantity": 5, "charge_id": 11586076 } }, { "allocation": { "memo": null, "timestamp": "2012-11-20T21:48:09Z", "quantity": 3, "previous_quantity": 0, "component_id": 11960, "subscription_id": 2585595, "proration_upgrade_scheme": "no-prorate", "proration_downgrade_scheme": "no-prorate" } } ] ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Allocate Components Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/allocate-components Creates multiple allocations, sets the current allocated quantity for each of the components, and records a memo. A `component_id` is required for each allocation. The charges and/or credits that are created will be rolled up into a single total which is used to determine whether this is an upgrade or a downgrade. ### Order of Resolution for upgrade_charge and downgrade_credit 1. Per allocation in API call (within a single allocation of the `allocations` array) 2. [Component-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) 3. Allocation API call top level (outside of the `allocations` array) 4. [Site-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) ### Order of Resolution for accrue charge 1. Allocation API call top level (outside of the `allocations` array) 2. [Site-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) > **Note:** Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong. For more information, see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product documentation. ```http POST /subscriptions/{subscription_id}/allocations.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Allocate Components`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocate-components) | Body, Optional | - | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/allocations.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "proration_upgrade_scheme": "prorate-attempt-capture", "proration_downgrade_scheme": "no-prorate", "allocations": [ { "component_id": 123, "quantity": 10.0, "memo": "foo" }, { "component_id": 456, "quantity": 5.0, "memo": "bar" } ] }' ``` # Example Response *(as JSON)* ```json [ { "allocation": { "component_id": 193159, "subscription_id": 15540611, "quantity": 10, "previous_quantity": 0, "memo": "foo", "timestamp": "2016-12-08T19:09:15Z", "proration_upgrade_scheme": "prorate-attempt-capture", "proration_downgrade_scheme": "no-prorate", "payment": { "amount_in_cents": 1451, "success": true, "memo": "Payment for: Prorated component allocation changes.", "id": 165473487 } } }, { "allocation": { "component_id": 277221, "subscription_id": 15540611, "quantity": 5, "previous_quantity": 0, "memo": "bar", "timestamp": "2016-12-08T19:09:15Z", "proration_upgrade_scheme": "prorate-attempt-capture", "proration_downgrade_scheme": "no-prorate", "payment": { "amount_in_cents": 1451, "success": true, "memo": "Payment for: Prorated component allocation changes.", "id": 165473487 } } } ] ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Preview Allocations Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/preview-allocations Previews a potential subscription's **quantity-based** or **on/off** component allocation in the middle of the current billing period. This is useful if you want users to be able to see the effect of a component operation before actually doing it. ## Fine-grained Component Control: Use with multiple `upgrade_charge`s or `downgrade_credits` When the allocation uses multiple different types of `upgrade_charge`s or `downgrade_credit`s, the Allocation is viewed as an Allocation which uses "Fine-Grained Component Control". As a result, the response will not include `direction` and `proration` within the `allocation_preview`, but at the `line_items` and `allocations` level respectfully. See example below for Fine-Grained Component Control response. ```http POST /subscriptions/{subscription_id}/allocations/preview.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Preview Allocations Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/preview-allocations-request) | Body, Optional | - | # Response Type **200**: OK [`Allocation Preview Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/allocations/preview.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "allocations": [ { "proration_upgrade_scheme": "prorate-attempt-capture", "proration_downgrade_scheme": "prorate", "component_id": 554108, "price_point_id": 325826, "quantity": 10.0, "memo": "NOW" } ], "effective_proration_date": "2023-11-01" }' ``` # Example Response *(as JSON)* ```json { "allocation_preview": { "start_date": "2019-05-02T15:26:46Z", "end_date": "2019-05-08T15:26:46Z", "period_type": "prorated", "total_in_cents": 150, "total_discount_in_cents": 0, "total_tax_in_cents": 0, "subtotal_in_cents": 150, "existing_balance_in_cents": 0, "accrue_charge": true, "line_items": [ { "direction": "upgrade", "transaction_type": "charge", "kind": "quantity_based_component", "amount_in_cents": 100, "taxable_amount_in_cents": 0, "discount_amount_in_cents": 0, "memo": "Foo: 0 to 10 foo", "component_id": 123, "component_handle": "foo" }, { "direction": "downgrade", "transaction_type": "credit", "kind": "quantity_based_component", "amount_in_cents": -20, "taxable_amount_in_cents": 0, "discount_amount_in_cents": 0, "memo": "Foo: 10 to 5 bar", "component_id": 456, "component_handle": "bar" }, { "direction": "upgrade", "transaction_type": "credit", "kind": "quantity_based_component", "amount_in_cents": 70, "taxable_amount_in_cents": 0, "discount_amount_in_cents": 0, "memo": "Foo: 0 to 10 baz", "component_id": 789, "component_handle": "baz" } ], "allocations": [ { "accrue_charge": true, "upgrade_charge": "prorated", "downgrade_credit": "full", "component_handle": "foo", "component_id": 123, "memo": "foo", "previous_price_point_id": 123, "previous_quantity": 0, "price_point_id": 123, "proration_downgrade_scheme": "full", "proration_upgrade_scheme": "prorate-delay-capture", "quantity": 10, "subscription_id": 123456, "timestamp": null }, { "accrue_charge": true, "upgrade_charge": "full", "downgrade_credit": "prorated", "component_handle": "bar", "component_id": 456, "memo": "foo", "previous_price_point_id": 456, "previous_quantity": 10, "price_point_id": 456, "proration_downgrade_scheme": "prorate", "proration_upgrade_scheme": "full-price-delay-capture", "quantity": 5, "subscription_id": 123456, "timestamp": null }, { "accrue_charge": true, "upgrade_charge": "full", "downgrade_credit": "none", "component_handle": "baz", "component_id": 789, "memo": "foo", "previous_price_point_id": 789, "previous_quantity": 0, "price_point_id": 789, "proration_downgrade_scheme": "no-prorate", "proration_upgrade_scheme": "full-price-delay-capture", "quantity": 10, "subscription_id": 123456, "timestamp": null } ] } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Component Allocation ErrorException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/component-allocation-error) | ##### Update Prepaid Usage Allocation Expiration Date Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/update-prepaid-usage-allocation-expiration-date Updates the expiration date for a prepaid usage allocation. This expiration date can be changed after the fact to allow for extending or shortening the allocation's active window. In order to change a prepaid usage allocation's expiration date, a PUT call must be made to the allocation's endpoint with a new expiration date. ## Limitations A few limitations exist when changing an allocation's expiration date: - An expiration date can only be changed for an allocation that belongs to a price point with expiration interval options explicitly set. - An expiration date can be changed towards the future with no limitations. - An expiration date can be changed towards the past (essentially expiring it) up to the subscription's current period beginning date. ```http PUT /subscriptions/{subscription_id}/components/{component_id}/allocations/{allocation_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component | | `allocation_id` | `Number` | Template, Required | The Advanced Billing id of the allocation | | `body` | [`Update Allocation Expiration Date`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-allocation-expiration-date) | Body, Optional | - | # Response Type **204**: OK `Void` # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/components/222/allocations/24.json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "allocation": { "expires_at": "2021-05-05T16:00:00" } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Subscription Component Allocation ErrorException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-component-allocation-error) | ##### Delete Prepaid Usage Allocation Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/delete-prepaid-usage-allocation Deletes a prepaid usage allocation. Prepaid Usage components are unique in that their allocations are always additive. In order to reduce a subscription's allocated quantity for a prepaid usage component, each allocation must be destroyed individually via this endpoint. ## Credit Scheme By default, destroying an allocation will generate a service credit on the subscription. This behavior can be modified with the optional `credit_scheme` parameter on this endpoint. The accepted values are: 1. `none`: The allocation will be destroyed and the balances will be updated but no service credit or refund will be created. 2. `credit`: The allocation will be destroyed and the balances will be updated and a service credit will be generated. This is also the default behavior if the `credit_scheme` param is not passed. 3. `refund`: The allocation will be destroyed and the balances will be updated and a refund will be issued along with a Credit Note. ```http DELETE /subscriptions/{subscription_id}/components/{component_id}/allocations/{allocation_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component | | `allocation_id` | `Number` | Template, Required | The Advanced Billing id of the allocation | | `body` | [`Credit Scheme Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-scheme-request) | Body, Optional | - | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscriptions/222/components/222/allocations/24.json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "credit_scheme": "none" }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Subscription Component Allocation ErrorException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-component-allocation-error) | ##### Create Usage Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/create-usage Records an instance of metered or prepaid usage for a subscription. You can report metered or prepaid usage to Advanced Billing as often as you wish. You can report usage as it happens or periodically, such as each night or once per billing period. Full documentation on how to create Components in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). Additionally, for information on how to record component usage against a subscription, see the following resources: It is not possible to record metered usage for more than one component at a time. Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each. See the following product documentation articles for more information: - [Create and Manage Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components) - [Recording Metered Component Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-metered-component-usage) - [Reporting Prepaid Component Status](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-prepaid-component-status) The `quantity` from usage for each component is accumulated to the `unit_balance` on the [Component Line Item](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/read-subscription-component) for the subscription. ## Price Point ID usage If you are using price points, for metered and prepaid usage components Advanced Billing gives you the option to specify a price point in your request. You do not need to specify a price point ID. If a price point is not included, the default price point for the component will be used when the usage is recorded. ## Deducting Usage If you need to reverse a previous usage report or otherwise deduct from the current usage balance, you can provide a negative quantity. Example: Previously recorded quantity was 5000: ```json { "usage": { "quantity": 5000, "memo": "Recording 5000 units" } } ``` To reduce the quantity to `0`, POST the following payload: ```json { "usage": { "quantity": -5000, "memo": "Deducting 5000 units" } } ``` The `unit_balance` has a floor of `0`; negative unit balances are never allowed. For example, if the usage balance is 100 and you deduct 200 units, the unit balance would then be `0`, not `-100`. ```http POST /subscriptions/{subscription_id_or_reference}/components/{component_id}/usages.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id_or_reference` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-usage-subscription-id-or-reference) | Template, Required | Either the Advanced Billing subscription ID (integer) or the subscription reference (string). Important: In cases where a numeric string value matches both an existing subscription ID and an existing subscription reference, the system will prioritize the subscription ID lookup. For example, if both subscription ID 123 and subscription reference "123" exist, passing "123" will return the subscription with ID 123. | | `component_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-usage-component-id) | Template, Required | Either the Advanced Billing id for the component or the component's handle prefixed by `handle:` | | `body` | [`Create Usage Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-usage-request) | Body, Optional | - | # Response Type **200**: OK [`Usage Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/usage-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/234/components/144/usages.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "usage": { "quantity": 1000.0, "price_point_id": "149416", "memo": "My memo" } }' ``` # Example Response *(as JSON)* ```json { "usage": { "id": 138522957, "memo": "My memo", "created_at": "2017-11-13T10:05:32-06:00", "price_point_id": 149416, "quantity": 1000, "component_id": 500093, "component_handle": "handle", "subscription_id": 22824464 } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Usages Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/list-usages Lists usages associated with a subscription for a particular metered component. This will display the previously recorded components for a subscription. This endpoint is not compatible with quantity-based components. ## Since Date and Until Date Usage Note: The `since_date` and `until_date` attributes each default to midnight on the date specified. For example, in order to list usages for January 20th, you would need to append the following to the URL. ``` ?since_date=2016-01-20&until_date=2016-01-21 ``` ## Read Usage by Handle Use this endpoint to read the previously recorded components for a subscription. You can now specify either the component id (integer) or the component handle prefixed by "handle:" to specify the unique identifier for the component you are working with. ```http GET /subscriptions/{subscription_id_or_reference}/components/{component_id}/usages.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id_or_reference` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-usages-subscription-id-or-reference) | Template, Required | Either the Advanced Billing subscription ID (integer) or the subscription reference (string). Important: In cases where a numeric string value matches both an existing subscription ID and an existing subscription reference, the system will prioritize the subscription ID lookup. For example, if both subscription ID 123 and subscription reference "123" exist, passing "123" will return the subscription with ID 123. | | `component_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-usages-component-id) | Template, Required | Either the Advanced Billing id for the component or the component's handle prefixed by `handle:` | | `since_id` | `Long` | Query, Optional | Returns usages with an id greater than or equal to the one specified. | | `max_id` | `Long` | Query, Optional | Returns usages with an id less than or equal to the one specified. | | `since_date` | `Date` | Query, Optional | Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the date specified. | | `until_date` | `Date` | Query, Optional | Returns usages with a created_at date less than or equal to midnight (12:00 AM) on the date specified. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/usage-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/234/components/144/usages.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json [ { "usage": { "id": 178534642, "memo": "20", "created_at": "2018-08-03T11:58:42-05:00", "price_point_id": 242632, "quantity": "20.0", "component_id": 500093, "component_handle": "handle", "subscription_id": 22824464 } }, { "usage": { "id": 178534591, "memo": "10", "created_at": "2018-08-03T11:58:29-05:00", "price_point_id": 242632, "quantity": "10.0", "component_id": 500093, "component_handle": "handle", "subscription_id": 22824464 } } ] ``` ##### Activate Event Based Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/activate-event-based-component Activates an event-based component for a single subscription. To bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. For more information, see [Design Your Catalog](https://docs.maxio.com/hc/en-us/articles/24181036583053-Design-Your-Catalog?method=componenttypes). Use this endpoint to activate an event-based component for a single subscription. Activating an event-based component causes billing for events when the subscription is renewed. Note: it is possible to stream events for a subscription at any time, regardless of component activation status. The activation status only determines if the subscription should be billed for event-based component usage at renewal. ```http POST /event_based_billing/subscriptions/{subscription_id}/components/{component_id}/activate.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Advanced Billing id of the subscription | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component | | `body` | [`Activate Event-Based Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/activate-event-based-component) | Body, Optional | - | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/event_based_billing/subscriptions/222/components/222/activate.json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "price_point_id": 1, "billing_schedule": { "initial_billing_at": "2022-01-01" }, "custom_price": { "tax_included": false, "pricing_scheme": "per_unit", "interval": 30, "interval_unit": "day", "prices": [ { "starting_quantity": 1, "ending_quantity": null, "unit_price": "5.0" } ] } }' ``` ##### Deactivate Event Based Component Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/deactivate-event-based-component Deactivates an event-based component for a single subscription. Deactivating the event-based component causes Advanced Billing to ignore related events at subscription renewal. ```http POST /event_based_billing/subscriptions/{subscription_id}/components/{component_id}/deactivate.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Advanced Billing id of the subscription | | `component_id` | `Number` | Template, Required | The Advanced Billing id of the component | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/event_based_billing/subscriptions/222/components/222/deactivate.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` ##### Record Event Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/record-event Records a single event for Events-Based Billing. Events-Based Billing is an evolved form of metered billing that is based on data-rich events streamed in real-time from your system to Advanced Billing. These events can then be transformed, enriched, or analyzed to form the computed totals of usage charges billed to your customers. This API allows you to stream events into the Advanced Billing data ingestion engine. For more information, see [Design Your Catalog](https://docs.maxio.com/hc/en-us/articles/24181036583053-Design-Your-Catalog?method=componenttypes). Note: this endpoint differs from the standard URL for this API in that `events` and your site subdomain are included in the path. For example: ``` https://events.chargify.com/my-site-subdomain/events/my-stream-api-handle ``` ```http POST /events/{api_handle}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `api_handle` | `String` | Template, Required | Identifies the Stream for which the event should be published. | | `store_uid` | `String` | Query, Optional | If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. This applies to Legacy Metering sites only — it has no effect on Maxio Metering sites. | | `body` | [`EBB Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/ebb-event) | Body, Optional | - | # Server `ebb` # Response Type **201**: Created `Void` # Example Usage ```bash curl -X POST \ --url 'https://events.chargify.com/subdomain/events/api_handle6.json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "chargify": { "subscription_id": 1, "timestamp": "2020-02-27T17:45:50-05:00" }, "messages": 150, "country": "US", "customer": { "name": "John", "lastName": "Doe", "address": { "street": "Maple Street", "zip": 4888, "state": "MA" } } }' ``` ##### Bulk Record Events Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/bulk-record-events Records a collection of events. Note: this endpoint differs from the standard URL for this API in that `events` and your site subdomain are included in the path. A maximum of 1000 events can be published in a single request. A 422 will be returned if this limit is exceeded. ```http POST /events/{api_handle}/bulk.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `api_handle` | `String` | Template, Required | Identifies the Stream for which the events should be published. | | `store_uid` | `String` | Query, Optional | If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. This applies to Legacy Metering sites only — it has no effect on Maxio Metering sites. | | `body` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/ebb-event) | Body, Optional | - | # Server `ebb` # Response Type **201**: Created `Void` # Example Usage ```bash curl -X POST \ --url 'https://events.chargify.com/subdomain/events/api_handle6/bulk.json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '[ { "chargify": { "subscription_id": 1, "timestamp": "2020-02-27T17:45:50-05:00" }, "messages": 150, "country": "US", "customer": { "name": "John", "lastName": "Doe", "address": { "street": "Maple Street", "zip": 4888, "state": "MA" } } } ]' ``` ##### List Subscription Components for Site Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-components/list-subscription-components-for-site Lists components applied to each subscription. ```http GET /subscriptions_components.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `sort` | [`List Subscription Components Sort`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-subscription-components-sort) | Query, Optional | The attribute by which to sort. Use in query: `sort=updated_at`. | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `filter` | [`List Subscription Components for Site Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-components-for-site-filter) | Query, Optional | Filter to use for List Subscription Components For Site operation | | `date_field` | [`Subscription List Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-list-date-field) | Query, Optional | The type of filter you'd like to apply to your search. Use in query: `date_field=updated_at`. | | `start_date` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `start_date=2011-12-15`. | | `start_datetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `start_datetime=2022-07-01 09:00:05`. | | `end_date` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `end_date=2011-12-16`. | | `end_datetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `end_datetime=2022-07-01 09:00:05`. | | `subscription_ids` | `array` | Query, Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`.

**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `200` | | `price_point_ids` | [`Include Not Null`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-not-null) | Query, Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | | `product_family_ids` | `array` | Query, Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | | `include` | [`List Subscription Components Include`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-subscription-components-include) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | # Response Type **200**: OK [`List Subscription Components Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-components-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions_components.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'sort=updated_at' \ -d 'filter[currencies]=EUR%2CUSD' \ -d 'date_field=updated_at' \ -d 'subscription_ids=1%2C2%2C3' \ -d 'price_point_ids=not_null' \ -d 'product_family_ids=1%2C2%2C3' \ -d 'include=subscription' ``` #### Subscription Groups ##### Signup with Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/signup-with-subscription-group Creates multiple subscriptions at once under the same customer and consolidates them into a subscription group. You must provide one and only one of the `payer_id`/`payer_reference`/`payer_attributes` for the customer attached to the group. You must provide one and only one of the `payment_profile_id`/`credit_card_attributes`/`bank_account_attributes` for the payment profile attached to the group. Only one of the `subscriptions` can have `"primary": true` attribute set. When passing a product to a subscription you can use either `product_id` or `product_handle` or `offer_id`. You can also use `custom_price` instead. The subscription request examples below will be split into two sections. The first section, "Subscription Customization", will focus on passing different information with a subscription, such as components, calendar billing, and custom fields. These examples will presume you are using a secure chargify_token generated by Maxio.js (formerly Chargify.js). ```http POST /subscription_groups/signup.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Subscription Group Signup Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-request) | Body, Optional | - | # Response Type **201**: Created [`Subscription Group Signup Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups/signup.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "subscription_group": { "payment_profile_id": 123, "payer_id": 123, "subscriptions": [ { "product_id": 11, "primary": true }, { "product_id": 12 }, { "product_id": 13 } ] } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Subscription Group Signup Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-group-signup-error-response) | ##### Create Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/create-subscription-group Creates a subscription group with given members. ```http POST /subscription_groups.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create Subscription Group Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-group-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Group Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "subscription_group": { "subscription_id": 1, "member_ids": [ 2, 3, 4 ] } }' ``` # Example Response *(as JSON)* ```json { "subscription_group": { "uid": "grp_952mvqcnk53wq", "customer_id": 1, "payment_profile": { "id": 1, "first_name": "t", "last_name": "t", "masked_card_number": "XXXX-XXXX-XXXX-1" }, "payment_collection_method": "automatic", "subscription_ids": [ 1, 2 ], "created_at": "2021-01-21T05:47:38-05:00" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Subscription Group Create Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-group-create-error-response) | ##### List Subscription Groups Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/list-subscription-groups Lists subscription groups for the site. The response is paginated and will return a `meta` key with pagination information. #### Account Balance Information Account balance information for the subscription groups is not returned by default. If this information is desired, the `include[]=account_balances` parameter must be provided with the request. ```http GET /subscription_groups.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `include` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-groups-list-include) | Query, Optional | A list of additional information to include in the response. The following values are supported:

- `account_balances`: Account balance information for the subscription groups. Use in query: `include[]=account_balances` | # Response Type **200**: OK [`List Subscription Groups Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-groups-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscription_groups.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'include[]=account_balances' ``` # Example Response *(as JSON)* ```json { "subscription_groups": [ { "uid": "grp_952mvqcnk53wq", "scheme": 1, "customer_id": 88498000, "payment_profile_id": 93063018, "subscription_ids": [ 42768907, 82370782 ], "primary_subscription_id": 69844395, "next_assessment_at": "2021-05-05T16:00:21-04:00", "state": "active", "cancel_at_end_of_period": false, "account_balances": { "prepayments": { "balance_in_cents": 0 }, "service_credits": { "balance_in_cents": 0 }, "pending_discounts": { "balance_in_cents": 0 } } } ], "meta": { "current_page": 1, "total_count": 1 } } ``` ##### Read Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/read-subscription-group Returns subscription group details. #### Current Billing Amount in Cents Current billing amount for the subscription group is not returned by default. If this information is desired, the `include[]=current_billing_amount_in_cents` parameter must be provided with the request. ```http GET /subscription_groups/{uid}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `include` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-group-include) | Query, Optional | Allows including additional data in the response. Use in query: `include[]=current_billing_amount_in_cents`. | # Response Type **200**: OK [`Full Subscription Group Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/full-subscription-group-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscription_groups/uid0.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'include[]=current_billing_amount_in_cents' ``` # Example Response *(as JSON)* ```json { "uid": "grp_939ktzq8v4477", "scheme": 1, "customer_id": 400, "payment_profile_id": 567, "subscription_ids": [ 101, 102, 103 ], "primary_subscription_id": 101, "next_assessment_at": "2020-08-01T14:00:00-05:00", "state": "active", "cancel_at_end_of_period": false, "current_billing_amount_in_cents": 11500, "customer": { "first_name": "Mark", "last_name": "Smith", "organization": "Acme Inc.", "email": "smith@example.com", "reference": "4c92223b-bc16-4d0d-87ff-b177a89a2655" }, "account_balances": { "prepayments": { "balance_in_cents": 0 }, "service_credits": { "balance_in_cents": 0 }, "open_invoices": { "balance_in_cents": 4400 }, "pending_discounts": { "balance_in_cents": 0 } } } ``` ##### Update Subscription Group Members Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/update-subscription-group-members Updates subscription group members. `"member_ids"` should contain an array of both subscription IDs to set as group members and subscription IDs already present in the groups. Not including them will result in removing them from the subscription group. To clean up members, just leave the array empty. ```http PUT /subscription_groups/{uid}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `body` | [`Update Subscription Group Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-group-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Group Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscription_groups/uid0.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "subscription_group": { "member_ids": [ 1, 2, 3 ] } }' ``` # Example Response *(as JSON)* ```json { "subscription_group": { "customer_id": 1, "payment_profile": { "id": 1, "first_name": "t", "last_name": "t", "masked_card_number": "XXXX-XXXX-XXXX-1" }, "payment_collection_method": "automatic", "subscription_ids": [ 1 ], "created_at": "2021-01-21T05:47:38-05:00" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Subscription Group Update Error ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-group-update-error-response) | ##### Delete Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/delete-subscription-group Deletes a subscription group. Only groups without members can be deleted. ```http DELETE /subscription_groups/{uid}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | # Response Type **200**: OK [`Delete Subscription Group Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/delete-subscription-group-response) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscription_groups/uid0.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "uid": "grp_99w5xp9y5xycy", "deleted": true } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Find Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/find-subscription-group Finds the subscription group associated with a subscription. If the subscription is not in a group, this endpoint returns an error. ```http GET /subscription_groups/lookup.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `String` | Query, Required | The Advanced Billing id of the subscription associated with the subscription group | # Response Type **200**: OK [`Full Subscription Group Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/full-subscription-group-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscription_groups/lookup.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'subscription_id=subscription_id0' ``` # Example Response *(as JSON)* ```json { "uid": "grp_939ktzq8v4477", "scheme": 1, "customer_id": 400, "payment_profile_id": 567, "subscription_ids": [ 101, 102, 103 ], "primary_subscription_id": 101, "next_assessment_at": "2020-08-01T14:00:00-05:00", "state": "active", "cancel_at_end_of_period": false, "customer": { "first_name": "Mark", "last_name": "Smith", "organization": "Acme Inc.", "email": "smith@example.com", "reference": "4c92223b-bc16-4d0d-87ff-b177a89a2655" }, "account_balances": { "prepayments": { "balance_in_cents": 0 }, "service_credits": { "balance_in_cents": 0 }, "open_invoices": { "balance_in_cents": 4400 }, "pending_discounts": { "balance_in_cents": 0 } } } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Add Subscription to Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/add-subscription-to-group Adds an existing subscription to a subscription group. For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays#customer-hierarchies) features, it is possible to add existing subscriptions to subscription groups. Passing `group` parameters with a `target` containing a `type` and optional `id` is all that's needed. When the `target` parameter specifies a `"customer"` or `"subscription"` that is already part of a hierarchy, the subscription will become a member of the customer's subscription group. If the target customer or subscription is not part of a subscription group, a new group will be created and the subscription will become part of the group with the specified target customer set as the responsible payer for the group's subscriptions. **Note:** In order to add an existing subscription to a subscription group, it must belong to either the same customer record as the target, or be within the same customer hierarchy. Rather than specifying a customer, the `target` parameter could instead simply have a value of * `"self"` which indicates the subscription will be paid for not by some other customer, but by the subscribing customer, * `"parent"` which indicates the subscription will be paid for by the subscribing customer's parent within a customer hierarchy, or * `"eldest"` which indicates the subscription will be paid for by the root-level customer in the subscribing customer's hierarchy. To create a new subscription into a subscription group, reference the following: [Create Subscription in a Subscription Group](https://developers.chargify.com/docs/api-docs/d571659cf0f24-create-subscription#subscription-in-a-subscription-group) ```http POST /subscriptions/{subscription_id}/group.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Add Subscription to a Group`](https://developers.maxio.com/http/advanced-billing-api/models/structures/add-subscription-to-a-group) | Body, Optional | - | # Response Type **200**: OK [`Subscription Group Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/group.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "group": { "target": { "type": "subscription", "id": 32987 }, "billing": { "accrue": true, "align_date": true, "prorate": true } } }' ``` # Example Response *(as JSON)* ```json { "subscription_group": { "customer_id": 130690, "payment_profile": { "id": 32055, "first_name": "Marty", "last_name": "McFly", "masked_card_number": "XXXX-XXXX-XXXX-1111" }, "subscription_ids": [ 32988, 33060, 32986 ], "created_at": "2018-08-30T17:14:30-04:00" } } ``` ##### Remove Subscription from Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-groups/remove-subscription-from-group Removes an existing subscription from a subscription group. For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays#customer-hierarchies) features, it is possible to remove an existing subscription from a subscription group. ```http DELETE /subscriptions/{subscription_id}/group.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscriptions/222/group.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Subscription Group Invoice Account ##### Create Subscription Group Prepayment Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-invoice-account/create-subscription-group-prepayment Adds a prepayment for a subscription group. This endpoint requires an `amount`, `details`, `method`, and `memo`. On success, the prepayment will be added to the group's prepayment balance. ```http POST /subscription_groups/{uid}/prepayments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `body` | [`Subscription Group Prepayment Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-prepayment-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Group Prepayment Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-prepayment-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/prepayments.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "id": 6049554, "amount_in_cents": 10000, "ending_balance_in_cents": 5000, "entry_type": "Debit", "memo": "Debit from invoice account." } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Prepayments for Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-invoice-account/list-prepayments-for-subscription-group Lists a subscription group's prepayments. ```http GET /subscription_groups/{uid}/prepayments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`List Prepayments Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-prepayments-filter) | Query, Optional | Filter to use for List Prepayments operations | # Response Type **200**: OK [`List Subscription Group Prepayment Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-group-prepayment-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/prepayments.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'filter[date_field]=created_at' \ -d 'filter[start_date]=2024-01-01' \ -d 'filter[end_date]=2024-01-31' ``` # Example Response *(as JSON)* ```json { "prepayments": [ { "prepayment": { "id": 142, "subscription_group_uid": "grp_b4qhx3bvx72t8", "amount_in_cents": 10000, "remaining_amount_in_cents": 10000, "details": "test", "external": true, "memo": "test", "payment_type": "cash", "created_at": "2023-06-21T04:37:02-04:00" } } ] } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Issue Subscription Group Service Credit Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-invoice-account/issue-subscription-group-service-credit Issues service credit for a subscription group. Credit will be added to the group in the amount specified in the request body. The credit will be applied to group member invoices as they are generated. ```http POST /subscription_groups/{uid}/service_credits.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `body` | [`Issue Service Credit Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-service-credit-request) | Body, Optional | - | # Response Type **200**: OK [`Service Credit Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/service_credits.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "service_credit": { "amount": 10.0, "memo": "Credit the group account" } }' ``` # Example Response *(as JSON)* ```json { "service_credit": { "id": 101, "amount_in_cents": 1000, "ending_balance_in_cents": 2000, "entry_type": "Credit", "memo": "Credit to group account" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Deduct Subscription Group Service Credit Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-invoice-account/deduct-subscription-group-service-credit Deducts service credit for a subscription group. Credit will be deducted from the group in the amount specified in the request body. ```http POST /subscription_groups/{uid}/service_credit_deductions.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `body` | [`Deduct Service Credit Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/deduct-service-credit-request) | Body, Optional | - | # Response Type **201**: Created [`Service Credit`](https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/service_credit_deductions.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "deduction": { "amount": 10.0, "memo": "Deduct from group account" } }' ``` # Example Response *(as JSON)* ```json { "id": 100, "amount_in_cents": 1000, "ending_balance_in_cents": 0, "entry_type": "Debit", "memo": "Debit from group account" } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Subscription Group Status ##### Cancel Subscriptions in Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-status/cancel-subscriptions-in-group Cancels all subscriptions within the specified group immediately. The group is identified by the `uid` that is passed in the URL. To successfully cancel the group, the primary subscription must be on automatic billing. The group members must be on automatic billing or prepaid. To cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the request. ```http POST /subscription_groups/{uid}/cancel.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `body` | [`Cancel Grouped Subscriptions Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/cancel-grouped-subscriptions-request) | Body, Optional | - | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/cancel.json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "charge_unbilled_usage": true }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Initiate Delayed Cancellation for Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-status/initiate-delayed-cancellation-for-group Schedules all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by its uid passed in the URL. All subscriptions in the group must be on automatic billing in order to successfully cancel them, and the group must not be in a "past_due" state. ```http POST /subscription_groups/{uid}/delayed_cancel.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/delayed_cancel.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Cancel Delayed Cancellation for Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-status/cancel-delayed-cancellation-for-group Removes the delayed cancellation on a subscription group. Removing the delayed cancellation on a subscription group will ensure that the subscriptions do not get canceled at the end of the period. The request will reset the `cancel_at_end_of_period` flag to false on each member in the group. ```http DELETE /subscription_groups/{uid}/delayed_cancel.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/delayed_cancel.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Reactivate Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-group-status/reactivate-subscription-group Reactivates or resumes a cancelled subscription group. Upon reactivation, any canceled invoices created after the beginning of the primary subscription's billing period will be reopened and payment will be attempted on them. If the subscription group is being reactivated (as opposed to resumed), new charges will also be assessed for the new billing period. Whether a subscription group is reactivated (a new billing period is created) or resumed (the current billing period is respected) will depend on the parameters that are sent with the request as well as the date of the request relative to the primary subscription's period. ## Reactivating within the current period If a subscription group is cancelled and reactivated within the primary subscription's current period, we can choose to either start a new billing period or maintain the existing one. If we want to maintain the existing billing period, the `resume=true` option must be passed in request parameters. An exception to the above are subscriptions that are on calendar billing. These subscriptions cannot be reactivated within the current period. If the `resume=true` option is not passed, the request will return an error. The `resume_members` option is ignored in this case. All eligible group members will be automatically resumed. ## Reactivating beyond the current period In this case, a subscription group can only be reactivated with a new billing period. If the `resume=true` option is passed it will be ignored. Member subscriptions can have billing periods that are longer than the primary (e.g. a monthly primary with annual group members). If the primary subscription in a group cannot be reactivated within the current period, but other group members can be, passing `resume_members=true` will resume the existing billing period for eligible group members. The primary subscription will begin a new billing period. For calendar billing subscriptions, the new billing period created will be a partial one, spanning from the date of reactivation to the next corresponding calendar renewal date. ## 3D Secure (3DS) Authentication post-authentication flow When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```http POST /subscription_groups/{uid}/reactivate.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | | `body` | [`Reactivate Subscription Group Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivate-subscription-group-request) | Body, Optional | - | # Response Type **200**: OK [`Reactivate Subscription Group Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivate-subscription-group-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscription_groups/uid0/reactivate.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "resume": true }' ``` # Example Response *(as JSON)* ```json { "uid": "grp_93wgm89cbjkw6", "scheme": 1, "customer_id": 1, "payment_profile_id": 1, "subscription_ids": [ 1, 2 ], "primary_subscription_id": 1, "next_assessment_at": "2020-06-18T12:00:00-04:00", "state": "active", "cancel_at_end_of_period": false } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Subscription Invoice Account ##### Read Account Balances Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-invoice-account/read-account-balances Returns the `balance_in_cents` of the Subscription's Pending Discount, Service Credit, and Prepayment accounts, as well as the sum of the Subscription's open, payable invoices. ```http GET /subscriptions/{subscription_id}/account_balances.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **200**: OK [`Account Balances`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balances) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/subscriptions/222/account_balances.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` ##### Create Prepayment Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-invoice-account/create-prepayment Creates a prepayment for a subscription. In order to specify a prepayment made against a subscription, specify the `amount, memo, details, method`. When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions. Note that passing `amount_in_cents` is now allowed. ## 3D Secure (3DS) Authentication post-authentication flow When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```http POST /subscriptions/{subscription_id}/prepayments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Create Prepayment Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepayment-request) | Body, Optional | - | # Response Type **201**: Created [`Create Prepayment Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepayment-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/prepayments.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "prepayment": { "amount": 100.0, "details": "John Doe signup for $100", "memo": "Signup for $100", "method": "check" } }' ``` # Example Response *(as JSON)* ```json { "prepayment": { "id": 1, "subscription_id": 1, "amount_in_cents": 10000, "memo": "John Doe - Prepayment", "created_at": "2020-07-31T05:52:32-04:00", "starting_balance_in_cents": 0, "ending_balance_in_cents": -10000 } } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 422 | Unprocessable Entity (WebDAV) | ##### List Prepayments Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-invoice-account/list-prepayments Lists a subscription's prepayments. ```http GET /subscriptions/{subscription_id}/prepayments.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `filter` | [`List Prepayments Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-prepayments-filter) | Query, Optional | Filter to use for List Prepayments operations | # Response Type **200**: OK [`Prepayments Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayments-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/222/prepayments.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' \ -d 'filter[date_field]=created_at' \ -d 'filter[start_date]=2024-01-01' \ -d 'filter[end_date]=2024-01-31' ``` # Example Response *(as JSON)* ```json { "prepayments": [ { "id": 17, "subscription_id": 3558750, "amount_in_cents": 2000, "remaining_amount_in_cents": 1100, "refunded_amount_in_cents": 0, "external": true, "memo": "test", "details": "test details", "payment_type": "cash", "created_at": "2022-01-18T22:45:41+11:00" } ] } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Issue Service Credit Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-invoice-account/issue-service-credit Adds a service credit to the subscription in the specified amount. The credit is subsequently applied to the next generated invoice. ```http POST /subscriptions/{subscription_id}/service_credits.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Issue Service Credit Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-service-credit-request) | Body, Optional | - | # Response Type **201**: Created [`Service Credit`](https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/service_credits.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "service_credit": { "amount": "1" } }' ``` # Example Response *(as JSON)* ```json { "id": 101, "amount_in_cents": 1000, "ending_balance_in_cents": 2000, "entry_type": "Credit", "memo": "Credit to group account" } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 422 | Unprocessable Entity (WebDAV) | ##### Deduct Service Credit Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-invoice-account/deduct-service-credit Deducts a service credit from the subscription in the specified amount. The credit amount being deducted must be equal to or less than the current credit balance. ```http POST /subscriptions/{subscription_id}/service_credit_deductions.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Deduct Service Credit Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/deduct-service-credit-request) | Body, Optional | - | # Response Type **201**: OK `Void` # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/service_credit_deductions.json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "deduction": { "amount": "1", "memo": "Deduction" } }' ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 422 | Unprocessable Entity (WebDAV) | ##### List Service Credits Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-invoice-account/list-service-credits Lists a subscription's service credits. ```http GET /subscriptions/{subscription_id}/service_credits/list.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `direction` | [`Sorting Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | # Response Type **200**: OK [`List Service Credits Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-service-credits-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/222/service_credits/list.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json { "service_credits": [ { "id": 68, "amount_in_cents": 2200, "ending_balance_in_cents": 1100, "entry_type": "Debit", "memo": "Service credit memo", "invoice_uid": "inv_brntdvmmqxc3j", "remaining_balance_in_cents": 1100, "created_at": "2025-04-01T09:54:49-04:00" }, { "id": 67, "amount_in_cents": 3300, "ending_balance_in_cents": 3300, "entry_type": "Credit", "memo": "Service credit memo", "invoice_uid": null, "remaining_balance_in_cents": 1100, "created_at": "2025-03-05T16:06:08-05:00" } ] } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Refund Prepayment Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-invoice-account/refund-prepayment Refunds a prepayment applied to a subscription, either fully or partially. The `prepayment_id` will be the account transaction ID of the original payment. The prepayment must have some amount remaining in order to be refunded. The amount may be passed either as a decimal, with `amount`, or an integer in cents, with `amount_in_cents`. ```http POST /subscriptions/{subscription_id}/prepayments/{prepayment_id}/refunds.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `prepayment_id` | `Long` | Template, Required | id of prepayment | | `body` | [`Refund Prepayment Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-request) | Body, Optional | - | # Response Type **201**: Created [`Prepayment Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/prepayments/228/refunds.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 400 | Bad Request | [`Refund Prepayment Base Errors ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/refund-prepayment-base-errors-response) | | 404 | Not Found | | | 422 | Unprocessable Entity | | #### Subscription Notes ##### Create Subscription Note Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-notes/create-subscription-note Creates a note for a subscription. Notes allow you to record information about a particular Subscription in a free text format. If you have structured data such as birth date, color, etc., consider using [Metadata](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/custom-fields/create-metadata) instead. For more information, see [Adding Notes](https://docs.maxio.com/hc/en-us/articles/24251654953997-Understanding-the-Subscription-Summary-Page#billing-portal-status:~:text=documentation%20for%20more.-,Adding%20Notes,-Notes%20are%20optional) in the product documentation. ```http POST /subscriptions/{subscription_id}/notes.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Update Subscription Note Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-note-request) | Body, Optional | Updatable fields for Subscription Note | # Response Type **200**: OK [`Subscription Note Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-note-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/notes.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "note": { "body": "New test note.", "sticky": true } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Subscription Notes Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-notes/list-subscription-notes Retrieves a list of notes associated with a subscription. The response will be an array of Notes. ```http GET /subscriptions/{subscription_id}/notes.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-note-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/222/notes.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json [ { "note": { "body": "Test note.", "created_at": "2015-06-15T13:26:47-04:00", "id": 5, "sticky": false, "subscription_id": 100046, "updated_at": "2015-06-15T13:28:12-04:00" } }, { "note": { "body": "Another test note.", "created_at": "2015-06-15T12:04:46-04:00", "id": 4, "sticky": false, "subscription_id": 100046, "updated_at": "2015-06-15T13:26:33-04:00" } } ] ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Read Subscription Note Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-notes/read-subscription-note Retrieves a specific note attached to a subscription. ```http GET /subscriptions/{subscription_id}/notes/{note_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `note_id` | `Number` | Template, Required | The Advanced Billing id of the note | # Response Type **200**: OK [`Subscription Note Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-note-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/subscriptions/222/notes/66.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "note": { "body": "Test note.", "created_at": "2015-06-15T13:26:47-04:00", "id": 5, "sticky": false, "subscription_id": 100046, "updated_at": "2015-06-15T13:28:12-04:00" } } ``` ##### Update Subscription Note Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-notes/update-subscription-note Updates a note for a subscription. ```http PUT /subscriptions/{subscription_id}/notes/{note_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `note_id` | `Number` | Template, Required | The Advanced Billing id of the note | | `body` | [`Update Subscription Note Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-note-request) | Body, Optional | Updatable fields for Subscription Note | # Response Type **200**: OK [`Subscription Note Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-note-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/notes/66.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "note": { "body": "Modified test note.", "sticky": true } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Delete Subscription Note Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-notes/delete-subscription-note Deletes a note for a Subscription. ```http DELETE /subscriptions/{subscription_id}/notes/{note_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `note_id` | `Number` | Template, Required | The Advanced Billing id of the note | # Response Type **200**: OK `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscriptions/222/notes/66.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` #### Subscription Products ##### Migrate Subscription Product Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-products/migrate-subscription-product Migrates a subscription to a different product. To create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You can also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed, the subscription is moved to the product's default price point. The response is the updated subscription. ## Valid Subscriptions Subscriptions should be in the `active` or `trialing` state to be migrated. (For backwards compatibility reasons, it is possible to migrate a subscription that is in the `trial_ended` state via the API, however this is not recommended. Since `trial_ended` is an end-of-life state, the subscription should be canceled, the product changed, and then the subscription can be reactivated.) For more information, see [Product Changes and Migrations](https://docs.maxio.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations). ## Failed Migrations Important note: One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to its current product. ## 3D Secure (3DS) Authentication post-authentication flow When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```http POST /subscriptions/{subscription_id}/migrations.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Subscription Product Migration Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-product-migration-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/migrations.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "migration": { "product_id": 3801242, "include_trial": false, "include_initial_charge": false, "include_coupons": true, "preserve_period": true } }' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 15054201, "state": "trialing", "trial_started_at": "2016-11-03T13:43:36-04:00", "trial_ended_at": "2016-11-10T12:43:36-05:00", "activated_at": "2016-11-02T10:20:57-04:00", "created_at": "2016-11-02T10:20:55-04:00", "updated_at": "2016-11-03T13:43:36-04:00", "expires_at": null, "balance_in_cents": -13989, "current_period_ends_at": "2016-11-10T12:43:36-05:00", "next_assessment_at": "2016-11-10T12:43:36-05:00", "canceled_at": null, "cancellation_message": null, "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "automatic", "snap_day": null, "cancellation_method": null, "current_period_started_at": "2016-11-03T13:43:35-04:00", "previous_state": "active", "signup_payment_id": 160680121, "signup_revenue": "0.00", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": 14000, "product_price_in_cents": 1000, "product_version_number": 6, "payment_type": "credit_card", "referral_code": "ghnhvy", "coupon_use_count": null, "coupon_uses_allowed": null, "customer": { "id": 14543792, "first_name": "Frankie", "last_name": "Test", "organization": null, "email": "testfrankie111@test.com", "created_at": "2016-11-02T10:20:55-04:00", "updated_at": "2016-11-02T10:20:58-04:00", "reference": null, "address": null, "address_2": null, "city": null, "state": null, "zip": null, "country": null, "phone": "5555551212", "portal_invite_last_sent_at": "2016-11-02T10:20:58-04:00", "portal_invite_last_accepted_at": null, "verified": false, "portal_customer_created_at": "2016-11-02T10:20:58-04:00", "cc_emails": null }, "product": { "id": 3861800, "name": "Trial Product", "handle": "trial-product", "description": "Trial period with payment expected at end of trial.", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2016-07-08T09:53:55-04:00", "updated_at": "2016-09-05T13:00:36-04:00", "price_in_cents": 1000, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": 0, "trial_interval": 7, "trial_interval_unit": "day", "archived_at": null, "require_credit_card": true, "return_params": "", "taxable": false, "update_return_url": "", "initial_charge_after_trial": false, "version_number": 6, "update_return_params": "", "product_family": { "id": 527890, "name": "Acme Projects", "description": "", "handle": "billing-plans", "accounting_code": null }, "public_signup_pages": [ { "id": 294791, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/xv52yrcc3byx/trial-product" } ] }, "credit_card": { "id": 10088716, "first_name": "F", "last_name": "NB", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 1, "expiration_year": 2017, "customer_id": 14543792, "current_vault": "bogus", "vault_token": "1", "billing_address": "123 Montana Way", "billing_city": "Billings", "billing_state": "MT", "billing_zip": "59101", "billing_country": "US", "customer_vault_token": null, "billing_address_2": "Apt. 10", "payment_type": "credit_card" } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Preview Subscription Product Migration Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-products/preview-subscription-product-migration Previews the charges resulting from migrating a subscription to a different product. ## Previewing a future date It is also possible to preview the migration for a date in the future, as long as it's still within the subscription's current billing period, by passing a `proration_date` along with the request (e.g., `"proration_date": "2020-12-18T18:25:43.511Z"`). This will calculate the prorated adjustment, charge, payment and credit applied values assuming the migration is done at that date in the future as opposed to right now. ```http POST /subscriptions/{subscription_id}/migrations/preview.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Subscription Migration Preview Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Migration Preview Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/migrations/preview.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "migration": { "include_trial": false, "include_initial_charge": false, "include_coupons": true, "preserve_period": false } }' ``` # Example Response *(as JSON)* ```json { "migration": { "prorated_adjustment_in_cents": 0, "charge_in_cents": 5000, "payment_due_in_cents": 0, "credit_applied_in_cents": 0 } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Subscription Renewals ##### Create Scheduled Renewal Configuration Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/create-scheduled-renewal-configuration Creates a scheduled renewal configuration for a subscription. The scheduled renewal is based on the subscription’s current product and component setup. ```http POST /subscriptions/{subscription_id}/scheduled_renewals.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Scheduled Renewal Configuration Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-request) | Body, Optional | - | # Response Type **201**: Created [`Scheduled Renewal Configuration Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "renewal_configuration": { "starts_at": "2024-12-01T00:00:00Z", "ends_at": "2025-12-01T00:00:00Z", "lock_in_at": "2024-11-15T00:00:00Z", "contract_id": 222 } }' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configuration": { "id": 123, "site_id": 456, "subscription_id": 12345, "starts_at": "2024-12-01T00:00:00Z", "ends_at": "2025-12-01T00:00:00Z", "lock_in_at": "2024-11-15T00:00:00Z", "created_at": "2024-09-01T12:00:00Z", "status": "scheduled", "scheduled_renewal_configuration_items": [ { "id": 789, "subscription_id": 12345, "subscription_renewal_configuration_id": 123, "item_id": 4, "item_type": "Product", "item_subclass": "Product", "price_point_id": 7, "price_point_type": "ProductPricePoint", "quantity": 1, "decimal_quantity": "1.0", "created_at": "2024-09-01T12:00:00Z" } ], "contract": { "id": 107, "maxio_id": "maxio-id", "number": null, "register": { "id": 12, "maxio_id": "maxio_id-id", "name": "Register", "currency_code": "USD" } } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Scheduled Renewal Configurations Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/list-scheduled-renewal-configurations Lists scheduled renewal configurations for the subscription and permits an optional status query filter. ```http GET /subscriptions/{subscription_id}/scheduled_renewals.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `status` | [`Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/status) | Query, Optional | (Optional) Status filter for scheduled renewal configurations. | # Response Type **200**: OK [`Scheduled Renewal Configurations Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configurations-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configurations": [ { "id": 123, "site_id": 456, "subscription_id": 12345, "starts_at": "2024-12-01T00:00:00Z", "ends_at": "2025-12-01T00:00:00Z", "lock_in_at": "2024-11-15T00:00:00Z", "created_at": "2024-09-01T12:00:00Z", "status": "scheduled", "scheduled_renewal_configuration_items": [ { "id": 789, "subscription_id": 12345, "subscription_renewal_configuration_id": 123, "item_id": 4, "item_type": "Product", "item_subclass": "Product", "price_point_id": 7, "price_point_type": "ProductPricePoint", "quantity": 1, "decimal_quantity": "1.0", "created_at": "2024-09-01T12:00:00Z" } ], "contract": { "id": 107, "maxio_id": "maxio-id", "number": null, "register": { "id": 12, "maxio_id": "maxio-id", "name": "Register", "currency_code": "USD" } } } ] } ``` ##### Read Scheduled Renewal Configuration Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/read-scheduled-renewal-configuration Retrieves the configuration settings for the scheduled renewal. ```http GET /subscriptions/{subscription_id}/scheduled_renewals/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `id` | `Number` | Template, Required | The renewal id. | # Response Type **200**: OK [`Scheduled Renewal Configuration Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-response) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals/112.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configuration": { "id": 123, "site_id": 456, "subscription_id": 12345, "starts_at": "2024-12-01T00:00:00Z", "ends_at": "2025-12-01T00:00:00Z", "lock_in_at": "2024-11-15T00:00:00Z", "created_at": "2024-09-01T12:00:00Z", "status": "scheduled", "scheduled_renewal_configuration_items": [ { "id": 789, "subscription_id": 12345, "subscription_renewal_configuration_id": 123, "item_id": 4, "item_type": "Product", "item_subclass": "Product", "price_point_id": 7, "price_point_type": "ProductPricePoint", "quantity": 1, "decimal_quantity": "1.0", "created_at": "2024-09-01T12:00:00Z" } ], "contract": { "id": 107, "maxio_id": "maxio-id", "number": null, "register": { "id": 12, "maxio_id": "maxio-id", "name": "Register", "currency_code": "USD" } } } } ``` ##### Update Scheduled Renewal Configuration Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/update-scheduled-renewal-configuration Updates an existing configuration. ```http PUT /subscriptions/{subscription_id}/scheduled_renewals/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `id` | `Number` | Template, Required | The renewal id. | | `body` | [`Scheduled Renewal Configuration Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-request) | Body, Optional | - | # Response Type **200**: OK [`Scheduled Renewal Configuration Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals/112.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "renewal_configuration": { "starts_at": "2025-12-01T00:00:00Z", "ends_at": "2026-12-01T00:00:00Z", "lock_in_at": "2025-11-15T00:00:00Z" } }' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configuration": { "id": 123, "site_id": 456, "subscription_id": 12345, "starts_at": "2025-12-01T00:00:00Z", "ends_at": "2026-12-01T00:00:00Z", "lock_in_at": "2025-11-15T00:00:00Z", "created_at": "2025-09-01T12:00:00Z", "status": "scheduled", "scheduled_renewal_configuration_items": [ { "id": 789, "subscription_id": 12345, "subscription_renewal_configuration_id": 123, "item_id": 4, "item_type": "Product", "item_subclass": "Product", "price_point_id": 7, "price_point_type": "ProductPricePoint", "quantity": 1, "decimal_quantity": "1.0", "created_at": "2025-09-01T12:00:00Z" } ], "contract": { "id": 107, "maxio_id": "maxio-id", "number": null, "register": { "id": 12, "maxio_id": "maxio-id", "name": "Register", "currency_code": "USD" } } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Schedule Scheduled Renewal Lock In Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/schedule-scheduled-renewal-lock-in Schedules a future lock-in date for the renewal. ```http PUT /subscriptions/{subscription_id}/scheduled_renewals/{id}/schedule_lock_in.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `id` | `Number` | Template, Required | The renewal id. | | `body` | [`Scheduled Renewal Lock in Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-lock-in-request) | Body, Optional | - | # Response Type **200**: OK [`Scheduled Renewal Configuration Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals/112/schedule_lock_in.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "lock_in_at": "2025-11-15" }' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configuration": { "id": 123, "site_id": 456, "subscription_id": 12345, "starts_at": "2025-12-01T00:00:00Z", "ends_at": "2026-12-01T00:00:00Z", "lock_in_at": "2025-11-15T00:00:00Z", "created_at": "2025-09-01T12:00:00Z", "status": "scheduled", "scheduled_renewal_configuration_items": [ { "id": 789, "subscription_id": 12345, "subscription_renewal_configuration_id": 123, "item_id": 4, "item_type": "Product", "item_subclass": "Product", "price_point_id": 7, "price_point_type": "ProductPricePoint", "quantity": 1, "decimal_quantity": "1.0", "created_at": "2025-09-01T12:00:00Z" } ], "contract": { "id": 107, "maxio_id": "maxio-id", "number": null, "register": { "id": 12, "maxio_id": "maxio-id", "name": "Register", "currency_code": "USD" } } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Lock in Scheduled Renewal Immediately Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/lock-in-scheduled-renewal-immediately Locks in the renewal immediately. ```http PUT /subscriptions/{subscription_id}/scheduled_renewals/{id}/immediate_lock_in.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `id` | `Number` | Template, Required | The renewal id. | # Response Type **200**: OK [`Scheduled Renewal Configuration Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals/112/immediate_lock_in.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configuration": { "id": 987, "site_id": 321, "subscription_id": 12345, "starts_at": "2025-12-01T00:00:00Z", "ends_at": "2026-12-01T00:00:00Z", "lock_in_at": "2025-11-15T00:00:00Z", "created_at": "2025-09-01T12:00:00Z", "status": "scheduled", "scheduled_renewal_configuration_items": [ { "id": 555, "subscription_id": 12345, "subscription_renewal_configuration_id": 987, "item_id": 42, "item_type": "Product", "price_point_id": 73, "price_point_type": "ProductPricePoint", "quantity": 1, "decimal_quantity": "1.0", "created_at": "2025-09-01T12:00:00Z" } ], "contract": { "id": 222, "maxio_id": "maxio-id", "number": null, "register": { "id": 12, "maxio_id": "maxio-id", "name": "Register", "currency_code": "USD" } } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Unpublish Scheduled Renewal Configuration Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/unpublish-scheduled-renewal-configuration Restores a scheduled renewal configuration to an editable state. ```http PUT /subscriptions/{subscription_id}/scheduled_renewals/{id}/unpublish.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `id` | `Number` | Template, Required | The renewal id. | # Response Type **200**: OK [`Scheduled Renewal Configuration Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals/112/unpublish.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configuration": { "id": 987, "site_id": 321, "subscription_id": 12345, "starts_at": "2025-12-01T00:00:00Z", "ends_at": "2026-12-01T00:00:00Z", "lock_in_at": "2025-11-15T00:00:00Z", "created_at": "2025-09-01T12:00:00Z", "status": "draft", "scheduled_renewal_configuration_items": [ { "id": 555, "subscription_id": 12345, "subscription_renewal_configuration_id": 987, "item_id": 42, "item_type": "Product", "price_point_id": 73, "price_point_type": "ProductPricePoint", "quantity": 1, "decimal_quantity": "1.0", "created_at": "2025-09-01T12:00:00Z" } ], "contract": { "id": 222 } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Cancel Scheduled Renewal Configuration Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/cancel-scheduled-renewal-configuration Cancels a scheduled renewal configuration. ```http PUT /subscriptions/{subscription_id}/scheduled_renewals/{id}/cancel.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `id` | `Number` | Template, Required | The renewal id. | # Response Type **200**: OK [`Scheduled Renewal Configuration Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals/112/cancel.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configuration": { "id": 987, "site_id": 321, "subscription_id": 12345, "starts_at": "2025-12-01T00:00:00Z", "ends_at": "2026-12-01T00:00:00Z", "lock_in_at": "2025-11-15T00:00:00Z", "created_at": "2025-09-01T12:00:00Z", "status": "canceled", "scheduled_renewal_configuration_items": [ { "id": 555, "subscription_id": 12345, "subscription_renewal_configuration_id": 987, "item_id": 42, "item_type": "Product", "price_point_id": 73, "price_point_type": "ProductPricePoint", "quantity": 1, "decimal_quantity": "1.0", "created_at": "2025-09-01T12:00:00Z" } ], "contract": { "id": 222 } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Create Scheduled Renewal Configuration Item Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/create-scheduled-renewal-configuration-item Adds product and component line items to the scheduled renewal. If your site has list vs sales pricing enabled, accepts renewal_configuration_item.custom_price.list_price_point_id, validates and persists it; omitted value follows existing/default behavior; with list vs sales pricing disabled, parameter is ignored (no validation/behavioral impact). This functionality is supported in the API, but is not currently supported in SDKs. ```http POST /subscriptions/{subscription_id}/scheduled_renewals/{scheduled_renewals_configuration_id}/configuration_items.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `scheduled_renewals_configuration_id` | `Number` | Template, Required | The scheduled renewal configuration id. | | `body` | [`Scheduled Renewal Configuration Item Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item-request) | Body, Optional | - | # Response Type **201**: Created [`Scheduled Renewal Configuration Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals/250/configuration_items.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "renewal_configuration_item": { "item_type": "Component", "item_id": 57, "quantity": 1, "custom_price": { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 1, "ending_quantity": null, "unit_price": 5.0 } ] } } }' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configuration_item": { "id": 555, "subscription_id": 12345, "subscription_renewal_configuration_id": 987, "item_id": 42, "item_type": "Product", "item_subclass": "SubscriptionProduct", "price_point_id": 73, "price_point_type": "ProductPricePoint", "quantity": 1, "decimal_quantity": "1.0", "created_at": "2025-09-01T12:00:00Z" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Update Scheduled Renewal Configuration Item Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/update-scheduled-renewal-configuration-item Updates an existing configuration item’s pricing and quantity. If you site has list vs sales pricing enabled, accepts renewal_configuration_item.custom_price.list_price_point_id, validates and persists it; omitted value follows existing/default behavior; with list vs sales pricing disabled, parameter is ignored (no validation/behavioral impact). This functionality is supported in the API, but is not currently supported in SDKs. ```http PUT /subscriptions/{subscription_id}/scheduled_renewals/{scheduled_renewals_configuration_id}/configuration_items/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `scheduled_renewals_configuration_id` | `Number` | Template, Required | The scheduled renewal configuration id. | | `id` | `Number` | Template, Required | The scheduled renewal configuration item id. | | `body` | [`Scheduled Renewal Update Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-update-request) | Body, Optional | - | # Response Type **200**: OK [`Scheduled Renewal Configuration Item Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals/250/configuration_items/112.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "renewal_configuration_item": { "item_type": "Component", "item_id": 57, "quantity": 2, "custom_price": { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 1, "ending_quantity": null, "unit_price": 5.0 } ] } } }' ``` # Example Response *(as JSON)* ```json { "scheduled_renewal_configuration_item": { "id": 555, "subscription_id": 12345, "subscription_renewal_configuration_id": 987, "item_id": 42, "item_type": "Component", "item_subclass": "SubscriptionComponent", "price_point_id": 73, "price_point_type": "ComponentPricePoint", "quantity": 3, "decimal_quantity": "3.0", "created_at": "2025-09-01T12:00:00Z" } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Delete Scheduled Renewal Configuration Item Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-renewals/delete-scheduled-renewal-configuration-item Removes an item from the pending renewal configuration. ```http DELETE /subscriptions/{subscription_id}/scheduled_renewals/{scheduled_renewals_configuration_id}/configuration_items/{id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `scheduled_renewals_configuration_id` | `Number` | Template, Required | The scheduled renewal configuration id. | | `id` | `Number` | Template, Required | The scheduled renewal configuration item id. | # Response Type **204**: No Content `Void` # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscriptions/222/scheduled_renewals/250/configuration_items/112.json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Subscription Status ##### Retry Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/retry-subscription Retries collecting the balance due on a past-due subscription without waiting for the next scheduled attempt. ## 3D Secure (3DS) Authentication post-authentication flow When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```http PUT /subscriptions/{subscription_id}/retry.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/retry.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 46330, "state": "active", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2018-10-22T13:10:46-06:00", "created_at": "2018-10-22T13:10:46-06:00", "updated_at": "2021-06-10T09:23:43-06:00", "expires_at": null, "balance_in_cents": 18600, "current_period_ends_at": "2021-06-22T13:10:46-06:00", "next_assessment_at": "2021-06-22T13:10:46-06:00", "canceled_at": null, "cancellation_message": null, "next_product_id": null, "cancel_at_end_of_period": null, "payment_collection_method": "automatic", "snap_day": null, "cancellation_method": null, "product_price_point_id": 3464, "next_product_price_point_id": null, "receives_invoice_emails": null, "net_terms": null, "locale": null, "currency": "USD", "reference": null, "scheduled_cancellation_at": null, "current_period_started_at": "2021-05-22T13:10:46-06:00", "previous_state": "past_due", "signup_payment_id": 651268, "signup_revenue": "6.00", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": 600, "product_price_in_cents": 600, "product_version_number": 501, "payment_type": null, "referral_code": "rzqvrx", "coupon_use_count": null, "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": null, "offer_id": null, "credit_balance_in_cents": 0, "prepayment_balance_in_cents": 0, "payer_id": 142365, "stored_credential_transaction_id": null, "next_product_handle": null, "on_hold_at": null, "prepaid_dunning": false, "customer": { "id": 142365, "first_name": "Lavern", "last_name": "Fahey", "organization": null, "email": "millie2@example.com", "created_at": "2018-10-22T13:10:46-06:00", "updated_at": "2018-10-22T13:10:46-06:00", "reference": null, "address": null, "address_2": null, "city": null, "state": null, "zip": null, "country": null, "phone": null, "portal_invite_last_sent_at": null, "portal_invite_last_accepted_at": null, "verified": false, "portal_customer_created_at": "2018-10-22T13:10:46-06:00", "vat_number": null, "cc_emails": "john@example.com, sue@example.com", "tax_exempt": false, "parent_id": null, "locale": null }, "product": { "id": 8080, "name": "Pro Versions", "handle": null, "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "month", "created_at": "2019-02-15T10:15:00-07:00", "updated_at": "2019-02-15T10:30:34-07:00", "price_in_cents": 600, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": true, "return_params": "", "require_shipping_address": false, "request_billing_address": false, "require_billing_address": false, "taxable": false, "update_return_url": "", "tax_code": "", "initial_charge_after_trial": false, "default_product_price_point_id": 3464, "version_number": 501, "update_return_params": "", "product_price_point_id": 3464, "product_price_point_name": "Default", "product_price_point_handle": "uuid:5305c3f0-1375-0137-5619-065dfbfdc636", "product_family": { "id": 37, "name": "Acme Projects", "description": null, "handle": "acme-projects", "accounting_code": null, "created_at": "2013-02-20T15:05:51-07:00", "updated_at": "2013-02-20T15:05:51-07:00" }, "public_signup_pages": [ { "id": 1540, "return_url": null, "return_params": "", "url": "https://acme-test.staging-chargifypay.com/subscribe/2f6y53rrqgsf" } ] } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Cancel Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/cancel-subscription Cancels the Subscription. The Delete method sets the Subscription state to `canceled`. To cancel the subscription immediately, omit any schedule parameters from the request. To use the schedule options, the Schedule Subscription Cancellation feature must be enabled on your site. ```http DELETE /subscriptions/{subscription_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Cancellation Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/cancellation-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscriptions/222.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 15254809, "state": "canceled", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2016-11-15T15:33:44-05:00", "created_at": "2016-11-15T15:33:44-05:00", "updated_at": "2016-11-15T17:13:06-05:00", "expires_at": null, "balance_in_cents": 0, "current_period_ends_at": "2017-08-29T12:00:00-04:00", "next_assessment_at": "2017-08-29T12:00:00-04:00", "canceled_at": "2016-11-15T17:13:06-05:00", "cancellation_message": "Canceling the subscription via the API", "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "automatic", "snap_day": null, "cancellation_method": "merchant_api", "current_period_started_at": "2016-11-15T15:33:44-05:00", "previous_state": "active", "signup_payment_id": 0, "signup_revenue": "0.00", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": 0, "product_price_in_cents": 1000, "product_version_number": 7, "payment_type": "credit_card", "referral_code": "tg8qbq", "coupon_use_count": null, "coupon_uses_allowed": null, "customer": { "id": 14731081, "first_name": "John", "last_name": "Doe", "organization": "Acme Widgets", "email": "john.doe@example.com", "created_at": "2016-11-15T15:33:44-05:00", "updated_at": "2016-11-15T15:33:45-05:00", "reference": "123", "address": null, "address_2": null, "city": null, "state": null, "zip": null, "country": null, "phone": null, "portal_invite_last_sent_at": "2016-11-15T15:33:45-05:00", "portal_invite_last_accepted_at": null, "verified": false, "portal_customer_created_at": "2016-11-15T15:33:45-05:00", "cc_emails": null }, "product": { "id": 3792003, "name": "$10 Basic Plan", "handle": "basic", "description": "lorem ipsum", "accounting_code": "basic", "request_credit_card": false, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2016-03-24T13:38:39-04:00", "updated_at": "2016-11-03T13:03:05-04:00", "price_in_cents": 1000, "interval": 1, "interval_unit": "day", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": false, "return_params": "", "taxable": false, "update_return_url": "", "initial_charge_after_trial": false, "version_number": 7, "update_return_params": "", "product_family": { "id": 527890, "name": "Acme Projects", "description": "", "handle": "billing-plans", "accounting_code": null }, "public_signup_pages": [ { "id": 281054, "return_url": "http://www.example.com?successfulsignup", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic" }, { "id": 281240, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic" }, { "id": 282694, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic" } ] }, "credit_card": { "id": 10202898, "first_name": "John", "last_name": "Doe", "masked_card_number": "XXXX-XXXX-XXXX-1111", "card_type": "visa", "expiration_month": 12, "expiration_year": 2020, "customer_id": 14731081, "current_vault": "authorizenet", "vault_token": "12345", "billing_address": null, "billing_city": null, "billing_state": null, "billing_zip": null, "billing_country": null, "customer_vault_token": "67890", "billing_address_2": null, "payment_type": "credit_card" } } } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | | 422 | Unprocessable Entity (WebDAV) | ##### Resume Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/resume-subscription Resumes a paused (on-hold) subscription. If the normal next renewal date has not passed, the subscription will return to active and will renew on that date. Otherwise, it will behave like a reactivation, setting the billing date to 'now' and charging the subscriber. ```http POST /subscriptions/{subscription_id}/resume.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `calendar_billing['resumption_charge']` | [`Resumption Charge`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resumption-charge) | Query, Optional | (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled.

**Default**: `prorated` | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X POST -G \ --url 'https://subdomain.chargify.com/subscriptions/222/resume.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 18220670, "state": "active", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2017-06-27T13:45:15-05:00", "created_at": "2017-06-27T13:45:13-05:00", "updated_at": "2017-06-30T09:26:50-05:00", "expires_at": null, "balance_in_cents": 10000, "current_period_ends_at": "2017-06-30T12:00:00-05:00", "next_assessment_at": "2017-06-30T12:00:00-05:00", "canceled_at": null, "cancellation_message": null, "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "automatic", "snap_day": "end", "cancellation_method": null, "current_period_started_at": "2017-06-27T13:45:13-05:00", "previous_state": "active", "signup_payment_id": 191819284, "signup_revenue": "0.00", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": 0, "product_price_in_cents": 0, "product_version_number": 1, "payment_type": null, "referral_code": "d3pw7f", "coupon_use_count": null, "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": null, "current_billing_amount_in_cents": 10000, "customer": { "id": 17780587, "first_name": "Catie", "last_name": "Test", "organization": "Acme, Inc.", "email": "catie@example.com", "created_at": "2017-06-27T13:01:05-05:00", "updated_at": "2017-06-30T09:23:10-05:00", "reference": "123ABC", "address": "123 Anywhere Street", "address_2": "Apartment #10", "city": "Los Angeles", "state": "CA", "zip": "90210", "country": "US", "phone": "555-555-5555", "portal_invite_last_sent_at": "2017-06-27T13:45:16-05:00", "portal_invite_last_accepted_at": null, "verified": true, "portal_customer_created_at": "2017-06-27T13:01:08-05:00", "cc_emails": "support@example.com", "tax_exempt": true }, "product": { "id": 4470347, "name": "Zero Dollar Product", "handle": "zero-dollar-product", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2017-03-23T10:54:12-05:00", "updated_at": "2017-04-20T15:18:46-05:00", "price_in_cents": 0, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": false, "return_params": "", "taxable": false, "update_return_url": "", "tax_code": "", "initial_charge_after_trial": false, "version_number": 1, "update_return_params": "", "product_family": { "id": 997233, "name": "Acme Products", "description": "", "handle": "acme-products", "accounting_code": null }, "public_signup_pages": [ { "id": 316810, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product" } ] } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Pause Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/pause-subscription Places the subscription on hold, preventing it from renewing. ## Limitations You may not place a subscription on hold if the `next_billing_at` date is within 24 hours. ```http POST /subscriptions/{subscription_id}/hold.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Pause Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/pause-request) | Body, Optional | Allows you to pause a Subscription. | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/hold.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "hold": { "automatically_resume_at": "2017-05-25T11:25:00Z" } }' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 18220670, "state": "on_hold", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2017-06-27T13:45:15-05:00", "created_at": "2017-06-27T13:45:13-05:00", "updated_at": "2017-06-30T09:26:50-05:00", "expires_at": null, "balance_in_cents": 10000, "current_period_ends_at": "2017-06-30T12:00:00-05:00", "next_assessment_at": "2017-06-30T12:00:00-05:00", "canceled_at": null, "cancellation_message": null, "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "automatic", "snap_day": "end", "cancellation_method": null, "current_period_started_at": "2017-06-27T13:45:13-05:00", "previous_state": "active", "signup_payment_id": 191819284, "signup_revenue": "0.00", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": 0, "product_price_in_cents": 0, "product_version_number": 1, "payment_type": null, "referral_code": "d3pw7f", "coupon_use_count": null, "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": null, "current_billing_amount_in_cents": 10000, "customer": { "id": 17780587, "first_name": "Catie", "last_name": "Test", "organization": "Acme, Inc.", "email": "catie@example.com", "created_at": "2017-06-27T13:01:05-05:00", "updated_at": "2017-06-30T09:23:10-05:00", "reference": "123ABC", "address": "123 Anywhere Street", "address_2": "Apartment #10", "city": "Los Angeles", "state": "CA", "zip": "90210", "country": "US", "phone": "555-555-5555", "portal_invite_last_sent_at": "2017-06-27T13:45:16-05:00", "portal_invite_last_accepted_at": null, "verified": true, "portal_customer_created_at": "2017-06-27T13:01:08-05:00", "cc_emails": "support@example.com", "tax_exempt": true }, "product": { "id": 4470347, "name": "Zero Dollar Product", "handle": "zero-dollar-product", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2017-03-23T10:54:12-05:00", "updated_at": "2017-04-20T15:18:46-05:00", "price_in_cents": 0, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": false, "return_params": "", "taxable": false, "update_return_url": "", "tax_code": "", "initial_charge_after_trial": false, "version_number": 1, "update_return_params": "", "product_family": { "id": 997233, "name": "Acme Products", "description": "", "handle": "acme-products", "accounting_code": null }, "public_signup_pages": [ { "id": 316810, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product" } ] } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Update Automatic Subscription Resumption Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/update-automatic-subscription-resumption Updates the date on which a paused subscription will automatically resume. To update a subscription's resume date, use this method to change or update the `automatically_resume_at` date. ### Remove the resume date Alternatively, you can change the `automatically_resume_at` to `null` if you would like the subscription to not have a resume date. ```http PUT /subscriptions/{subscription_id}/hold.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Pause Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/pause-request) | Body, Optional | Allows you to pause a Subscription. | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/hold.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "hold": { "automatically_resume_at": "2019-01-20T00:00:00" } }' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 20359140, "state": "on_hold", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2018-01-05T17:15:50-06:00", "created_at": "2018-01-05T17:15:49-06:00", "updated_at": "2018-01-09T10:26:14-06:00", "expires_at": null, "balance_in_cents": 0, "current_period_ends_at": "2023-01-05T17:15:00-06:00", "next_assessment_at": "2023-01-05T17:15:00-06:00", "canceled_at": null, "cancellation_message": null, "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "automatic", "snap_day": null, "cancellation_method": null, "current_period_started_at": "2018-01-05T17:15:49-06:00", "previous_state": "active", "signup_payment_id": 219829722, "signup_revenue": "100.00", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": 10009991, "product_price_in_cents": 10000, "product_version_number": 1, "payment_type": "credit_card", "referral_code": "8y7jqr", "coupon_use_count": null, "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": "2019-01-20T00:00:00-06:00", "customer": { "id": 19948683, "first_name": "Vanessa", "last_name": "Test", "organization": "", "email": "vanessa@example.com", "created_at": "2018-01-05T17:15:49-06:00", "updated_at": "2018-01-05T17:15:51-06:00", "reference": null, "address": "123 Anywhere Ln", "address_2": "", "city": "Boston", "state": "MA", "zip": "02120", "country": "US", "phone": "555-555-1212", "portal_invite_last_sent_at": "2018-01-05T17:15:51-06:00", "portal_invite_last_accepted_at": null, "verified": null, "portal_customer_created_at": "2018-01-05T17:15:51-06:00", "cc_emails": null, "tax_exempt": false }, "product": { "id": 4535643, "name": "Annual Product", "handle": "annual-product", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2017-08-25T10:25:31-05:00", "updated_at": "2017-08-25T10:25:31-05:00", "price_in_cents": 10000, "interval": 12, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": true, "return_params": "", "taxable": false, "update_return_url": "", "tax_code": "", "initial_charge_after_trial": false, "version_number": 1, "update_return_params": "", "product_family": { "id": 1025627, "name": "Acme Products", "description": "", "handle": "acme-products", "accounting_code": null } }, "credit_card": { "id": 13826563, "first_name": "Bomb 3", "last_name": "Test", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 1, "expiration_year": 2028, "customer_id": 19948683, "current_vault": "bogus", "vault_token": "1", "billing_address": "123 Anywhere Lane", "billing_city": "Boston", "billing_state": "Ma", "billing_zip": "02120", "billing_country": "US", "customer_vault_token": null, "billing_address_2": "", "payment_type": "credit_card" } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Reactivate Subscription Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/reactivate-subscription Reactivates a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming). **Note: The term "resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.** + The response returns the subscription object in the `active` or `trialing` state. + The `canceled_at` and `cancellation_message` fields do not have values. + The method works for "Canceled" or "Trial Ended" subscriptions. + It will not work for items not marked as "Canceled", "Unpaid", or "Trial Ended". ## Resume the current billing period for a subscription A subscription is considered "resumable" if you are attempting to reactivate within the billing period the subscription was canceled in. A resumed subscription's billing date remains the same as before it was canceled. In other words, it does not start a new billing period. Payment may or may not be collected for a resumed subscription, depending on whether or not the subscription had a balance when it was canceled (for example, if it was canceled because of dunning). Consider a subscription which was created on June 1st, and would renew on July 1st. The subscription is then canceled on June 15. If a reactivation with `resume: true` were attempted _before_ what would have been the next billing date of July 1st, then Advanced Billing would resume the subscription. If a reactivation with `resume: true` were attempted _after_ what would have been the next billing date of July 1st, then Advanced Billing would not resume the subscription, and instead it would be reactivated with a new billing period. If a reactivation with `resume: false`, or where 'resume' is omitted were attempted, then Advanced Billing would reactivate the subscription with a new billing period regardless of whether or not resuming the previous billing period was possible. | Canceled | Reactivation | Resumable? | |---|---|---| | Jun 15 | June 28 | Yes | | Jun 15 | July 2 | No | ## Reactivation Scenarios ### Reactivating Canceled Subscription While Preserving Balance + Given you have a product that costs $20 + Given you have a canceled subscription to the $20 product + 1 charge should exist for $20 + 1 payment should exist for $20 + When the subscription has canceled due to dunning, it retained a negative balance of $20 #### Results The resulting charges upon reactivation will be: + 1 charge for $20 for the new product + 1 charge for $20 for the balance due + Total charges = $40 + The subscription will transition to active + The subscription balance will be zero ### Reactivating a Canceled Subscription With Coupon + Given you have a canceled subscription + It has no current period defined + You have a coupon code "EARLYBIRD" + The coupon is set to recur for 6 periods PUT request sent to: `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?coupon_code=EARLYBIRD` #### Results + The subscription will transition to active + The subscription should have applied a coupon with code "EARLYBIRD" ### Reactivating Canceled Subscription With a Trial, Without the include_trial Flag + Given you have a canceled subscription + The product associated with the subscription has a trial + PUT request to `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json` #### Results + The subscription will transition to active ### Reactivating Canceled Subscription With Trial, With the include_trial Flag + Given you have a canceled subscription + The product associated with the subscription has a trial + Send a PUT request to `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?include_trial=1` #### Results + The subscription will transition to trialing ### Reactivating Trial Ended Subscription + Given you have a trial_ended subscription + Send a PUT request to `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json` #### Results + The subscription will transition to active ### Resuming a Canceled Subscription + Given you have a `canceled` subscription and it is resumable + Send a PUT request to `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true` #### Results + The subscription will transition to active + The next billing date should not have changed ### Attempting to resume a subscription which is not resumable + Given you have a `canceled` subscription, and it is not resumable + Send a PUT request to `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true` #### Results + The subscription will transition to active, with a new billing period. ### Attempting to resume but not reactivate a subscription which is not resumable + Given you have a `canceled` subscription, and it is not resumable + Send a PUT request to `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume[require_resume]=true` + The response status should be "422 UNPROCESSABLE ENTITY" + The subscription should be canceled with the following response ``` { "errors": ["Request was 'resume only', but this subscription cannot be resumed."] } ``` #### Results + The subscription should remain `canceled` + The next billing date should not have changed ### Resuming Subscription Which Was Trialing + Given you have a `trial_ended` subscription, and it is resumable + And the subscription was canceled in the middle of a trial + And there is still time left on the trial + Send a PUT request to `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true` #### Results + The subscription will transition to trialing + The next billing date should not have changed ### Resuming Subscription Which Was trial_ended + Given you have a `trial_ended` subscription, and it is resumable + Send a PUT request to `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true` #### Results + The subscription will transition to active + The next billing date should not have changed + Any product-related charges should have been collected ## 3D Secure (3DS) Authentication post-authentication flow When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication. See the [3D Secure Post-Authentication Flow](https://docs.maxio.com/hc/en-us/articles/44277749524365-3D-Secure-Post-Authentication-Flow) article in the product documentation to learn how to manage the redirect flow. ```http PUT /subscriptions/{subscription_id}/reactivate.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Reactivate Subscription Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivate-subscription-request) | Body, Optional | - | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/subscriptions/222/reactivate.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "calendar_billing": { "reactivation_charge": "prorated" }, "include_trial": true, "preserve_balance": true, "coupon_code": "10OFF", "use_credits_and_prepayments": true, "resume": true }' ``` # Example Response *(as JSON)* ```json { "subscription": { "id": 18220670, "state": "active", "trial_started_at": null, "trial_ended_at": null, "activated_at": "2017-06-27T13:45:15-05:00", "created_at": "2017-06-27T13:45:13-05:00", "updated_at": "2017-06-30T09:26:50-05:00", "expires_at": null, "balance_in_cents": 10000, "current_period_ends_at": "2017-06-30T12:00:00-05:00", "next_assessment_at": "2017-06-30T12:00:00-05:00", "canceled_at": null, "cancellation_message": null, "next_product_id": null, "cancel_at_end_of_period": false, "payment_collection_method": "automatic", "snap_day": "end", "cancellation_method": null, "current_period_started_at": "2017-06-27T13:45:13-05:00", "previous_state": "active", "signup_payment_id": 191819284, "signup_revenue": "0.00", "delayed_cancel_at": null, "coupon_code": null, "total_revenue_in_cents": 0, "product_price_in_cents": 0, "product_version_number": 1, "payment_type": null, "referral_code": "d3pw7f", "coupon_use_count": null, "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": null, "current_billing_amount_in_cents": 10000, "customer": { "id": 17780587, "first_name": "Catie", "last_name": "Test", "organization": "Acme, Inc.", "email": "catie@example.com", "created_at": "2017-06-27T13:01:05-05:00", "updated_at": "2017-06-30T09:23:10-05:00", "reference": "123ABC", "address": "123 Anywhere Street", "address_2": "Apartment #10", "city": "Los Angeles", "state": "CA", "zip": "90210", "country": "US", "phone": "555-555-5555", "portal_invite_last_sent_at": "2017-06-27T13:45:16-05:00", "portal_invite_last_accepted_at": null, "verified": true, "portal_customer_created_at": "2017-06-27T13:01:08-05:00", "cc_emails": "support@example.com", "tax_exempt": true, "vat_number": "012345678" }, "product": { "id": 4470347, "name": "Zero Dollar Product", "handle": "zero-dollar-product", "description": "", "accounting_code": "", "request_credit_card": true, "expiration_interval": null, "expiration_interval_unit": "never", "created_at": "2017-03-23T10:54:12-05:00", "updated_at": "2017-04-20T15:18:46-05:00", "price_in_cents": 0, "interval": 1, "interval_unit": "month", "initial_charge_in_cents": null, "trial_price_in_cents": null, "trial_interval": null, "trial_interval_unit": "month", "archived_at": null, "require_credit_card": false, "return_params": "", "taxable": false, "update_return_url": "", "tax_code": "", "initial_charge_after_trial": false, "version_number": 1, "update_return_params": "", "product_family": { "id": 997233, "name": "Acme Products", "description": "", "handle": "acme-products", "accounting_code": null }, "public_signup_pages": [ { "id": 316810, "return_url": "", "return_params": "", "url": "https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product" } ] } } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Initiate Delayed Cancellation Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/initiate-delayed-cancellation Cancels a subscription at the end of the current billing period based on the subscription's current product. You cannot set `cancel_at_end_of_period` at subscription creation, or if the subscription is past due. ```http POST /subscriptions/{subscription_id}/delayed_cancel.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Cancellation Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/cancellation-request) | Body, Optional | - | # Response Type **200**: OK [`Delayed Cancellation Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/delayed-cancellation-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/delayed_cancel.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Cancel Delayed Cancellation Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/cancel-delayed-cancellation Removes the delayed cancellation from a subscription, ensuring it is not canceled at the end of the current period. The request will reset the `cancel_at_end_of_period` flag to `false`. This endpoint is idempotent. If the subscription was not set to cancel in the future, removing the delayed cancellation has no effect and the call will be successful. ```http DELETE /subscriptions/{subscription_id}/delayed_cancel.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **200**: OK [`Delayed Cancellation Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/delayed-cancellation-response) # Example Usage ```bash curl -X DELETE \ --url 'https://subdomain.chargify.com/subscriptions/222/delayed_cancel.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json { "message": "This subscription will no longer be canceled" } ``` # Errors | HTTP Status Code | Error Description | | --- | --- | | 404 | Not Found | ##### Cancel Dunning Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/cancel-dunning Cancels the active dunning process for a subscription and sets it to active. ```http POST /subscriptions/{subscription_id}/cancel_dunning.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | # Response Type **200**: OK [`Subscription Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/cancel_dunning.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### Preview Renewal Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-status/preview-renewal Previews a subscription’s next renewal assessment. Renewal Preview is an object representing a subscription’s next assessment. You can retrieve it to see a snapshot of how much your customer will be charged on their next renewal. The "Next Billing" amount and "Next Billing" date are already represented in the UI on each Subscriber's Summary. For more information, see [Subscriber Interface Overview](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). ## Optional Component Fields This endpoint is particularly useful because it returns the computed billing amount for the base product and the components which are in use by a subscriber. By default, the preview includes billing details for all components _at their **current** quantities_. This means: * Current `allocated_quantity` for quantity-based components * Current enabled/disabled status for on/off components * Current metered usage `unit_balance` for metered components * Current metric quantity value for events recorded thus far for events-based components In the above statements, "current" means the quantity or value as of the call to the renewal preview endpoint. End-of-period values for components are not predicted, so metered or events-based usage may be less than it will eventually be at the end of the period. Optionally, **you can provide your own custom quantities** for any component to see a billing preview for non-current quantities. This is accomplished by sending a request body with data under the `components` key. See the request body documentation below. ## Preview Behavior Sending a `POST` request to this endpoint returns preview data without modifying the subscription. This method previews data, but does not log any changes against a subscription. ```http POST /subscriptions/{subscription_id}/renewals/preview.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Template, Required | The Chargify id of the subscription. | | `body` | [`Renewal Preview Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-request) | Body, Optional | - | # Response Type **200**: OK [`Renewal Preview Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/subscriptions/222/renewals/preview.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "components": [ { "component_id": 10708, "quantity": 10000 }, { "component_id": "handle:small-instance-hours", "quantity": 10000, "price_point_id": 8712 }, { "component_id": "handle:large-instance-hours", "quantity": 100, "price_point_id": "handle:startup-pricing" } ] }' ``` # Example Response *(as JSON)* ```json { "renewal_preview": { "next_assessment_at": "2017-03-13T12:50:55-04:00", "subtotal_in_cents": 6000, "total_tax_in_cents": 0, "total_discount_in_cents": 0, "total_in_cents": 6000, "existing_balance_in_cents": 0, "total_amount_due_in_cents": 6000, "uncalculated_taxes": false, "line_items": [ { "transaction_type": "charge", "kind": "baseline", "amount_in_cents": 5000, "memo": "Gold Product (03/13/2017 - 04/13/2017)", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0, "product_id": 1, "product_handle": "gold-product", "product_name": "Gold Product", "period_range_start": "01/10/2024", "period_range_end": "02/10/2024" }, { "transaction_type": "charge", "kind": "quantity_based_component", "amount_in_cents": 1000, "memo": "Quantity Component: 10 Quantity Components", "discount_amount_in_cents": 0, "taxable_amount_in_cents": 0, "component_id": 104, "component_handle": "quantity-component", "component_name": "Quantity Component", "period_range_start": "01/10/2024", "period_range_end": "02/10/2024" } ] } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | #### Webhooks ##### List Webhooks Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/list-webhooks Retrieves a list of webhooks. You can pass query parameters if you want to filter webhooks. See the [Webhooks](https://developers.maxio.com/http/getting-started/webhooks/webhooks) documentation for more information. ```http GET /webhooks.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `status` | [`Webhook Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/webhook-status) | Query, Optional | Webhooks with matching status would be returned. | | `since_date` | `String` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date greater than or equal to the one specified. | | `until_date` | `String` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date less than or equal to the one specified. | | `page` | `Number` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `per_page` | `Number` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `order` | [`Webhook Order`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/webhook-order) | Query, Optional | The order in which the Webhooks are returned. | | `subscription` | `Number` | Query, Optional | The Advanced Billing id of a subscription you'd like to filter for | # Response Type **201**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/webhook-response) # Example Usage ```bash curl -X GET -G \ --url 'https://subdomain.chargify.com/webhooks.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ -d 'page=1' \ -d 'per_page=50' ``` # Example Response *(as JSON)* ```json [ { "webhook": { "event": "statement_settled", "id": 141765032, "created_at": "2016-11-08T16:22:26-05:00", "last_error": "404 Resource Not Found (retry 5 of 5)", "last_error_at": "2016-11-08T16:43:54-05:00", "accepted_at": null, "last_sent_at": "2016-11-08T16:43:54-05:00", "last_sent_url": "http://requestb.in/11u45x71", "successful": false, "body": "id=141765032&event=statement_settled&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][balance_in_cents]=0&payload[customer][id]=14585695&payload[customer][first_name]=Alan&payload[customer][last_name]=Test&payload[customer][reference]=&payload[customer][organization]=&payload[customer][address]=&payload[customer][address_2]=&payload[customer][city]=&payload[customer][state]=&payload[customer][zip]=&payload[customer][country]=&payload[customer][email]=alan999%40example.com&payload[customer][phone]=&payload[statement][closed_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][id]=80168049&payload[statement][opened_at]=2016-11-07%2016%3A22%3A15%20-0500&payload[statement][settled_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][subscription_id]=15100141&payload[statement][updated_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][starting_balance_in_cents]=0&payload[statement][ending_balance_in_cents]=0&payload[statement][total_in_cents]=6400&payload[statement][memo]=We%20thank%20you%20for%20your%20continued%20business!&payload[statement][events][0][id]=346956565&payload[statement][events][0][key]=renewal_success&payload[statement][events][0][message]=Successful%20renewal%20for%20Alan%20Test's%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][1][id]=346956579&payload[statement][events][1][key]=payment_success&payload[statement][events][1][message]=Successful%20payment%20of%20%2464.00%20for%20Alan%20Test's%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][2][id]=347299359&payload[statement][events][2][key]=renewal_success&payload[statement][events][2][message]=Successful%20renewal%20for%20Alan%20Test's%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][transactions][0][id]=161537343&payload[statement][transactions][0][subscription_id]=15100141&payload[statement][transactions][0][type]=Charge&payload[statement][transactions][0][kind]=baseline&payload[statement][transactions][0][transaction_type]=charge&payload[statement][transactions][0][success]=true&payload[statement][transactions][0][amount_in_cents]=1000&payload[statement][transactions][0][memo]=%2410%20Basic%20Plan%20(11%2F08%2F2016%20-%2011%2F09%2F2016)&payload[statement][transactions][0][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][0][starting_balance_in_cents]=0&payload[statement][transactions][0][ending_balance_in_cents]=1000&payload[statement][transactions][0][gateway_used]=&payload[statement][transactions][0][gateway_transaction_id]=&payload[statement][transactions][0][gateway_order_id]=&payload[statement][transactions][0][payment_id]=161537369&payload[statement][transactions][0][product_id]=3792003&payload[statement][transactions][0][tax_id]=&payload[statement][transactions][0][component_id]=&payload[statement][transactions][0][statement_id]=80168049&payload[statement][transactions][0][customer_id]=14585695&payload[statement][transactions][0][original_amount_in_cents]=&payload[statement][transactions][0][discount_amount_in_cents]=&payload[statement][transactions][0][taxable_amount_in_cents]=&payload[statement][transactions][1][id]=161537344&payload[statement][transactions][1][subscription_id]=15100141&payload[statement][transactions][1][type]=Charge&payload[statement][transactions][1][kind]=quantity_based_component&payload[statement][transactions][1][transaction_type]=charge&payload[statement][transactions][1][success]=true&payload[statement][transactions][1][amount_in_cents]=5400&payload[statement][transactions][1][memo]=Timesheet%20Users%3A%2018%20Timesheet%20Users&payload[statement][transactions][1][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][1][starting_balance_in_cents]=1000&payload[statement][transactions][1][ending_balance_in_cents]=6400&payload[statement][transactions][1][gateway_used]=&payload[statement][transactions][1][gateway_transaction_id]=&payload[statement][transactions][1][gateway_order_id]=&payload[statement][transactions][1][payment_id]=161537369&payload[statement][transactions][1][product_id]=3792003&payload[statement][transactions][1][tax_id]=&payload[statement][transactions][1][component_id]=277221&payload[statement][transactions][1][statement_id]=80168049&payload[statement][transactions][1][customer_id]=14585695&payload[statement][transactions][1][original_amount_in_cents]=&payload[statement][transactions][1][discount_amount_in_cents]=&payload[statement][transactions][1][taxable_amount_in_cents]=&payload[statement][transactions][2][id]=161537369&payload[statement][transactions][2][subscription_id]=15100141&payload[statement][transactions][2][type]=Payment&payload[statement][transactions][2][kind]=&payload[statement][transactions][2][transaction_type]=payment&payload[statement][transactions][2][success]=true&payload[statement][transactions][2][amount_in_cents]=6400&payload[statement][transactions][2][memo]=Alan%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[statement][transactions][2][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][transactions][2][starting_balance_in_cents]=6400&payload[statement][transactions][2][ending_balance_in_cents]=0&payload[statement][transactions][2][gateway_used]=bogus&payload[statement][transactions][2][gateway_transaction_id]=53433&payload[statement][transactions][2][gateway_order_id]=&payload[statement][transactions][2][payment_id]=&payload[statement][transactions][2][product_id]=3792003&payload[statement][transactions][2][tax_id]=&payload[statement][transactions][2][component_id]=&payload[statement][transactions][2][statement_id]=80168049&payload[statement][transactions][2][customer_id]=14585695&payload[statement][transactions][2][card_number]=XXXX-XXXX-XXXX-1&payload[statement][transactions][2][card_expiration]=10%2F2020&payload[statement][transactions][2][card_type]=bogus&payload[statement][transactions][2][refunded_amount_in_cents]=0&payload[product][id]=3792003&payload[product][name]=%2410%20Basic%20Plan&payload[product_family][id]=527890&payload[product_family][name]=Acme%20Projects&payload[payment_profile][id]=10102821&payload[payment_profile][first_name]=Alan&payload[payment_profile][last_name]=Test&payload[payment_profile][billing_address]=&payload[payment_profile][billing_address_2]=&payload[payment_profile][billing_city]=&payload[payment_profile][billing_country]=&payload[payment_profile][billing_state]=&payload[payment_profile][billing_zip]=&payload[event_id]=347299384", "signature": "7c606ec4628ce75ec46e284097ce163a", "signature_hmac_sha_256": "40f25e83dd324508bb2149e3e525821922fb210535ebfbfa81e7ab951996b41d" } }, { "webhook": { "event": "payment_success", "id": 141765008, "created_at": "2016-11-08T16:22:25-05:00", "last_error": "404 Resource Not Found (retry 5 of 5)", "last_error_at": "2016-11-08T16:43:54-05:00", "accepted_at": null, "last_sent_at": "2016-11-08T16:43:54-05:00", "last_sent_url": "http://requestb.in/11u45x71", "successful": false, "body": "id=141765008&event=payment_success&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][trial_started_at]=&payload[subscription][trial_ended_at]=&payload[subscription][activated_at]=2016-11-04%2017%3A06%3A43%20-0400&payload[subscription][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][updated_at]=2016-11-08%2016%3A22%3A22%20-0500&payload[subscription][expires_at]=&payload[subscription][balance_in_cents]=0&payload[subscription][current_period_ends_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][next_assessment_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][canceled_at]=&payload[subscription][cancellation_message]=&payload[subscription][next_product_id]=&payload[subscription][cancel_at_end_of_period]=false&payload[subscription][payment_collection_method]=automatic&payload[subscription][snap_day]=&payload[subscription][cancellation_method]=&payload[subscription][current_period_started_at]=2016-11-08%2016%3A06%3A42%20-0500&payload[subscription][previous_state]=active&payload[subscription][signup_payment_id]=161034048&payload[subscription][signup_revenue]=64.00&payload[subscription][delayed_cancel_at]=&payload[subscription][coupon_code]=&payload[subscription][total_revenue_in_cents]=32000&payload[subscription][product_price_in_cents]=1000&payload[subscription][product_version_number]=7&payload[subscription][payment_type]=credit_card&payload[subscription][referral_code]=pggn84&payload[subscription][coupon_use_count]=&payload[subscription][coupon_uses_allowed]=&payload[subscription][customer][id]=14585695&payload[subscription][customer][first_name]=Test&payload[subscription][customer][last_name]=Test&payload[subscription][customer][organization]=&payload[subscription][customer][email]=alan999%40example.com&payload[subscription][customer][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][customer][updated_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][reference]=&payload[subscription][customer][address]=&payload[subscription][customer][address_2]=&payload[subscription][customer][city]=&payload[subscription][customer][state]=&payload[subscription][customer][zip]=&payload[subscription][customer][country]=&payload[subscription][customer][phone]=&payload[subscription][customer][portal_invite_last_sent_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][portal_invite_last_accepted_at]=&payload[subscription][customer][verified]=false&payload[subscription][customer][portal_customer_created_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][cc_emails]=&payload[subscription][product][id]=3792003&payload[subscription][product][name]=%2410%20Basic%20Plan&payload[subscription][product][handle]=basic&payload[subscription][product][description]=lorem%20ipsum&payload[subscription][product][accounting_code]=basic&payload[subscription][product][request_credit_card]=false&payload[subscription][product][expiration_interval]=&payload[subscription][product][expiration_interval_unit]=never&payload[subscription][product][created_at]=2016-03-24%2013%3A38%3A39%20-0400&payload[subscription][product][updated_at]=2016-11-03%2013%3A03%3A05%20-0400&payload[subscription][product][price_in_cents]=1000&payload[subscription][product][interval]=1&payload[subscription][product][interval_unit]=day&payload[subscription][product][initial_charge_in_cents]=&payload[subscription][product][trial_price_in_cents]=&payload[subscription][product][trial_interval]=&payload[subscription][product][trial_interval_unit]=month&payload[subscription][product][archived_at]=&payload[subscription][product][require_credit_card]=false&payload[subscription][product][return_params]=&payload[subscription][product][taxable]=false&payload[subscription][product][update_return_url]=&payload[subscription][product][initial_charge_after_trial]=false&payload[subscription][product][version_number]=7&payload[subscription][product][update_return_params]=&payload[subscription][product][product_family][id]=527890&payload[subscription][product][product_family][name]=Acme%20Projects&payload[subscription][product][product_family][description]=&payload[subscription][product][product_family][handle]=billing-plans&payload[subscription][product][product_family][accounting_code]=&payload[subscription][product][public_signup_pages][id]=281054&payload[subscription][product][public_signup_pages][return_url]=http%3A%2F%2Fwww.example.com%3Fsuccessfulsignup&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fkqvmfrbgd89q%2Fbasic&payload[subscription][product][public_signup_pages][id]=281240&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fdkffht5dxfd8%2Fbasic&payload[subscription][product][public_signup_pages][id]=282694&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fjwffwgdd95s8%2Fbasic&payload[subscription][credit_card][id]=10102821&payload[subscription][credit_card][first_name]=Alan&payload[subscription][credit_card][last_name]=Test&payload[subscription][credit_card][masked_card_number]=XXXX-XXXX-XXXX-1&payload[subscription][credit_card][card_type]=bogus&payload[subscription][credit_card][expiration_month]=10&payload[subscription][credit_card][expiration_year]=2020&payload[subscription][credit_card][customer_id]=14585695&payload[subscription][credit_card][current_vault]=bogus&payload[subscription][credit_card][vault_token]=1&payload[subscription][credit_card][billing_address]=&payload[subscription][credit_card][billing_city]=&payload[subscription][credit_card][billing_state]=&payload[subscription][credit_card][billing_zip]=&payload[subscription][credit_card][billing_country]=&payload[subscription][credit_card][customer_vault_token]=&payload[subscription][credit_card][billing_address_2]=&payload[subscription][credit_card][payment_type]=credit_card&payload[subscription][credit_card][site_gateway_setting_id]=&payload[subscription][credit_card][gateway_handle]=&payload[transaction][id]=161537369&payload[transaction][subscription_id]=15100141&payload[transaction][type]=Payment&payload[transaction][kind]=&payload[transaction][transaction_type]=payment&payload[transaction][success]=true&payload[transaction][amount_in_cents]=6400&payload[transaction][memo]=Alan%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[transaction][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[transaction][starting_balance_in_cents]=6400&payload[transaction][ending_balance_in_cents]=0&payload[transaction][gateway_used]=bogus&payload[transaction][gateway_transaction_id]=53433&payload[transaction][gateway_response_code]=&payload[transaction][gateway_order_id]=&payload[transaction][payment_id]=&payload[transaction][product_id]=3792003&payload[transaction][tax_id]=&payload[transaction][component_id]=&payload[transaction][statement_id]=80168049&payload[transaction][customer_id]=14585695&payload[transaction][card_number]=XXXX-XXXX-XXXX-1&payload[transaction][card_expiration]=10%2F2020&payload[transaction][card_type]=bogus&payload[transaction][refunded_amount_in_cents]=0&payload[transaction][invoice_id]=&payload[event_id]=347299364", "signature": "fbcf2f6be579f9658cff90c4373e0ca2", "signature_hmac_sha_256": "db96654f5456c5460062feb944ac8bb1418f9d181ae04a8ed982fe9ffdca8de1" } } ] ``` ##### Enable Webhooks Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/enable-webhooks Enables webhooks for your site. ```http PUT /webhooks/settings.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Enable Webhooks Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/enable-webhooks-request) | Body, Optional | - | # Response Type **200**: OK [`Enable Webhooks Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/enable-webhooks-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/webhooks/settings.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "webhooks_enabled": true }' ``` # Example Response *(as JSON)* ```json { "webhooks_enabled": true } ``` ##### Replay Webhooks Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/replay-webhooks Replays webhooks. Posting to this endpoint does not immediately resend the webhooks. They are added to a queue and sent as soon as possible, depending on available system resources. You can submit an array of up to 1000 webhook IDs in the replay request. ```http POST /webhooks/replay.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Replay Webhooks Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/replay-webhooks-request) | Body, Optional | - | # Response Type **200**: OK [`Replay Webhooks Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/replay-webhooks-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/webhooks/replay.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "ids": [ 123456789, 123456788 ] }' ``` # Example Response *(as JSON)* ```json { "status": "ok" } ``` ##### Create Endpoint Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/create-endpoint Creates an endpoint and assigns a list of webhook subscriptions (events) to it. See the [Webhooks Reference](https://developers.maxio.com/http/getting-started/webhooks/webhooks-reference#events) page for available events. ```http POST /endpoints.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `body` | [`Create or Update Endpoint Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-endpoint-request) | Body, Optional | Used to Create or Update Endpoint. | # Response Type **200**: OK [`Endpoint Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/endpoint-response) # Example Usage ```bash curl -X POST \ --url 'https://subdomain.chargify.com/endpoints.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "endpoint": { "url": "https://your.site/webhooks", "webhook_subscriptions": [ "payment_success", "payment_failure", "invoice_pending" ] } }' ``` # Example Response *(as JSON)* ```json { "endpoint": { "id": 1, "url": "https://your.site/webhooks", "site_id": 1, "status": "enabled", "webhook_subscriptions": [ "payment_success", "payment_failure", "invoice_pending" ] } } ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ##### List Endpoints Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/list-endpoints Lists endpoints configured for a site. ```http GET /endpoints.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Response Type **200**: OK [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/endpoint) # Example Usage ```bash curl -X GET \ --url 'https://subdomain.chargify.com/endpoints.json' \ -H 'Accept: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' ``` # Example Response *(as JSON)* ```json [ { "id": 11, "url": "https://foobar.com/webhooks", "site_id": 1, "status": "enabled", "webhook_subscriptions": [ "payment_success", "payment_failure", "invoice_pending" ] }, { "id": 12, "url": "https:/example.com/webhooks", "site_id": 1, "status": "enabled", "webhook_subscriptions": [ "payment_success", "payment_failure", "refund_failure" ] } ] ``` ##### Update Endpoint Source: https://developers.maxio.com/http/advanced-billing-api/api-endpoints/webhooks/update-endpoint Updates an Endpoint. You can change the `url` of your endpoint or the list of `webhook_subscriptions` to which you are subscribed. See the [Webhooks Reference](https://developers.maxio.com/http/getting-started/webhooks/webhooks-reference#events) page for available events. Always send a complete list of events to which you want to subscribe. Sending a PUT request for an existing endpoint with an empty list of `webhook_subscriptions` will unsubscribe all events. If you want to unsubscribe from a specific event, send a list of `webhook_subscriptions` without the specific event key. ```http PUT /endpoints/{endpoint_id}.json ``` # Authentication This endpoint requires [BasicAuth](https://developers.maxio.com/http/getting-started/how-to-get-started#authorization) # Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `endpoint_id` | `Number` | Template, Required | The Advanced Billing id for the endpoint that should be updated | | `body` | [`Create or Update Endpoint Request`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-endpoint-request) | Body, Optional | Used to Create or Update Endpoint. | # Response Type **200**: OK [`Endpoint Response`](https://developers.maxio.com/http/advanced-billing-api/models/structures/endpoint-response) # Example Usage ```bash curl -X PUT \ --url 'https://subdomain.chargify.com/endpoints/42.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u 'BasicAuthUserName:BasicAuthPassword' \ --data-raw '{ "endpoint": { "url": "https://your.site/webhooks/1/json.", "webhook_subscriptions": [ "payment_failure", "payment_success", "refund_failure", "invoice_pending" ] } }' ``` # Errors | HTTP Status Code | Error Description | Exception Class | | --- | --- | --- | | 404 | Not Found | | | 422 | Unprocessable Entity (WebDAV) | [`Error List ResponseException`](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) | ### Models #### Structures * [Payment Method Apple Pay](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-apple-pay) * [Payment Method Bank Account](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-bank-account) * [Payment Method Credit Card](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-credit-card) * [Payment Method External](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-external) * [Payment Method Paypal](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-paypal) * [Apply Credit Note Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-credit-note-event) * [Apply Debit Note Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-debit-note-event) * [Apply Payment Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-payment-event) * [Backport Invoice Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/backport-invoice-event) * [Change Chargeback Status Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-chargeback-status-event) * [Change Invoice Collection Method Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-collection-method-event) * [Change Invoice Status Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-status-event) * [Create Credit Note Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-credit-note-event) * [Create Debit Note Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-debit-note-event) * [Failed Payment Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/failed-payment-event) * [Issue Invoice Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-invoice-event) * [Refund Invoice Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice-event) * [Remove Payment Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/remove-payment-event) * [Void Invoice Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-event) * [Void Remainder Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-remainder-event) * [List Invoice Events Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-invoice-events-response) * [Apple Pay Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/apple-pay-payment-profile) * [Bank Account Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-payment-profile) * [Credit Card Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-card-payment-profile) * [Paypal Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/paypal-payment-profile) * [Account Balance](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) * [Account Balances](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balances) * [ACH Agreement](https://developers.maxio.com/http/advanced-billing-api/models/structures/ach-agreement) * [Activate Event-Based Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/activate-event-based-component) * [Activate Subscription Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/activate-subscription-request) * [Add Coupons Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/add-coupons-request) * [Add Subscription to a Group](https://developers.maxio.com/http/advanced-billing-api/models/structures/add-subscription-to-a-group) * [Address Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/address-change) * [Aggregated Entitlement](https://developers.maxio.com/http/advanced-billing-api/models/structures/aggregated-entitlement) * [Aggregated Entitlement Periodicity](https://developers.maxio.com/http/advanced-billing-api/models/structures/aggregated-entitlement-periodicity) * [Aggregated Entitlements Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/aggregated-entitlements-response) * [Agreement Acceptance](https://developers.maxio.com/http/advanced-billing-api/models/structures/agreement-acceptance) * [Allocate Components](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocate-components) * [Allocation](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation) * [Allocation Expiration Date](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-expiration-date) * [Allocation Preview](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview) * [Allocation Preview Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview-item) * [Allocation Preview Line Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview-line-item) * [Allocation Preview Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview-response) * [Allocation Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-response) * [Allocation Settings](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-settings) * [Applied Credit Note Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/applied-credit-note-data) * [Apply Credit Note Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-credit-note-event-data) * [Apply Debit Note Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-debit-note-event-data) * [Apply Payment Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-payment-event-data) * [Attribute Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/attribute-error) * [Auto Resume](https://developers.maxio.com/http/advanced-billing-api/models/structures/auto-resume) * [Available Actions](https://developers.maxio.com/http/advanced-billing-api/models/structures/available-actions) * [Bank Account Attributes](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-attributes) * [Bank Account Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-response) * [Bank Account Verification](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-verification) * [Bank Account Verification Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-verification-request) * [Base Refund Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/base-refund-error) * [Base String Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/base-string-error) * [Batch Job Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job-response) * [Batch-Job](https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job) * [Billing Manifest](https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-manifest) * [Billing Manifest Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-manifest-item) * [Billing Schedule](https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-schedule) * [Breakouts](https://developers.maxio.com/http/advanced-billing-api/models/structures/breakouts) * [Bulk Components Price Point Assignment](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-components-price-point-assignment) * [Bulk Create Product Price Points Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-create-product-price-points-request) * [Bulk Create Product Price Points Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-create-product-price-points-response) * [Bulk Create Segments](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-create-segments) * [Bulk Update Segments](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-update-segments) * [Bulk Update Segments Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-update-segments-item) * [Calendar Billing](https://developers.maxio.com/http/advanced-billing-api/models/structures/calendar-billing) * [Cancel Grouped Subscriptions Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/cancel-grouped-subscriptions-request) * [Cancellation Options](https://developers.maxio.com/http/advanced-billing-api/models/structures/cancellation-options) * [Cancellation Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/cancellation-request) * [Change Chargeback Status Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-chargeback-status-event-data) * [Change Invoice Collection Method Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-collection-method-event-data) * [Change Invoice Status Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-status-event-data) * [Chargify EBB](https://developers.maxio.com/http/advanced-billing-api/models/structures/chargify-ebb) * [Chjs Tokenization Failure](https://developers.maxio.com/http/advanced-billing-api/models/structures/chjs-tokenization-failure) * [Chjs Tokenization Success](https://developers.maxio.com/http/advanced-billing-api/models/structures/chjs-tokenization-success) * [Clone Component Price Point](https://developers.maxio.com/http/advanced-billing-api/models/structures/clone-component-price-point) * [Clone Component Price Point Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/clone-component-price-point-request) * [Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/component) * [Component Allocation Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-allocation-change) * [Component Allocation Error Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-allocation-error-item) * [Component Allocation Error 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-allocation-error-1) * [Component Cost Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-cost-data) * [Component Cost Data Rate Tier](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-cost-data-rate-tier) * [Component Currency Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-price) * [Component Currency Prices Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-prices-response) * [Component Custom Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-custom-price) * [Component Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price) * [Component Price Point](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point) * [Component Price Point Assignment](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-assignment) * [Component Price Point Currency Overage Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-currency-overage-response) * [Component Price Point Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-item) * [Component Price Point Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-response) * [Component Price Points Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-points-response) * [Component Price Point Error Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-error-item) * [Component Price Point Error 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-error-1) * [Component Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response) * [Consolidated Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/consolidated-invoice) * [Contract](https://developers.maxio.com/http/advanced-billing-api/models/structures/contract) * [Count Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/count-response) * [Coupon](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon) * [Coupon Currency](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency) * [Coupon Currency Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency-request) * [Coupon Currency Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency-response) * [Coupon Payload](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-payload) * [Coupon Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-request) * [Coupon Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response) * [Coupon Restriction](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-restriction) * [Coupon Subcodes](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-subcodes) * [Coupon Subcodes Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-subcodes-response) * [Coupon Usage](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-usage) * [Create Allocation](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-allocation) * [Create Allocation Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-allocation-request) * [Create Component Price Point](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-point) * [Create Component Price Point Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-point-request) * [Create Component Price Points Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-points-request) * [Create Currency Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-currency-price) * [Create Currency Prices Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-currency-prices-request) * [Create Customer](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-customer) * [Create Customer Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-customer-request) * [Create EBB Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-ebb-component) * [Create Feature Catalog Item Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-feature-catalog-item-request) * [Create Feature Template Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-feature-template-request) * [Create Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice) * [Create Invoice Address](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-address) * [Create Invoice Coupon](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-coupon) * [Create Invoice Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-item) * [Create Invoice Payment](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-payment) * [Create Invoice Payment Application](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-payment-application) * [Create Invoice Payment Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-payment-request) * [Create Invoice Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-request) * [Create Metadata](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metadata) * [Create Metadata Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metadata-request) * [Create Metafield](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metafield) * [Create Metafields Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metafields-request) * [Create Metered Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metered-component) * [Create Multi Invoice Payment](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-multi-invoice-payment) * [Create Multi Invoice Payment Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-multi-invoice-payment-request) * [Create Offer](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-offer) * [Create Offer Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-offer-component) * [Create Offer Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-offer-request) * [Create On Off Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-on-off-component) * [Create or Update Endpoint](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-endpoint) * [Create or Update Endpoint Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-endpoint-request) * [Create or Update Product](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-product) * [Create or Update Product Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-product-request) * [Create or Update Segment Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-segment-price) * [Create Payment](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-payment) * [Create Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-payment-profile) * [Create Payment Profile Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-payment-profile-request) * [Create Prepaid Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepaid-component) * [Create Prepaid Usage Component Price Point](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepaid-usage-component-price-point) * [Create Prepayment](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepayment) * [Create Prepayment Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepayment-request) * [Create Prepayment Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepayment-response) * [Create Product Currency Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-currency-price) * [Create Product Currency Prices Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-currency-prices-request) * [Create Product Family](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-family) * [Create Product Family Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-family-request) * [Create Product Price Point](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-price-point) * [Create Product Price Point Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-price-point-request) * [Create Quantity Based Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-quantity-based-component) * [Create Reason Code](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-reason-code) * [Create Reason Code Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-reason-code-request) * [Create Segment](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-segment) * [Create Segment Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-segment-request) * [Create Subscription](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription) * [Create Subscription Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-component) * [Create Subscription Group](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-group) * [Create Subscription Group Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-group-request) * [Create Subscription Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-request) * [Create Usage](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-usage) * [Create Usage Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-usage-request) * [Created Prepayment](https://developers.maxio.com/http/advanced-billing-api/models/structures/created-prepayment) * [Credit Account Balance Changed](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-account-balance-changed) * [Credit Card Attributes](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-card-attributes) * [Credit Note](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note) * [Credit Note Application](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note-application) * [Credit Note Line Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note-line-item) * [Credit Scheme Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-scheme-request) * [Currency Overage Prices](https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-overage-prices) * [Currency Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-price) * [Currency Prices Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-prices-response) * [Custom Field Value Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/custom-field-value-change) * [Customer](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer) * [Customer Attributes](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-attributes) * [Customer Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-change) * [Customer Changes Preview Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-changes-preview-response) * [Customer Custom Fields Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-custom-fields-change) * [Customer Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-error) * [Customer Error Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-error-response-1) * [Customer Payer Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-payer-change) * [Customer Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-response) * [Debit Note](https://developers.maxio.com/http/advanced-billing-api/models/structures/debit-note) * [Deduct Service Credit](https://developers.maxio.com/http/advanced-billing-api/models/structures/deduct-service-credit) * [Deduct Service Credit Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/deduct-service-credit-request) * [Delayed Cancellation Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/delayed-cancellation-response) * [Delete Subscription Group Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/delete-subscription-group-response) * [Deliver Proforma Invoice Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/deliver-proforma-invoice-request) * [Dunner Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/dunner-data) * [Dunning Step Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/dunning-step-data) * [Dunning Step Reached](https://developers.maxio.com/http/advanced-billing-api/models/structures/dunning-step-reached) * [EBB Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/ebb-component) * [EBB Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/ebb-event) * [Enable Webhooks Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/enable-webhooks-request) * [Enable Webhooks Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/enable-webhooks-response) * [Endpoint](https://developers.maxio.com/http/advanced-billing-api/models/structures/endpoint) * [Endpoint Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/endpoint-response) * [Error Array Map Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/error-array-map-response-1) * [Error List Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/error-list-response-1) * [Error String Map Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/error-string-map-response-1) * [Errors](https://developers.maxio.com/http/advanced-billing-api/models/structures/errors) * [Event](https://developers.maxio.com/http/advanced-billing-api/models/structures/event) * [Event Based Billing List Segments Errors 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-list-segments-errors-1) * [Event Based Billing Segment Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-segment-error) * [Event Based Billing Segment Errors 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-segment-errors-1) * [Event Based Billing Segment 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-segment-1) * [Event Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/event-response) * [Failed Payment Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/failed-payment-event-data) * [Feature](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature) * [Feature Catalog Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item) * [Feature Catalog Item Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response) * [Feature Catalog Items List Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-items-list-response) * [Feature Template](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template) * [Feature Template Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template-response) * [Feature Templates List Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-templates-list-response) * [Feature 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-1) * [Feature 2](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-2) * [Feature 3](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-3) * [Full Subscription Group Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/full-subscription-group-response) * [Get One Time Token Bank Account Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/get-one-time-token-bank-account-payment-profile) * [Get One Time Token Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/get-one-time-token-payment-profile) * [Get One Time Token Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/get-one-time-token-request) * [Group Billing](https://developers.maxio.com/http/advanced-billing-api/models/structures/group-billing) * [Group Settings](https://developers.maxio.com/http/advanced-billing-api/models/structures/group-settings) * [Group Target](https://developers.maxio.com/http/advanced-billing-api/models/structures/group-target) * [Historic Usage](https://developers.maxio.com/http/advanced-billing-api/models/structures/historic-usage) * [Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) * [Invoice Address](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) * [Invoice Avatax Details](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-avatax-details) * [Invoice Balance Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-balance-item) * [Invoice Credit](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-credit) * [Invoice Custom Field](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-custom-field) * [Invoice Customer](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-customer) * [Invoice Debit](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-debit) * [Invoice Discount](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-discount) * [Invoice Discount Breakout](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-discount-breakout) * [Invoice Display Settings](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-display-settings) * [Invoice Issued](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-issued) * [Invoice Line Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item) * [Invoice Line Item Component Cost Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-component-cost-data) * [Invoice Line Item Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-event-data) * [Invoice Line Item Pricing Detail](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-pricing-detail) * [Invoice Payer](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payer) * [Invoice Payer Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payer-change) * [Invoice Payment](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payment) * [Invoice Payment Application](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payment-application) * [Invoice Payment Method](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payment-method) * [Invoice Pre Payment](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-pre-payment) * [Invoice Previous Balance](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-previous-balance) * [Invoice Refund](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-refund) * [Invoice Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-response) * [Invoice Seller](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-seller) * [Invoice Tax](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax) * [Invoice Tax Breakout](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax-breakout) * [Invoice Tax Component Breakout](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax-component-breakout) * [Issue Advance Invoice Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-advance-invoice-request) * [Issue Invoice Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-invoice-event-data) * [Issue Invoice Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-invoice-request) * [Issue Service Credit](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-service-credit) * [Issue Service Credit Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-service-credit-request) * [Item Price Point Changed](https://developers.maxio.com/http/advanced-billing-api/models/structures/item-price-point-changed) * [Item Price Point Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/item-price-point-data) * [List Components Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-components-filter) * [List Components Price Points Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-components-price-points-response) * [List Coupons Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-coupons-filter) * [List Credit Notes Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-credit-notes-response) * [List Invoices Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-invoices-response) * [List Metafields Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-metafields-response) * [List Mrr Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-mrr-filter) * [List MRR Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-mrr-response) * [List MRR Response Result](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-mrr-response-result) * [List Offers Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-offers-response) * [List Prepayments Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-prepayments-filter) * [List Price Points Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-price-points-filter) * [List Product Price Points Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-product-price-points-response) * [List Products Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-products-filter) * [List Proforma Invoices Meta](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-proforma-invoices-meta) * [List Proforma Invoices Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-proforma-invoices-response) * [List Public Keys Meta](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-public-keys-meta) * [List Public Keys Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-public-keys-response) * [List Sale Rep Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-sale-rep-item) * [List Segments Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-segments-filter) * [List Segments Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-segments-response) * [List Service Credits Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-service-credits-response) * [List Subscription Components Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-components-filter) * [List Subscription Components for Site Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-components-for-site-filter) * [List Subscription Components Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-components-response) * [List Subscription Group Prepayment](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-group-prepayment) * [List Subscription Group Prepayment Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-group-prepayment-item) * [List Subscription Group Prepayment Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-group-prepayment-response) * [List Subscription Groups Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-groups-item) * [List Subscription Groups Meta](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-groups-meta) * [List Subscription Groups Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-groups-response) * [Metadata](https://developers.maxio.com/http/advanced-billing-api/models/structures/metadata) * [Metafield](https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield) * [Metafield Scope](https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield-scope) * [Metered Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/metered-component) * [Metered Usage](https://developers.maxio.com/http/advanced-billing-api/models/structures/metered-usage) * [Movement](https://developers.maxio.com/http/advanced-billing-api/models/structures/movement) * [Movement Line Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/movement-line-item) * [MRR](https://developers.maxio.com/http/advanced-billing-api/models/structures/mrr) * [MRR Movement](https://developers.maxio.com/http/advanced-billing-api/models/structures/mrr-movement) * [MRR Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/mrr-response) * [Multi Invoice Payment](https://developers.maxio.com/http/advanced-billing-api/models/structures/multi-invoice-payment) * [Multi Invoice Payment Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/multi-invoice-payment-response) * [Nested Subscription Group](https://developers.maxio.com/http/advanced-billing-api/models/structures/nested-subscription-group) * [Net Terms](https://developers.maxio.com/http/advanced-billing-api/models/structures/net-terms) * [Offer](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer) * [Offer Discount](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-discount) * [Offer Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-item) * [Offer Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-response) * [Offer Signup Page](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-signup-page) * [Ok Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/ok-response) * [On Off Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/on-off-component) * [Organization Address](https://developers.maxio.com/http/advanced-billing-api/models/structures/organization-address) * [Origin Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/origin-invoice) * [Overage Pricing](https://developers.maxio.com/http/advanced-billing-api/models/structures/overage-pricing) * [Override Subscription](https://developers.maxio.com/http/advanced-billing-api/models/structures/override-subscription) * [Override Subscription Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/override-subscription-request) * [Paginated Metadata](https://developers.maxio.com/http/advanced-billing-api/models/structures/paginated-metadata) * [Paid Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/paid-invoice) * [Pause Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/pause-request) * [Payer Attributes](https://developers.maxio.com/http/advanced-billing-api/models/structures/payer-attributes) * [Payer Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/payer-error) * [Payment Collection Method Changed](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-collection-method-changed) * [Payment for Allocation](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-for-allocation) * [Payment Profile Attributes](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-attributes) * [Payment Profile Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-response) * [Payment Related Events](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-related-events) * [Payment Profile Params](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-params) * [Pending Cancellation Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/pending-cancellation-change) * [Portal Management Link](https://developers.maxio.com/http/advanced-billing-api/models/structures/portal-management-link) * [Prepaid Configuration](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-configuration) * [Prepaid Configuration Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-configuration-response) * [Prepaid Product Price Point Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-product-price-point-filter) * [Prepaid Subscription Balance Changed](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-subscription-balance-changed) * [Prepaid Usage](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-usage) * [Prepaid Usage Allocation Detail](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-usage-allocation-detail) * [Prepaid Usage Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-usage-component) * [Prepayment](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment) * [Prepayment Account Balance Changed](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment-account-balance-changed) * [Prepayment Aggregated Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment-aggregated-error) * [Prepayment Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment-response) * [Prepayments Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayments-response) * [Preview Allocations Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/preview-allocations-request) * [Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) * [Product](https://developers.maxio.com/http/advanced-billing-api/models/structures/product) * [Product Family](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-family) * [Product Family Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-family-response) * [Product Price Point](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point) * [Product Price Point Error Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-error-response-1) * [Product Price Point Errors](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-errors) * [Product Price Point Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-response) * [Product Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response) * [Proforma Bad Request Error Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-bad-request-error-response-1) * [Proforma Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-error) * [Proforma Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) * [Proforma Invoice Credit](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-credit) * [Proforma Invoice Discount](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-discount) * [Proforma Invoice Issued](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-issued) * [Proforma Invoice Payment](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-payment) * [Proforma Invoice Tax](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-tax) * [Proration](https://developers.maxio.com/http/advanced-billing-api/models/structures/proration) * [Public Key](https://developers.maxio.com/http/advanced-billing-api/models/structures/public-key) * [Public Signup Page](https://developers.maxio.com/http/advanced-billing-api/models/structures/public-signup-page) * [Quantity Based Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/quantity-based-component) * [Reactivate Subscription Group Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivate-subscription-group-request) * [Reactivate Subscription Group Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivate-subscription-group-response) * [Reactivate Subscription Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivate-subscription-request) * [Reactivation Billing](https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivation-billing) * [Reason Code](https://developers.maxio.com/http/advanced-billing-api/models/structures/reason-code) * [Reason Code Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/reason-code-response) * [Record Payment Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/record-payment-request) * [Record Payment Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/record-payment-response) * [Referral Code](https://developers.maxio.com/http/advanced-billing-api/models/structures/referral-code) * [Referral Validation Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/referral-validation-response) * [Refund Consolidated Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-consolidated-invoice) * [Refund Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice) * [Refund Invoice Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice-event-data) * [Refund Invoice Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice-request) * [Refund Prepayment](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment) * [Refund Prepayment Aggregated Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-aggregated-error) * [Refund Prepayment Aggregated Errors Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-aggregated-errors-response) * [Refund Prepayment Base Errors Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-base-errors-response-1) * [Refund Prepayment Base Refund Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-base-refund-error) * [Refund Prepayment Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-request) * [Refund Success](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-success) * [Register](https://developers.maxio.com/http/advanced-billing-api/models/structures/register) * [Remove Payment Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/remove-payment-event-data) * [Renewal Preview](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview) * [Renewal Preview Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-component) * [Renewal Preview Line Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-line-item) * [Renewal Preview Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-request) * [Renewal Preview Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-response) * [Replay Webhooks Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/replay-webhooks-request) * [Replay Webhooks Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/replay-webhooks-response) * [Resent Invitation](https://developers.maxio.com/http/advanced-billing-api/models/structures/resent-invitation) * [Resume Options](https://developers.maxio.com/http/advanced-billing-api/models/structures/resume-options) * [Revoked Invitation](https://developers.maxio.com/http/advanced-billing-api/models/structures/revoked-invitation) * [Sale Rep](https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep) * [Sale Rep Item Mrr](https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep-item-mrr) * [Sale Rep Settings](https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep-settings) * [Sale Rep Subscription](https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep-subscription) * [Scheduled Renewal Component Custom Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-component-custom-price) * [Scheduled Renewal Configuration](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration) * [Scheduled Renewal Configuration Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item) * [Scheduled Renewal Configuration Item Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item-request) * [Scheduled Renewal Configuration Item Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item-response) * [Scheduled Renewal Configuration Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-request) * [Scheduled Renewal Configuration Request Body](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-request-body) * [Scheduled Renewal Configuration Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-response) * [Scheduled Renewal Configurations Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configurations-response) * [Scheduled Renewal Item Request Body Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-item-request-body-component) * [Scheduled Renewal Item Request Body Product](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-item-request-body-product) * [Scheduled Renewal Lock in Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-lock-in-request) * [Scheduled Renewal Product Price Point](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-product-price-point) * [Scheduled Renewal Update Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-update-request) * [Segment](https://developers.maxio.com/http/advanced-billing-api/models/structures/segment) * [Segment Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/segment-price) * [Segment Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/segment-response) * [Send Invoice Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/send-invoice-request) * [Send Email](https://developers.maxio.com/http/advanced-billing-api/models/structures/send-email) * [Service Credit](https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit) * [Service Credit Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit-response) * [Service Credit 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit-1) * [Signup Proforma Preview](https://developers.maxio.com/http/advanced-billing-api/models/structures/signup-proforma-preview) * [Signup Proforma Preview Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/signup-proforma-preview-response) * [Single Error Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/single-error-response-1) * [Single String Error Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/single-string-error-response-1) * [Site](https://developers.maxio.com/http/advanced-billing-api/models/structures/site) * [Site Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/site-response) * [Site Statistics](https://developers.maxio.com/http/advanced-billing-api/models/structures/site-statistics) * [Site Summary](https://developers.maxio.com/http/advanced-billing-api/models/structures/site-summary) * [Subscription](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription) * [Subscription Add Coupon Error 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-add-coupon-error-1) * [Subscription Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component) * [Subscription Component Allocation Error Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-allocation-error-item) * [Subscription Component Allocation Error 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-allocation-error-1) * [Subscription Component Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-response) * [Subscription Component Subscription](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-subscription) * [Subscription Custom Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-custom-price) * [Subscription Filter](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-filter) * [Subscription Group](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group) * [Subscription Group Balances](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-balances) * [Subscription Group Bank Account](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-bank-account) * [Subscription Group Component Custom Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-component-custom-price) * [Subscription Group Create Error Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-create-error-response-1) * [Subscription Group Credit Card](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-credit-card) * [Subscription Group Customer](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-customer) * [Subscription Group Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-item) * [Subscription Group Members Array Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-members-array-error) * [Subscription Group Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-payment-profile) * [Subscription Group Prepayment](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-prepayment) * [Subscription Group Prepayment Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-prepayment-request) * [Subscription Group Prepayment Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-prepayment-response) * [Subscription Group Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-response) * [Subscription Group Signup](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup) * [Subscription Group Signup Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-component) * [Subscription Group Signup Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-error) * [Subscription Group Signup Error Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-error-response-1) * [Subscription Group Signup Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-event-data) * [Subscription Group Signup Failure Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-failure-data) * [Subscription Group Signup Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-item) * [Subscription Group Signup Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-request) * [Subscription Group Signup Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-response) * [Subscription Group Single Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-single-error) * [Subscription Group Subscription Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-subscription-error) * [Subscription Group Update Error](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-update-error) * [Subscription Group Update Error Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-update-error-response-1) * [Subscription Included Coupon](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-included-coupon) * [Subscription Migration Preview](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview) * [Subscription Migration Preview Options](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview-options) * [Subscription Migration Preview Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview-request) * [Subscription Migration Preview Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview-response) * [Subscription MRR](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-mrr) * [Subscription MRR Breakout](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-mrr-breakout) * [Subscription MRR Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-mrr-response) * [Subscription Note](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-note) * [Subscription Note Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-note-response) * [Subscription Preview](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-preview) * [Subscription Preview Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-preview-response) * [Subscription Product Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-product-change) * [Subscription Product Migration](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-product-migration) * [Subscription Product Migration Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-product-migration-request) * [Subscription Remove Coupon Errors 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-remove-coupon-errors-1) * [Subscription Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response) * [Subscription State Change](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-state-change) * [Subscriptions Mrr Error Response 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscriptions-mrr-error-response-1) * [Tax Configuration](https://developers.maxio.com/http/advanced-billing-api/models/structures/tax-configuration) * [Tokenized Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/tokenized-payment-profile) * [Too Many Management Link Requests](https://developers.maxio.com/http/advanced-billing-api/models/structures/too-many-management-link-requests) * [Too Many Management Link Requests Error 1](https://developers.maxio.com/http/advanced-billing-api/models/structures/too-many-management-link-requests-error-1) * [Update Allocation Expiration Date](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-allocation-expiration-date) * [Update Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component) * [Update Component Price Point](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-price-point) * [Update Component Price Point Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-price-point-request) * [Update Component Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-request) * [Update Coupon Currency](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-coupon-currency) * [Update Currency Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-currency-price) * [Update Currency Prices Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-currency-prices-request) * [Update Customer](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-customer) * [Update Customer Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-customer-request) * [Update Feature Catalog Item Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-feature-catalog-item-request) * [Update Feature Template Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-feature-template-request) * [Update Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-invoice) * [Update Invoice Item](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-invoice-item) * [Update Invoice Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-invoice-request) * [Update Metadata](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metadata) * [Update Metadata Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metadata-request) * [Update Metafield](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metafield) * [Update Metafields Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metafields-request) * [Update Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-payment-profile) * [Update Payment Profile Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-payment-profile-request) * [Update Price](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-price) * [Update Product Price Point](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-product-price-point) * [Update Product Price Point Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-product-price-point-request) * [Update Reason Code](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-reason-code) * [Update Reason Code Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-reason-code-request) * [Update Segment](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-segment) * [Update Segment Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-segment-request) * [Update Subscription](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription) * [Update Subscription Component](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-component) * [Update Subscription Group](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-group) * [Update Subscription Group Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-group-request) * [Update Subscription Note](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-note) * [Update Subscription Note Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-note-request) * [Update Subscription Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-request) * [Upsert Prepaid Configuration](https://developers.maxio.com/http/advanced-billing-api/models/structures/upsert-prepaid-configuration) * [Upsert Prepaid Configuration Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/upsert-prepaid-configuration-request) * [Usage](https://developers.maxio.com/http/advanced-billing-api/models/structures/usage) * [Usage Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/usage-response) * [Void Invoice](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice) * [Void Invoice Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-event-data) * [Void Invoice Request](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-request) * [Void Remainder Event Data](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-remainder-event-data) * [Webhook](https://developers.maxio.com/http/advanced-billing-api/models/structures/webhook) * [Webhook Response](https://developers.maxio.com/http/advanced-billing-api/models/structures/webhook-response) ##### Payment Method Apple Pay Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-apple-pay # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `type` | [`Invoice Event Payment Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-payment-method) | Required | - | # Example (as JSON) ```json { "type": "apple_pay" } ``` ##### Payment Method Bank Account Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-bank-account # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `masked_account_number` | `String` | Required | - | | `masked_routing_number` | `String` | Required | - | | `type` | [`Invoice Event Payment Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-payment-method) | Required | - | # Example (as JSON) ```json { "masked_account_number": "masked_account_number2", "masked_routing_number": "masked_routing_number2", "type": "bank_account" } ``` ##### Payment Method Credit Card Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-credit-card # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `card_brand` | `String` | Required | - | | `card_expiration` | `String` | Optional | - | | `last_four` | `String` | Optional | - | | `masked_card_number` | `String` | Required | - | | `type` | [`Invoice Event Payment Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-payment-method) | Required | - | # Example (as JSON) ```json { "card_brand": "card_brand4", "masked_card_number": "masked_card_number0", "type": "credit_card", "card_expiration": "card_expiration2", "last_four": "last_four4" } ``` ##### Payment Method External Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-external # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `details` | `String` | Required | - | | `kind` | `String` | Required | - | | `memo` | `String` | Required | - | | `type` | [`Invoice Event Payment Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-payment-method) | Required | - | # Example (as JSON) ```json { "details": "details4", "kind": "kind2", "memo": "memo8", "type": "external" } ``` ##### Payment Method Paypal Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-paypal # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `email` | `String` | Required | - | | `type` | [`Invoice Event Payment Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-payment-method) | Required | - | # Example (as JSON) ```json { "email": "email2", "type": "paypal_account" } ``` ##### Apply Credit Note Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-credit-note-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `apply_credit_note` | | `event_data` | [`Apply Credit Note Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-credit-note-event-data) | Required | Example schema for an `apply_credit_note` event | # Example (as JSON) ```json { "id": 214, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "apply_credit_note", "event_data": { "uid": "uid6", "credit_note_number": "credit_note_number0", "credit_note_uid": "credit_note_uid0", "original_amount": "original_amount0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z", "memo": "memo0", "role": "role0", "consolidated_invoice": false, "applied_credit_notes": [ { "uid": "uid4", "number": "number8" }, { "uid": "uid4", "number": "number8" }, { "uid": "uid4", "number": "number8" } ] } } ``` ##### Apply Debit Note Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-debit-note-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `apply_debit_note` | | `event_data` | [`Apply Debit Note Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-debit-note-event-data) | Required | Example schema for an `apply_debit_note` event | # Example (as JSON) ```json { "id": 164, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "apply_debit_note", "event_data": { "debit_note_number": "debit_note_number6", "debit_note_uid": "debit_note_uid2", "original_amount": "original_amount0", "applied_amount": "applied_amount2", "memo": "memo0", "transaction_time": "2016-03-13T12:52:32.123Z" } } ``` ##### Apply Payment Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-payment-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `apply_payment` | | `event_data` | [`Apply Payment Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-payment-event-data) | Required | Example schema for an `apply_payment` event | # Example (as JSON) ```json { "id": 234, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "apply_payment", "event_data": { "consolidation_level": "child", "memo": "memo0", "original_amount": "original_amount0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z", "payment_method": { "type": "apple_pay" }, "transaction_id": 78, "parent_invoice_number": 36, "remaining_prepayment_amount": "remaining_prepayment_amount6", "prepayment": false, "external": false } } ``` ##### Backport Invoice Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/backport-invoice-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `backport_invoice` | | `event_data` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | Example schema for an `backport_invoice` event | # Example (as JSON) ```json { "id": 78, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "backport_invoice", "event_data": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 206, "uid": "uid6", "site_id": 132, "customer_id": 244, "subscription_id": 60 } } ``` ##### Change Chargeback Status Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/change-chargeback-status-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `change_chargeback_status` | | `event_data` | [`Change Chargeback Status Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-chargeback-status-event-data) | Required | Example schema for an `change_chargeback_status` event | # Example (as JSON) ```json { "id": 214, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "change_chargeback_status", "event_data": { "chargeback_status": "won" } } ``` ##### Change Invoice Collection Method Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-collection-method-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `change_invoice_collection_method` | | `event_data` | [`Change Invoice Collection Method Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-collection-method-event-data) | Required | Example schema for an `change_invoice_collection_method` event | # Example (as JSON) ```json { "id": 246, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "change_invoice_collection_method", "event_data": { "from_collection_method": "from_collection_method4", "to_collection_method": "to_collection_method8" } } ``` ##### Change Invoice Status Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-status-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `change_invoice_status` | | `event_data` | [`Change Invoice Status Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-status-event-data) | Required | Example schema for an `change_invoice_status` event | # Example (as JSON) ```json { "id": 92, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "change_invoice_status", "event_data": { "gateway_trans_id": "gateway_trans_id2", "amount": "amount8", "from_status": "open", "to_status": "pending", "consolidation_level": "child" } } ``` ##### Create Credit Note Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-credit-note-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `create_credit_note` | | `event_data` | [`Credit Note`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note) | Required | Example schema for an `create_credit_note` event | # Example (as JSON) ```json { "id": 28, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "create_credit_note", "event_data": { "uid": "uid6", "site_id": 132, "customer_id": 244, "subscription_id": 60, "number": "number6" } } ``` ##### Create Debit Note Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-debit-note-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `create_debit_note` | | `event_data` | [`Debit Note`](https://developers.maxio.com/http/advanced-billing-api/models/structures/debit-note) | Required | Example schema for an `create_debit_note` event | # Example (as JSON) ```json { "id": 98, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "create_debit_note", "event_data": { "uid": "uid6", "site_id": 132, "customer_id": 244, "subscription_id": 60, "number": 64 } } ``` ##### Failed Payment Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/failed-payment-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `failed_payment` | | `event_data` | [`Failed Payment Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/failed-payment-event-data) | Required | Example schema for an `failed_payment` event | # Example (as JSON) ```json { "id": 120, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "failed_payment", "event_data": { "amount_in_cents": 220, "applied_amount": 194, "memo": "memo0", "payment_method": "cash", "transaction_id": 78 } } ``` ##### Issue Invoice Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-invoice-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `issue_invoice` | | `event_data` | [`Issue Invoice Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-invoice-event-data) | Required | Example schema for an `issue_invoice` event | # Example (as JSON) ```json { "id": 130, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "issue_invoice", "event_data": { "consolidation_level": "child", "from_status": "open", "to_status": "pending", "due_amount": "due_amount8", "total_amount": "total_amount2" } } ``` ##### Refund Invoice Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `refund_invoice` | | `event_data` | [`Refund Invoice Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice-event-data) | Required | Example schema for an `refund_invoice` event | # Example (as JSON) ```json { "id": 54, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "refund_invoice", "event_data": { "apply_credit": false, "consolidation_level": "child", "credit_note_attributes": { "uid": "uid2", "site_id": 72, "customer_id": 184, "subscription_id": 0, "number": "number0" }, "memo": "memo0", "original_amount": "original_amount0", "payment_id": 204, "refund_amount": "refund_amount8", "refund_id": 248, "transaction_time": "2016-03-13T12:52:32.123Z" } } ``` ##### Remove Payment Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/remove-payment-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `remove_payment` | | `event_data` | [`Remove Payment Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/remove-payment-event-data) | Required | Example schema for an `remove_payment` event | # Example (as JSON) ```json { "id": 236, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "remove_payment", "event_data": { "transaction_id": 78, "memo": "memo0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z", "payment_method": { "type": "apple_pay" }, "prepayment": false, "original_amount": "original_amount0" } } ``` ##### Void Invoice Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `void_invoice` | | `event_data` | [`Void Invoice Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-event-data) | Required | Example schema for an `void_invoice` event | # Example (as JSON) ```json { "id": 16, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "void_invoice", "event_data": { "credit_note_attributes": { "uid": "uid2", "site_id": 72, "customer_id": 184, "subscription_id": 0, "number": "number0" }, "memo": "memo0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z", "is_advance_invoice": false, "reason": "reason2" } } ``` ##### Void Remainder Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/void-remainder-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `timestamp` | `DateTime` | Required | - | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | | `event_type` | [`Invoice Event Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) | Required | **Default**: `void_remainder` | | `event_data` | [`Void Remainder Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-remainder-event-data) | Required | Example schema for an `void_remainder` event | # Example (as JSON) ```json { "id": 128, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_type": "void_remainder", "event_data": { "credit_note_attributes": { "uid": "uid2", "site_id": 72, "customer_id": 184, "subscription_id": 0, "number": "number0" }, "memo": "memo0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z" } } ``` ##### List Invoice Events Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-invoice-events-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `events` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/invoice-event) | Optional | - | | `page` | `Number` | Optional | - | | `per_page` | `Number` | Optional | - | | `total_pages` | `Number` | Optional | - | # Example (as JSON) ```json { "events": [ { "event_type": "apply_credit_note", "id": 214, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 }, "event_data": { "uid": "uid6", "credit_note_number": "credit_note_number0", "credit_note_uid": "credit_note_uid0", "original_amount": "original_amount0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z", "memo": "memo0", "role": "role0", "consolidated_invoice": false, "applied_credit_notes": [ { "uid": "uid4", "number": "number8" }, { "uid": "uid4", "number": "number8" }, { "uid": "uid4", "number": "number8" } ] } } ], "page": 184, "per_page": 96, "total_pages": 194 } ``` ##### Apple Pay Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/apple-pay-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | The Chargify-assigned ID of the Apple Pay payment profile. | | `first_name` | `String` | Optional | The first name of the Apple Pay account holder | | `last_name` | `String` | Optional | The last name of the Apple Pay account holder | | `customer_id` | `Number` | Optional | The Chargify-assigned ID for the customer record to which the Apple Pay account belongs | | `current_vault` | [`Apple Pay Vault`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/apple-pay-vault) | Optional | The vault that stores the payment profile with the provided vault_token. | | `vault_token` | `String` | Optional | The “token” provided by your vault storage for an already stored payment profile | | `billing_address` | `String` | Optional | The current billing street address for the Apple Pay account | | `billing_city` | `String` | Optional | The current billing address city for the Apple Pay account | | `billing_state` | `String` | Optional | The current billing address state for the Apple Pay account | | `billing_zip` | `String` | Optional | The current billing address zip code for the Apple Pay account | | `billing_country` | `String` | Optional | The current billing address country for the Apple Pay account | | `customer_vault_token` | `String` | Optional | - | | `billing_address_2` | `String` | Optional | The current billing street address, second line, for the Apple Pay account | | `payment_type` | [`Payment Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type) | Required | **Default**: `apple_pay` | | `site_gateway_setting_id` | `Number` | Optional | - | | `gateway_handle` | `String` | Optional | - | | `created_at` | `DateTime` | Optional | A timestamp indicating when this payment profile was created | | `updated_at` | `DateTime` | Optional | A timestamp indicating when this payment profile was last updated | # Example (as JSON) ```json { "payment_type": "apple_pay", "id": 60, "first_name": "first_name2", "last_name": "last_name0", "customer_id": 98, "current_vault": "braintree_blue" } ``` ##### Bank Account Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | The Chargify-assigned ID of the stored bank account. This value can be used as an input to payment_profile_id when creating a subscription, in order to re-use a stored payment profile for the same customer. | | `first_name` | `String` | Optional | The first name of the bank account holder | | `last_name` | `String` | Optional | The last name of the bank account holder | | `customer_id` | `Number` | Optional | The Chargify-assigned ID for the customer record to which the bank account belongs | | `current_vault` | [`Bank Account Vault`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-vault) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | | `vault_token` | `String` | Optional | The "token" provided by your vault storage for an already stored payment profile | | `billing_address` | `String` | Optional | The current billing street address for the bank account | | `billing_city` | `String` | Optional | The current billing address city for the bank account | | `billing_state` | `String` | Optional | The current billing address state for the bank account | | `billing_zip` | `String` | Optional | The current billing address zip code for the bank account | | `billing_country` | `String` | Optional | The current billing address country for the bank account | | `customer_vault_token` | `String` | Optional | (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token. | | `billing_address_2` | `String` | Optional | The current billing street address, second line, for the bank account | | `bank_name` | `String` | Optional | The bank where the account resides | | `masked_bank_routing_number` | `String` | Optional | A string representation of the stored bank routing number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account. | | `masked_bank_account_number` | `String` | Optional | A string representation of the stored bank account number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). | | `bank_account_type` | [`Bank Account Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-type) | Optional | Defaults to checking | | `bank_account_holder_type` | [`Bank Account Holder Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-holder-type) | Optional | Defaults to personal | | `payment_type` | [`Payment Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type) | Required | **Default**: `bank_account` | | `verified` | `Boolean` | Optional | Denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account.

**Default**: `false` | | `site_gateway_setting_id` | `Number` | Optional | - | | `gateway_handle` | `String` | Optional | - | | `created_at` | `DateTime` | Optional | A timestamp indicating when this payment profile was created | | `updated_at` | `DateTime` | Optional | A timestamp indicating when this payment profile was last updated | # Example (as JSON) ```json { "payment_type": "bank_account", "verified": false, "id": 188, "first_name": "first_name6", "last_name": "last_name4", "customer_id": 226, "current_vault": "authorizenet" } ``` ##### Credit Card Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-card-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | The Chargify-assigned ID of the stored card. This value can be used as an input to payment_profile_id when creating a subscription, in order to re-use a stored payment profile for the same customer. | | `first_name` | `String` | Optional | The first name of the card holder. | | `last_name` | `String` | Optional | The last name of the card holder. | | `masked_card_number` | `String` | Optional | A string representation of the credit card number with all but the last 4 digits masked with X’s (e.g., ‘XXXX-XXXX-XXXX-1234’). | | `card_type` | [`Card Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/card-type) | Optional | The type of card used. | | `expiration_month` | `Number` | Optional | An integer representing the expiration month of the card(1 – 12). | | `expiration_year` | `Number` | Optional | An integer representing the 4-digit expiration year of the card(e.g., ‘2012’). | | `customer_id` | `Number` | Optional | The Chargify-assigned id for the customer record to which the card belongs. | | `current_vault` | [`Credit Card Vault`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-card-vault) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | | `vault_token` | `String` | Optional | The “token” provided by your vault storage for an already stored payment profile. | | `billing_address` | `String` | Optional | The current billing street address for the card. | | `billing_city` | `String` | Optional | The current billing address city for the card. | | `billing_state` | `String` | Optional | The current billing address state for the card. | | `billing_zip` | `String` | Optional | The current billing address zip code for the card. | | `billing_country` | `String` | Optional | The current billing address country for the card. | | `customer_vault_token` | `String` | Optional | (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token. | | `billing_address_2` | `String` | Optional | The current billing street address, second line, for the card. | | `payment_type` | [`Payment Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type) | Required | **Default**: `credit_card` | | `disabled` | `Boolean` | Optional | - | | `chargify_token` | `String` | Optional | Token received after sending billing information using Maxio.js (formerly Chargify.js). This token will only be received if passed as a sole attribute of credit_card_attributes (e.g., tok_9g6hw85pnpt6knmskpwp4ttt). | | `site_gateway_setting_id` | `Number` | Optional | - | | `gateway_handle` | `String` | Optional | An identifier of connected gateway. | | `created_at` | `DateTime` | Optional | A timestamp indicating when this payment profile was created | | `updated_at` | `DateTime` | Optional | A timestamp indicating when this payment profile was last updated | # Example (as JSON) ```json { "id": 10088716, "first_name": "Test", "last_name": "Subscription", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 1, "expiration_year": 2022, "customer_id": 14543792, "current_vault": "bogus", "vault_token": "1", "billing_address": "123 Montana Way", "billing_city": "Billings", "billing_state": "MT", "billing_zip": "59101", "billing_country": "US", "customer_vault_token": null, "billing_address_2": "", "payment_type": "credit_card", "site_gateway_setting_id": 1, "gateway_handle": null } ``` ##### Paypal Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/paypal-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | The Chargify-assigned ID of the stored PayPal payment profile. | | `first_name` | `String` | Optional | The first name of the PayPal account holder | | `last_name` | `String` | Optional | The last name of the PayPal account holder | | `customer_id` | `Number` | Optional | The Chargify-assigned id for the customer record to which the PayPal account belongs | | `current_vault` | [`Pay Pal Vault`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pay-pal-vault) | Optional | The vault that stores the payment profile with the provided vault_token. | | `vault_token` | `String` | Optional | The “token” provided by your vault storage for an already stored payment profile | | `billing_address` | `String` | Optional | The current billing street address for the PayPal account | | `billing_city` | `String` | Optional | The current billing address city for the PayPal account | | `billing_state` | `String` | Optional | The current billing address state for the PayPal account | | `billing_zip` | `String` | Optional | The current billing address zip code for the PayPal account | | `billing_country` | `String` | Optional | The current billing address country for the PayPal account | | `customer_vault_token` | `String` | Optional | - | | `billing_address_2` | `String` | Optional | The current billing street address, second line, for the PayPal account | | `payment_type` | [`Payment Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type) | Required | **Default**: `paypal_account` | | `site_gateway_setting_id` | `Number` | Optional | - | | `gateway_handle` | `String` | Optional | - | | `paypal_email` | `String` | Optional | - | | `created_at` | `DateTime` | Optional | A timestamp indicating when this payment profile was created | | `updated_at` | `DateTime` | Optional | A timestamp indicating when this payment profile was last updated | # Example (as JSON) ```json { "payment_type": "paypal_account", "id": 10, "first_name": "first_name0", "last_name": "last_name8", "customer_id": 48, "current_vault": "moduslink" } ``` ##### Account Balance Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `balance_in_cents` | `Long` | Optional | The balance in cents. | | `automatic_balance_in_cents` | `Long` | Optional | The automatic balance in cents. | | `remittance_balance_in_cents` | `Long` | Optional | The remittance balance in cents. | # Example (as JSON) ```json { "balance_in_cents": 16, "automatic_balance_in_cents": 226, "remittance_balance_in_cents": 62 } ``` ##### Account Balances Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balances # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `open_invoices` | [`Account Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) | Optional | The balance, in cents, of the sum of the subscription's open, payable invoices. | | `pending_invoices` | [`Account Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) | Optional | The balance, in cents, of the sum of the subscription's pending, payable invoices. | | `pending_discounts` | [`Account Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) | Optional | The balance, in cents, of the subscription's Pending Discount account. | | `service_credits` | [`Account Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) | Optional | The balance, in cents, of the subscription's Service Credit account. | | `prepayments` | [`Account Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) | Optional | The balance, in cents, of the subscription's Prepayment account. | # Example (as JSON) ```json { "open_invoices": { "balance_in_cents": 40, "automatic_balance_in_cents": 202, "remittance_balance_in_cents": 170 }, "pending_invoices": { "balance_in_cents": 0, "automatic_balance_in_cents": 242, "remittance_balance_in_cents": 46 }, "pending_discounts": { "balance_in_cents": 88, "automatic_balance_in_cents": 154, "remittance_balance_in_cents": 134 }, "service_credits": { "balance_in_cents": 84, "automatic_balance_in_cents": 70, "remittance_balance_in_cents": 38 }, "prepayments": { "balance_in_cents": 192, "automatic_balance_in_cents": 178, "remittance_balance_in_cents": 146 } } ``` ##### ACH Agreement Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/ach-agreement (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `agreement_terms` | `String` | Optional | (Required when providing ACH agreement params) The ACH authorization agreement terms. | | `authorizer_first_name` | `String` | Optional | (Required when providing ACH agreement params) The first name of the person authorizing the ACH agreement. | | `authorizer_last_name` | `String` | Optional | (Required when providing ACH agreement params) The last name of the person authorizing the ACH agreement. | | `ip_address` | `String` | Optional | (Required when providing ACH agreement params) The IP address of the person authorizing the ACH agreement. | # Example (as JSON) ```json { "agreement_terms": "agreement_terms4", "authorizer_first_name": "authorizer_first_name2", "authorizer_last_name": "authorizer_last_name2", "ip_address": "ip_address2" } ``` ##### Activate Event-Based Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/activate-event-based-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point_id` | `Number` | Optional | The Chargify id of the price point | | `billing_schedule` | [`Billing Schedule`](https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-schedule) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | | `custom_price` | [`Component Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-custom-price) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | # Example (as JSON) ```json { "price_point_id": 44, "billing_schedule": { "initial_billing_at": "2016-03-13" }, "custom_price": { "tax_included": false, "pricing_scheme": "stairstep", "interval": 66, "interval_unit": "day", "list_price_point_id": 174, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } } ``` ##### Activate Subscription Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/activate-subscription-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `revert_on_failure` | `Boolean` | Optional | You may choose how to handle the activation failure. `true` means do not change the subscription’s state and billing period. `false` means to continue through with the activation and enter an end-of-life state. If this parameter is omitted or `null` is passed it will default to the value set in the site settings (default: `true`). | # Example (as JSON) ```json { "revert_on_failure": false } ``` ##### Add Coupons Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/add-coupons-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `codes` | `array` | Optional | - | # Example (as JSON) ```json { "codes": [ "codes0", "codes1" ] } ``` ##### Add Subscription to a Group Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/add-subscription-to-a-group # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `group` | [`Group Settings`](https://developers.maxio.com/http/advanced-billing-api/models/structures/group-settings) | Optional | - | # Example (as JSON) ```json { "group": { "target": { "type": "parent", "id": 236 }, "billing": { "accrue": false, "align_date": false, "prorate": false } } } ``` ##### Address Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/address-change # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `before` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Required | - | | `after` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Required | - | # Example (as JSON) ```json { "before": { "street": "street0", "line2": "line24", "city": "city0", "state": "state6", "zip": "zip4" }, "after": { "street": "street2", "line2": "line26", "city": "city8", "state": "state2", "zip": "zip4" } } ``` ##### Aggregated Entitlement Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/aggregated-entitlement One entitlement in a subscriber's aggregated entitlements list. Entries are aggregated per (feature key, periodicity window), not per feature key alone — a `usage_limit` feature granted with two different periodicities yields two entries sharing one `feature_key`. Use `periodicity_key` to identify an entry uniquely. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `feature_key` | `String` | Optional | The feature's key, prefixed by kind: `feature.*` for `access_right`, `usage.*` for `usage_limit`, `service.*` for `service_right`. | | `periodicity_key` | `String` | Optional | Uniquely identifies this aggregated entry: the prefixed feature key, suffixed with `:{interval}:{unit}` when the entitlement has a periodicity window. Equal to `feature_key` when `periodicity` is `null`. | | `name` | `String` | Optional | - | | `type` | [`Feature Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-kind) | Optional | The behavior of a feature:

- `access_right`: a boolean entitlement — a subscriber either has access or does not.
- `usage_limit`: a quantified allowance measured over a recurring period (for example, "10,000 API calls per month").
- `service_right`: a free-form value (text, boolean, or number) that isn't a simple access flag or a metered limit. | | `value` | [`Boolean \| Decimal \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/aggregated-entitlement-value) | Optional | The aggregated value, coerced according to `type`: a boolean for `access_right` (and boolean `service_right`), a number for `usage_limit` (and numeric `service_right`), or a string for text `service_right`. | | `enabled` | `Boolean` | Optional | `true` only when the aggregated value is truthy for this feature's kind, and the subscription is in a live state (`active`, `trialing`, `assessing`, `past_due`, or `soft_failure`). `false` otherwise — including `awaiting_signup`, canceled, expired, and on-hold subscriptions. Entitlements deliberately stay enabled through dunning. | | `periodicity` | [`Aggregated Entitlement Periodicity`](https://developers.maxio.com/http/advanced-billing-api/models/structures/aggregated-entitlement-periodicity) | Optional | - | | `source_products` | `array` | Optional | The names of the products/components contributing to this entitlement. For `access_right` features, only contributors that granted `true` are listed. | # Example (as JSON) ```json { "feature_key": "feature.sso", "periodicity_key": "usage.api_calls:1:month", "name": "name4", "type": "access_right", "value": true } ``` ##### Aggregated Entitlement Periodicity Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/aggregated-entitlement-periodicity # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `interval` | `Number` | Optional | - | | `unit` | [`Entitlement Periodicity Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/entitlement-periodicity-unit) | Optional | The recurring window over which a `usage_limit` feature's allowance resets. | # Example (as JSON) ```json { "interval": 2, "unit": "hour" } ``` ##### Aggregated Entitlements Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/aggregated-entitlements-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Required | - | | `customer_id` | `Number` | Required | - | | `status` | `String` | Required | The subscription's current state, e.g. `active`, `trialing`, `canceled`. | | `entitlements` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/aggregated-entitlement) | Required | - | # Example (as JSON) ```json { "subscription_id": 10, "customer_id": 194, "status": "status6", "entitlements": [ { "feature_key": "feature.sso", "periodicity_key": "usage.api_calls:1:month", "name": "name6", "type": "service_right", "value": true } ] } ``` ##### Agreement Acceptance Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/agreement-acceptance Required when creating a subscription with Maxio Payments. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `ip_address` | `String` | Optional | Required when providing agreement acceptance params. | | `terms_url` | `String` | Optional | Required when creating a subscription with Maxio Payments. Either terms_url or privacy_policy_url is required when providing agreement_acceptance params. | | `privacy_policy_url` | `String` | Optional | - | | `return_refund_policy_url` | `String` | Optional | - | | `delivery_policy_url` | `String` | Optional | - | | `secure_checkout_policy_url` | `String` | Optional | - | # Example (as JSON) ```json { "ip_address": "ip_address2", "terms_url": "terms_url0", "privacy_policy_url": "privacy_policy_url0", "return_refund_policy_url": "return_refund_policy_url4", "delivery_policy_url": "delivery_policy_url8" } ``` ##### Allocate Components Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/allocate-components # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `proration_upgrade_scheme` | `String` | Optional | - | | `proration_downgrade_scheme` | `String` | Optional | - | | `allocations` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-allocation) | Optional | - | | `accrue_charge` | `Boolean` | Optional | - | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `payment_collection_method` | [`Collection Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method) | Optional | (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription. | | `initiate_dunning` | `Boolean` | Optional | If true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. | # Example (as JSON) ```json { "proration_upgrade_scheme": "proration_upgrade_scheme2", "proration_downgrade_scheme": "proration_downgrade_scheme0", "allocations": [ { "quantity": 26.48, "decimal_quantity": "decimal_quantity8", "previous_quantity": 55.5, "decimal_previous_quantity": "decimal_previous_quantity2", "component_id": 242, "memo": "memo6" }, { "quantity": 26.48, "decimal_quantity": "decimal_quantity8", "previous_quantity": 55.5, "decimal_previous_quantity": "decimal_previous_quantity2", "component_id": 242, "memo": "memo6" } ], "accrue_charge": false, "upgrade_charge": "full" } ``` ##### Allocation Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `allocation_id` | `Number` | Optional | The allocation unique ID | | `component_id` | `Number` | Optional | The integer component ID for the allocation. This references a component that you have created in your Product setup. | | `component_handle` | `String` | Optional | The handle of the component. This references a component that you have created in your Product setup. | | `subscription_id` | `Number` | Optional | The integer subscription ID for the allocation. This references a unique subscription in your Site. | | `quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-quantity) | Optional | The allocated quantity set into effect by the allocation. String for components supporting fractional quantities | | `previous_quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-previous-quantity) | Optional | The allocated quantity that was in effect before this allocation was created. String for components supporting fractional quantities | | `memo` | `String` | Optional | The memo passed when the allocation was created | | `timestamp` | `DateTime` | Optional | The time that the allocation was recorded, in ISO 8601 format and UTC timezone, e.g., 2012-11-20T22:00:37Z | | `created_at` | `DateTime` | Optional | Timestamp indicating when this allocation was created | | `proration_upgrade_scheme` | `String` | Optional | The scheme used if the proration was an upgrade. This is only present when the allocation was created mid-period. | | `proration_downgrade_scheme` | `String` | Optional | The scheme used if the proration was a downgrade. This is only present when the allocation was created mid-period. | | `price_point_id` | `Number` | Optional | - | | `price_point_name` | `String` | Optional | - | | `price_point_handle` | `String` | Optional | - | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `previous_price_point_id` | `Number` | Optional | - | | `accrue_charge` | `Boolean` | Optional | If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately. | | `initiate_dunning` | `Boolean` | Optional | If true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `payment` | [`Payment for Allocation`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-for-allocation) | Optional | - | | `expires_at` | `DateTime` | Optional | - | | `used_quantity` | `Long` | Optional | - | | `charge_id` | `Long` | Optional | - | # Example (as JSON) ```json { "allocation_id": 102, "component_id": 144, "component_handle": "component_handle0", "subscription_id": 144, "quantity": 168 } ``` ##### Allocation Expiration Date Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-expiration-date # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `expires_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "expires_at": "2016-03-13T12:52:32.123Z" } ``` ##### Allocation Preview Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `start_date` | `DateTime` | Optional | - | | `end_date` | `DateTime` | Optional | - | | `subtotal_in_cents` | `Long` | Optional | - | | `total_tax_in_cents` | `Long` | Optional | - | | `total_discount_in_cents` | `Long` | Optional | - | | `total_in_cents` | `Long` | Optional | - | | `direction` | [`Allocation Preview Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/allocation-preview-direction) | Optional | - | | `proration_scheme` | `String` | Optional | - | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview-line-item) | Optional | - | | `accrue_charge` | `Boolean` | Optional | - | | `allocations` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview-item) | Optional | - | | `period_type` | `String` | Optional | - | | `existing_balance_in_cents` | `Long` | Optional | An integer representing the amount of the subscription's current balance | # Example (as JSON) ```json { "start_date": "2016-03-13T12:52:32.123Z", "end_date": "2016-03-13T12:52:32.123Z", "subtotal_in_cents": 4, "total_tax_in_cents": 128, "total_discount_in_cents": 122 } ``` ##### Allocation Preview Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Optional | - | | `subscription_id` | `Number` | Optional | - | | `quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-preview-item-quantity) | Optional | - | | `previous_quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-preview-item-previous-quantity) | Optional | - | | `memo` | `String` | Optional | - | | `timestamp` | `String` | Optional | - | | `proration_upgrade_scheme` | `String` | Optional | - | | `proration_downgrade_scheme` | `String` | Optional | - | | `accrue_charge` | `Boolean` | Optional | - | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `price_point_id` | `Number` | Optional | - | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `previous_price_point_id` | `Number` | Optional | - | | `price_point_handle` | `String` | Optional | - | | `price_point_name` | `String` | Optional | - | | `component_handle` | `String` | Optional | - | # Example (as JSON) ```json { "component_id": 54, "subscription_id": 54, "quantity": 78, "previous_quantity": 192, "memo": "memo6" } ``` ##### Allocation Preview Line Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview-line-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `transaction_type` | [`Line Item Transaction Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/line-item-transaction-type) | Optional | A handle for the line item transaction type | | `kind` | [`Allocation Preview Line Item Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/allocation-preview-line-item-kind) | Optional | A handle for the line item kind for allocation preview | | `amount_in_cents` | `Long` | Optional | - | | `memo` | `String` | Optional | - | | `discount_amount_in_cents` | `Long` | Optional | - | | `taxable_amount_in_cents` | `Long` | Optional | - | | `component_id` | `Number` | Optional | - | | `component_handle` | `String` | Optional | - | | `direction` | [`Allocation Preview Direction`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/allocation-preview-direction) | Optional | Visible when using Fine-grained Component Control. | # Example (as JSON) ```json { "transaction_type": "credit", "kind": "quantity_based_component", "amount_in_cents": 24, "memo": "memo6", "discount_amount_in_cents": 172 } ``` ##### Allocation Preview Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `allocation_preview` | [`Allocation Preview`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-preview) | Required | - | # Example (as JSON) ```json { "allocation_preview": { "start_date": "2016-03-13T12:52:32.123Z", "end_date": "2016-03-13T12:52:32.123Z", "subtotal_in_cents": 240, "total_tax_in_cents": 108, "total_discount_in_cents": 142 } } ``` ##### Allocation Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `allocation` | [`Allocation`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation) | Optional | - | # Example (as JSON) ```json { "allocation": { "allocation_id": 238, "component_id": 8, "component_handle": "component_handle8", "subscription_id": 8, "quantity": 32 } } ``` ##### Allocation Settings Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-settings # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `accrue_charge` | `String` | Optional | Either "true" or "false". | # Example (as JSON) ```json { "upgrade_charge": "none", "downgrade_credit": "prorated", "accrue_charge": "accrue_charge0" } ``` ##### Applied Credit Note Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/applied-credit-note-data # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | The UID of the credit note | | `number` | `String` | Optional | The number of the credit note | # Example (as JSON) ```json { "uid": "uid2", "number": "number0" } ``` ##### Apply Credit Note Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-credit-note-event-data Example schema for an `apply_credit_note` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Required | Unique identifier for the credit note application. It is generated automatically by Chargify and has the prefix "cdt_" followed by alphanumeric characters. | | `credit_note_number` | `String` | Required | A unique, identifying string that appears on the credit note and in places it is referenced. | | `credit_note_uid` | `String` | Required | Unique identifier for the credit note. It is generated automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters. | | `original_amount` | `String` | Required | The full, original amount of the credit note. | | `applied_amount` | `String` | Required | The amount of the credit note applied to invoice. | | `transaction_time` | `DateTime` | Optional | The time the credit note was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | | `memo` | `String` | Optional | The credit note memo. | | `role` | `String` | Optional | The role of the credit note (e.g. 'general') | | `consolidated_invoice` | `Boolean` | Optional | Shows whether it was applied to consolidated invoice or not. | | `applied_credit_notes` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/applied-credit-note-data) | Optional | List of credit notes applied to children invoices (if consolidated invoice) | # Example (as JSON) ```json { "uid": "uid2", "credit_note_number": "credit_note_number4", "credit_note_uid": "credit_note_uid4", "original_amount": "original_amount6", "applied_amount": "applied_amount6", "transaction_time": "2016-03-13T12:52:32.123Z", "memo": "memo6", "role": "role4", "consolidated_invoice": false, "applied_credit_notes": [ { "uid": "uid4", "number": "number8" }, { "uid": "uid4", "number": "number8" } ] } ``` ##### Apply Debit Note Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-debit-note-event-data Example schema for an `apply_debit_note` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `debit_note_number` | `String` | Required | A unique, identifying string that appears on the debit note and in places it is referenced. | | `debit_note_uid` | `String` | Required | Unique identifier for the debit note. It is generated automatically by Chargify and has the prefix "db_" followed by alphanumeric characters. | | `original_amount` | `String` | Required | The full, original amount of the debit note. | | `applied_amount` | `String` | Required | The amount of the debit note applied to invoice. | | `memo` | `String` | Optional | The debit note memo. | | `transaction_time` | `DateTime` | Optional | The time the debit note was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | # Example (as JSON) ```json { "debit_note_number": "debit_note_number0", "debit_note_uid": "debit_note_uid6", "original_amount": "original_amount4", "applied_amount": "applied_amount8", "memo": "memo4", "transaction_time": "2016-03-13T12:52:32.123Z" } ``` ##### Apply Payment Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-payment-event-data Example schema for an `apply_payment` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `consolidation_level` | [`Invoice Consolidation Level`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-consolidation-level) | Required | - | | `memo` | `String` | Required | The payment memo | | `original_amount` | `String` | Required | The full, original amount of the payment transaction as a string in full units. Incoming payments can be split amongst several invoices, which will result in a `applied_amount` less than the `original_amount`. Example: A $100.99 payment, of which $40.11 is applied to this invoice, will have an `original_amount` of `"100.99"`. | | `applied_amount` | `String` | Required | The amount of the payment applied to this invoice. Incoming payments can be split amongst several invoices, which will result in a `applied_amount` less than the `original_amount`. Example: A $100.99 payment, of which $40.11 is applied to this invoice, will have an `applied_amount` of `"40.11"`. | | `transaction_time` | `DateTime` | Required | The time the payment was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | | `payment_method` | [`Payment Method Apple Pay \| Payment Method Bank Account \| Payment Method Credit Card \| Payment Method External \| Payment Method Paypal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/invoice-event-payment) | Required | A nested data structure detailing the method of payment | | `transaction_id` | `Number` | Optional | The Chargify id of the original payment | | `parent_invoice_number` | `Number` | Optional | - | | `remaining_prepayment_amount` | `String` | Optional | - | | `prepayment` | `Boolean` | Optional | - | | `external` | `Boolean` | Optional | - | # Example (as JSON) ```json { "consolidation_level": "child", "memo": "memo8", "original_amount": "original_amount8", "applied_amount": "applied_amount4", "transaction_time": "2016-03-13T12:52:32.123Z", "payment_method": { "type": "apple_pay" }, "transaction_id": 196, "parent_invoice_number": 174, "remaining_prepayment_amount": "remaining_prepayment_amount6", "prepayment": false, "external": false } ``` ##### Attribute Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/attribute-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `attribute` | `array` | Required | - | # Example (as JSON) ```json { "attribute": [ "attribute6", "attribute7" ] } ``` ##### Auto Resume Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/auto-resume # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `automatically_resume_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "automatically_resume_at": "2016-03-13T12:52:32.123Z" } ``` ##### Available Actions Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/available-actions # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `send_email` | [`Send Email`](https://developers.maxio.com/http/advanced-billing-api/models/structures/send-email) | Optional | - | # Example (as JSON) ```json { "send_email": { "can_execute": false, "url": "url0" } } ``` ##### Bank Account Attributes Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-attributes # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `chargify_token` | `String` | Optional | - | | `bank_name` | `String` | Optional | (Required when creating a subscription with ACH or GoCardless) The name of the bank where the customer’s account resides | | `bank_routing_number` | `String` | Optional | (Required when creating a subscription with ACH; optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API. | | `bank_account_number` | `String` | Optional | (Required when creating a subscription with ACH. Required when creating a subscription with GoCardless and bank_iban is blank) The customerʼs bank account number | | `bank_account_type` | [`Bank Account Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-type) | Optional | Defaults to checking | | `bank_branch_code` | `String` | Optional | (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided. | | `bank_iban` | `String` | Optional | (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided. | | `bank_account_holder_type` | [`Bank Account Holder Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-holder-type) | Optional | Defaults to personal | | `payment_type` | [`Payment Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type) | Optional | - | | `current_vault` | [`Bank Account Vault`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-vault) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | | `vault_token` | `String` | Optional | - | | `customer_vault_token` | `String` | Optional | (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | # Example (as JSON) ```json { "chargify_token": "chargify_token0", "bank_name": "bank_name2", "bank_routing_number": "bank_routing_number8", "bank_account_number": "bank_account_number4", "bank_account_type": "checking" } ``` ##### Bank Account Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile` | [`Bank Account Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-payment-profile) | Required | - | # Example (as JSON) ```json { "payment_profile": { "payment_type": "bank_account", "verified": false, "id": 44, "first_name": "first_name4", "last_name": "last_name2", "customer_id": 82, "current_vault": "authorizenet" } } ``` ##### Bank Account Verification Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-verification # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `deposit_1_in_cents` | `Long` | Optional | - | | `deposit_2_in_cents` | `Long` | Optional | - | # Example (as JSON) ```json { "deposit_1_in_cents": 142, "deposit_2_in_cents": 132 } ``` ##### Bank Account Verification Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-verification-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `bank_account_verification` | [`Bank Account Verification`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-verification) | Required | - | # Example (as JSON) ```json { "bank_account_verification": { "deposit_1_in_cents": 244, "deposit_2_in_cents": 6 } } ``` ##### Base Refund Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/base-refund-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `base` | `array` | Optional | - | # Example (as JSON) ```json { "base": [ { "key1": "val1", "key2": "val2" }, { "key1": "val1", "key2": "val2" }, { "key1": "val1", "key2": "val2" } ] } ``` ##### Base String Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/base-string-error The error is base if it is not directly associated with a single attribute. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `base` | `array` | Optional | - | # Example (as JSON) ```json { "base": [ "base3" ] } ``` ##### Batch Job Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `batchjob` | [`Batch-Job`](https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job) | Required | - | # Example (as JSON) ```json { "batchjob": { "id": 54, "finished_at": "2016-03-13T12:52:32.123Z", "row_count": 62, "created_at": "2016-03-13T12:52:32.123Z", "completed": "completed4" } } ``` ##### Batch-Job Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/batch-job # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `finished_at` | `DateTime` | Optional | - | | `row_count` | `Number` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `completed` | `String` | Optional | - | # Example (as JSON) ```json { "id": 246, "finished_at": "2016-03-13T12:52:32.123Z", "row_count": 254, "created_at": "2016-03-13T12:52:32.123Z", "completed": "completed0" } ``` ##### Billing Manifest Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-manifest # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-manifest-item) | Optional | - | | `total_in_cents` | `Long` | Optional | - | | `total_discount_in_cents` | `Long` | Optional | - | | `total_tax_in_cents` | `Long` | Optional | - | | `subtotal_in_cents` | `Long` | Optional | - | | `start_date` | `DateTime` | Optional | - | | `end_date` | `DateTime` | Optional | - | | `period_type` | `String` | Optional | - | | `existing_balance_in_cents` | `Long` | Optional | - | # Example (as JSON) ```json { "line_items": [ { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 }, { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 }, { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 } ], "total_in_cents": 192, "total_discount_in_cents": 178, "total_tax_in_cents": 172, "subtotal_in_cents": 48 } ``` ##### Billing Manifest Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-manifest-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `transaction_type` | [`Line Item Transaction Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/line-item-transaction-type) | Optional | A handle for the line item transaction type | | `kind` | [`Billing Manifest Line Item Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/billing-manifest-line-item-kind) | Optional | A handle for the billing manifest line item kind | | `amount_in_cents` | `Long` | Optional | - | | `memo` | `String` | Optional | - | | `discount_amount_in_cents` | `Long` | Optional | - | | `taxable_amount_in_cents` | `Long` | Optional | - | | `component_id` | `Number` | Optional | - | | `component_handle` | `String` | Optional | - | | `component_name` | `String` | Optional | - | | `product_id` | `Number` | Optional | - | | `product_handle` | `String` | Optional | - | | `product_name` | `String` | Optional | - | | `period_range_start` | `String` | Optional | - | | `period_range_end` | `String` | Optional | - | # Example (as JSON) ```json { "transaction_type": "info_transaction", "kind": "baseline", "amount_in_cents": 216, "memo": "memo4", "discount_amount_in_cents": 236 } ``` ##### Billing Schedule Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-schedule Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `initial_billing_at` | `Date` | Optional | Custom start date (ISO 8601 date, YYYY-MM-DD) for the component's first billing period. If omitted or null, billing aligns with the product schedule. If provided, date must be on or after the minimum allowed date for the subscription or component. | # Example (as JSON) ```json { "initial_billing_at": "2026-01-01" } ``` ##### Breakouts Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/breakouts # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `plan_amount_in_cents` | `Long` | Optional | - | | `plan_amount_formatted` | `String` | Optional | - | | `usage_amount_in_cents` | `Long` | Optional | - | | `usage_amount_formatted` | `String` | Optional | - | # Example (as JSON) ```json { "plan_amount_in_cents": 68, "plan_amount_formatted": "plan_amount_formatted2", "usage_amount_in_cents": 176, "usage_amount_formatted": "usage_amount_formatted0" } ``` ##### Bulk Components Price Point Assignment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-components-price-point-assignment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `components` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-assignment) | Optional | - | # Example (as JSON) ```json { "components": [ { "component_id": 108, "price_point": "String5" } ] } ``` ##### Bulk Create Product Price Points Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-create-product-price-points-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-price-point) | Required | - | # Example (as JSON) ```json { "price_points": [ { "name": "name2", "price_in_cents": 108, "interval": 92, "interval_unit": "day", "use_site_exchange_rate": true, "handle": "handle8", "trial_price_in_cents": 196, "trial_interval": 250, "trial_interval_unit": "day", "trial_type": "no_obligation" } ] } ``` ##### Bulk Create Product Price Points Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-create-product-price-points-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point) | Optional | - | # Example (as JSON) ```json { "price_points": [ { "id": 40, "name": "name2", "handle": "handle8", "price_in_cents": 108, "interval": 92 } ] } ``` ##### Bulk Create Segments Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-create-segments # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `segments` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-segment) | Optional | **Constraints**: *Maximum Items*: `2000` | # Example (as JSON) ```json { "segments": [ { "segment_property_1_value": "String3", "segment_property_2_value": "String5", "segment_property_3_value": "String3", "segment_property_4_value": "String7", "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" } ] } ] } ``` ##### Bulk Update Segments Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-update-segments # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `segments` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-update-segments-item) | Optional | **Constraints**: *Maximum Items*: `1000` | # Example (as JSON) ```json { "segments": [ { "id": 50, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" } ] }, { "id": 50, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" } ] } ] } ``` ##### Bulk Update Segments Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/bulk-update-segments-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Required | The ID of the segment you want to update. | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-segment-price) | Required | - | # Example (as JSON) ```json { "id": 180, "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" } ] } ``` ##### Calendar Billing Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/calendar-billing (Optional). Cannot be used when also specifying next_billing_at. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `snap_day` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/calendar-billing-snap-day) | Optional | A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. | | `calendar_billing_first_charge` | [`First Charge Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/first-charge-type) | Optional | - | # Example (as JSON) ```json { "snap_day": 210, "calendar_billing_first_charge": "prorated" } ``` ##### Cancel Grouped Subscriptions Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/cancel-grouped-subscriptions-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `charge_unbilled_usage` | `Boolean` | Optional | - | # Example (as JSON) ```json { "charge_unbilled_usage": false } ``` ##### Cancellation Options Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/cancellation-options # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `cancellation_message` | `String` | Optional | An indication as to why the subscription is being canceled. For your internal use. | | `reason_code` | `String` | Optional | The reason code associated with the cancellation. Use the [List Reason Codes](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/reason-codes/list-reason-codes) endpoint to retrieve the reason codes associated with your site. | | `cancel_at_end_of_period` | `Boolean` | Optional | When true, the subscription is cancelled at the current period end instead of immediately. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | | `scheduled_cancellation_at` | `DateTime` | Optional | Schedules the cancellation on the provided date. This option is not applicable for prepaid subscriptions. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | | `refund_prepayment_account_balance` | `Boolean` | Optional | Applies to prepaid subscriptions. When true, which is the default, the remaining prepaid balance is refunded as part of cancellation processing. When false, prepaid balance is not refunded as part of cancellation processing. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | # Example (as JSON) ```json { "cancellation_message": "cancellation_message0", "reason_code": "reason_code6", "cancel_at_end_of_period": false, "scheduled_cancellation_at": "2016-03-13T12:52:32.123Z", "refund_prepayment_account_balance": false } ``` ##### Cancellation Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/cancellation-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription` | [`Cancellation Options`](https://developers.maxio.com/http/advanced-billing-api/models/structures/cancellation-options) | Required | - | # Example (as JSON) ```json { "subscription": { "cancellation_message": "cancellation_message2", "reason_code": "reason_code8", "cancel_at_end_of_period": false, "scheduled_cancellation_at": "2016-03-13T12:52:32.123Z", "refund_prepayment_account_balance": false } } ``` ##### Change Chargeback Status Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/change-chargeback-status-event-data Example schema for an `change_chargeback_status` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `chargeback_status` | [`Chargeback Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/chargeback-status) | Required | - | # Example (as JSON) ```json { "chargeback_status": "open" } ``` ##### Change Invoice Collection Method Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-collection-method-event-data Example schema for an `change_invoice_collection_method` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `from_collection_method` | `String` | Required | The previous collection method of the invoice. | | `to_collection_method` | `String` | Required | The new collection method of the invoice. | # Example (as JSON) ```json { "from_collection_method": "from_collection_method4", "to_collection_method": "to_collection_method2" } ``` ##### Change Invoice Status Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-status-event-data Example schema for an `change_invoice_status` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `gateway_trans_id` | `String` | Optional | Identifier for the transaction within the payment gateway. | | `amount` | `String` | Optional | The monetary value associated with the linked payment, expressed in dollars. | | `from_status` | [`Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-status) | Required | The status of the invoice before any changes occurred. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | | `to_status` | [`Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-status) | Required | The updated status of the invoice after changes have been made. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | | `consolidation_level` | [`Invoice Consolidation Level`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-consolidation-level) | Optional | - | # Example (as JSON) ```json { "gateway_trans_id": "gateway_trans_id2", "amount": "amount2", "from_status": "draft", "to_status": "pending", "consolidation_level": "none" } ``` ##### Chargify EBB Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/chargify-ebb # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `timestamp` | `DateTime` | Optional | This timestamp determines what billing period the event will be billed in. If your request payload does not include it, Chargify will add `chargify.timestamp` to the event payload and set the value to `now`. | | `id` | `String` | Optional | A unique ID set by Chargify. This field is reserved. If `chargify.id` is present in the request payload, it will be overwritten. | | `created_at` | `DateTime` | Optional | An ISO-8601 timestamp, set by Chargify at the time each event is recorded. This field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten. | | `uniqueness_token` | `String` | Optional | User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days.

**Constraints**: *Maximum Length*: `64` | | `subscription_id` | `Number` | Optional | Id of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_id` if you configured `chargify.subscription_id` as Subscription Identifier in your Event Stream. | | `subscription_reference` | `String` | Optional | Reference of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_reference` if you configured `chargify.subscription_reference` as Subscription Identifier in your Event Stream. | # Example (as JSON) ```json { "timestamp": "2016-03-13T12:52:32.123Z", "id": "id4", "created_at": "2016-03-13T12:52:32.123Z", "uniqueness_token": "uniqueness_token0", "subscription_id": 200 } ``` ##### Chjs Tokenization Failure Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/chjs-tokenization-failure # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `String` | Required | - | | `payment_profile_params` | [`Payment Profile Params`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-params) | Optional | PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. | # Example (as JSON) ```json { "errors": "errors2", "payment_profile_params": { "first_name": "first_name2", "last_name": "last_name0", "card_type": "card_type2" } } ``` ##### Chjs Tokenization Success Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/chjs-tokenization-success # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile` | [`Tokenized Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/tokenized-payment-profile) | Required | - | | `gateway_customer_id` | `Number` | Optional | - | # Example (as JSON) ```json { "payment_profile": { "id": 44, "vault_token": "vault_token6", "gateway_handle": "gateway_handle4", "customer_vault_token": "customer_vault_token2" }, "gateway_customer_id": 44 } ``` ##### Clone Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/clone-component-price-point # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | - | | `handle` | `String` | Optional | - | # Example (as JSON) ```json { "name": "name2", "handle": "handle8" } ``` ##### Clone Component Price Point Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/clone-component-price-point-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point` | [`Clone Component Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/clone-component-price-point) | Required | - | # Example (as JSON) ```json { "price_point": { "name": "name0", "handle": "handle6" } } ``` ##### Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | The unique ID assigned to the component by Chargify. This ID can be used to fetch the component from the API. | | `name` | `String` | Optional | The name of the Component, suitable for display on statements. e.g., Text Messages. | | `handle` | `String` | Optional | The component API handle | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | - | | `unit_name` | `String` | Optional | The name of the unit that the component’s usage is measured in. e.g., message | | `unit_price` | `String` | Optional | The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null. | | `product_family_id` | `Number` | Optional | The id of the Product Family to which the Component belongs | | `product_family_name` | `String` | Optional | The name of the Product Family to which the Component belongs | | `product_family_handle` | `String` | Optional | The handle of the Product Family to which the Component belongs | | `price_per_unit_in_cents` | `Long` | Optional | deprecated - use unit_price instead. | | `kind` | [`Component Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/component-kind) | Optional | A handle for the component type | | `archived` | `Boolean` | Optional | Boolean flag describing whether a component is archived or not. | | `description` | `String` | Optional | The description of the component. | | `default_price_point_id` | `Number` | Optional | - | | `overage_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price) | Optional | Applicable only to prepaid usage components. An array of overage price brackets. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price) | Optional | An array of price brackets. If the component uses the ‘per_unit’ pricing scheme, this array will be empty. | | `price_point_count` | `Number` | Optional | Count for the number of price points associated with the component | | `price_points_url` | `String` | Optional | URL that points to the location to read the existing price points via GET request | | `default_price_point_name` | `String` | Optional | - | | `taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | | `tax_code` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `recurring` | `Boolean` | Optional | - | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `created_at` | `DateTime` | Optional | Timestamp indicating when this component was created | | `updated_at` | `DateTime` | Optional | Timestamp indicating when this component was updated | | `archived_at` | `DateTime` | Optional | Timestamp indicating when this component was archived | | `hide_date_range_on_invoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | | `allow_fractional_quantities` | `Boolean` | Optional | - | | `item_category` | [`Item Category`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/item-category) | Optional | One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other | | `use_site_exchange_rate` | `Boolean` | Optional | - | | `accounting_code` | `String` | Optional | E.g. Internal ID or SKU Number | | `event_based_billing_metric_id` | `Number` | Optional | (Only for Event Based Components) This is an ID of a metric attached to the component. This metric is used to bill upon collected events. | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component’s default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `unspsc_code` | `String` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | | `features` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item) | Optional | The active feature catalog items attached to this component. Present only when the request includes `include_features=true`. | # Example (as JSON) ```json { "item_category": "Business Software", "id": 24, "name": "name2", "handle": "handle8", "pricing_scheme": "per_unit", "unit_name": "unit_name4" } ``` ##### Component Allocation Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-allocation-change # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `previous_allocation` | `Number` | Required | - | | `new_allocation` | `Number` | Required | - | | `component_id` | `Number` | Required | - | | `component_handle` | `String` | Required | - | | `memo` | `String` | Required | - | | `allocation_id` | `Number` | Required | - | | `allocated_quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/component-allocation-change-allocated-quantity) | Optional | - | # Example (as JSON) ```json { "previous_allocation": 94, "new_allocation": 102, "component_id": 88, "component_handle": "component_handle8", "memo": "memo2", "allocation_id": 158, "allocated_quantity": 104 } ``` ##### Component Allocation Error Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-allocation-error-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Optional | - | | `message` | `String` | Optional | - | | `kind` | `String` | Optional | - | | `on` | `String` | Optional | - | # Example (as JSON) ```json { "component_id": 188, "message": "message0", "kind": "kind8", "on": "on0" } ``` ##### Component Allocation Error 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-allocation-error-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-allocation-error-item) | Optional | - | # Example (as JSON) ```json { "errors": [ { "component_id": 236, "message": "message0", "kind": "kind8", "on": "on0" }, { "component_id": 236, "message": "message0", "kind": "kind8", "on": "on0" }, { "component_id": 236, "message": "message0", "kind": "kind8", "on": "on0" } ] } ``` ##### Component Cost Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-cost-data # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_code_id` | `Number` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `product_id` | `Number` | Optional | - | | `quantity` | `String` | Optional | - | | `amount` | `String` | Optional | - | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `tiers` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-cost-data-rate-tier) | Optional | - | # Example (as JSON) ```json { "component_code_id": 16, "price_point_id": 186, "product_id": 250, "quantity": "quantity8", "amount": "amount4" } ``` ##### Component Cost Data Rate Tier Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-cost-data-rate-tier # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `starting_quantity` | `Number` | Optional | - | | `ending_quantity` | `Number` | Optional | - | | `quantity` | `String` | Optional | - | | `unit_price` | `String` | Optional | - | | `amount` | `String` | Optional | - | # Example (as JSON) ```json { "starting_quantity": 132, "ending_quantity": 106, "quantity": "quantity0", "unit_price": "unit_price2", "amount": "amount6" } ``` ##### Component Currency Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `currency` | `String` | Optional | - | | `price` | `String` | Optional | - | | `formatted_price` | `String` | Optional | - | | `price_id` | `Number` | Optional | - | | `price_point_id` | `Number` | Optional | - | # Example (as JSON) ```json { "id": 4, "currency": "currency8", "price": "price4", "formatted_price": "formatted_price6", "price_id": 162 } ``` ##### Component Currency Prices Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-prices-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-price) | Required | - | # Example (as JSON) ```json { "currency_prices": [ { "id": 50, "currency": "currency8", "price": "price4", "formatted_price": "formatted_price6", "price_id": 116 } ] } ``` ##### Component Custom Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-custom-price Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `tax_included` | `Boolean` | Optional | Whether or not the price point includes tax | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | Omit for On/Off components. | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `list_price_point_id` | `Number` | Optional | (Optional) Id of the price point to use for list price calculations when
overriding the customer price. | | `use_default_list_price` | `Boolean` | Optional | When true, list price calculations will continue to use the default price point even when a `custom_price` is supplied. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Required | On/off components only need one price bracket starting at 1. | | `renew_prepaid_allocation` | `Boolean` | Optional | Applicable only to prepaid usage components. Controls whether the allocated quantity renews each period. | | `rollover_prepaid_remainder` | `Boolean` | Optional | Applicable only to prepaid usage components. Controls whether remaining units roll over to the next period. | | `expiration_interval` | `Number` | Optional | Applicable only when rollover is enabled. Number of `expiration_interval_unit`s after which rollover amounts expire. | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | Applicable only when rollover is enabled. Interval unit for rollover expiration (month or day). | # Example (as JSON) ```json { "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "tax_included": false, "pricing_scheme": "stairstep", "interval": 162, "interval_unit": "day", "list_price_point_id": 146 } ``` ##### Component Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `component_id` | `Number` | Optional | - | | `starting_quantity` | `Number` | Optional | - | | `ending_quantity` | `Number` | Optional | - | | `unit_price` | `String` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `formatted_unit_price` | `String` | Optional | - | | `segment_id` | `Number` | Optional | - | # Example (as JSON) ```json { "id": 234, "component_id": 88, "starting_quantity": 104, "ending_quantity": 78, "unit_price": "unit_price0" } ``` ##### Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `type` | [`Price Point Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type) | Optional | Price point type. We expose the following types:

1. **default**: a price point that is marked as a default price for a certain product.
2. **custom**: a custom price point.
3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. | | `default` | `Boolean` | Optional | Note: Refer to type attribute instead. | | `name` | `String` | Optional | - | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `component_id` | `Number` | Optional | - | | `handle` | `String` | Optional | - | | `archived_at` | `DateTime` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price) | Optional | - | | `use_site_exchange_rate` | `Boolean` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Defaults to true during creation. | | `subscription_id` | `Number` | Optional | (only used for Custom Pricing - ie. when the price point's type is `custom`) The id of the subscription that the custom price point is for. | | `tax_included` | `Boolean` | Optional | - | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-price) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. The clone endpoint always returns currency prices if they are present. | | `overage_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price) | Optional | Applicable only to prepaid usage components. An array of overage price brackets. | | `overage_pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | Applicable only to prepaid usage components. Pricing scheme for overage pricing. | | `renew_prepaid_allocation` | `Boolean` | Optional | Applicable only to prepaid usage components. Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. | | `rollover_prepaid_remainder` | `Boolean` | Optional | Applicable only to prepaid usage components. Boolean which controls whether or not remaining units should be rolled over to the next period. | | `expiration_interval` | `Number` | Optional | Applicable only to prepaid usage components where rollover_prepaid_remainder is true. The number of `expiration_interval_unit`s after which rollover amounts should expire. | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | Applicable only to prepaid usage components where rollover_prepaid_remainder is true. A string representing the expiration interval unit for this component, either month or day. | # Example (as JSON) ```json { "id": 190, "type": "custom", "default": false, "name": "name2", "pricing_scheme": "stairstep" } ``` ##### Component Price Point Assignment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-assignment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Optional | - | | `price_point` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/component-price-point-assignment-price-point) | Optional | - | # Example (as JSON) ```json { "component_id": 114, "price_point": "String9" } ``` ##### Component Price Point Currency Overage Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-currency-overage-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point` | [`Currency Overage Prices`](https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-overage-prices) | Required | Extends a component price point with currency overage prices. | # Example (as JSON) ```json { "price_point": { "id": 248, "type": "default", "default": false, "name": "name0", "pricing_scheme": "per_unit" } } ``` ##### Component Price Point Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Optional | - | | `handle` | `String` | Optional | - | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Optional | - | # Example (as JSON) ```json { "name": "name6", "handle": "handle2", "pricing_scheme": "per_unit", "interval": 196, "interval_unit": "day" } ``` ##### Component Price Point Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point` | [`Component Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point) | Required | - | # Example (as JSON) ```json { "price_point": { "id": 248, "type": "default", "default": false, "name": "name0", "pricing_scheme": "per_unit" } } ``` ##### Component Price Points Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-points-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point) | Optional | - | | `meta` | [`List Public Keys Meta`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-public-keys-meta) | Optional | - | # Example (as JSON) ```json { "price_points": [ { "id": 40, "type": "default", "default": false, "name": "name2", "pricing_scheme": "per_unit" }, { "id": 40, "type": "default", "default": false, "name": "name2", "pricing_scheme": "per_unit" } ], "meta": { "total_count": 150, "current_page": 126, "total_pages": 138, "per_page": 152 } } ``` ##### Component Price Point Error Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-error-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Optional | - | | `message` | `String` | Optional | - | | `price_point` | `Number` | Optional | - | # Example (as JSON) ```json { "component_id": 206, "message": "message4", "price_point": 152 } ``` ##### Component Price Point Error 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-error-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-error-item) | Optional | - | # Example (as JSON) ```json { "errors": [ { "component_id": 236, "message": "message0", "price_point": 122 }, { "component_id": 236, "message": "message0", "price_point": 122 } ] } ``` ##### Component Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/component-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component` | [`Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component) | Required | - | # Example (as JSON) ```json { "component": { "item_category": "Business Software", "id": 80, "name": "name8", "handle": "handle4", "pricing_scheme": "per_unit", "unit_name": "unit_name0" } } ``` ##### Consolidated Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/consolidated-invoice # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `invoices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Optional | - | # Example (as JSON) ```json { "invoices": [ { "id": 196, "uid": "uid6", "site_id": 122, "customer_id": 234, "subscription_id": 50 }, { "id": 196, "uid": "uid6", "site_id": 122, "customer_id": 234, "subscription_id": 50 } ] } ``` ##### Contract Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/contract Contract linked to the scheduled renewal configuration. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `maxio_id` | `String` | Optional | - | | `number` | `String` | Optional | - | | `register` | [`Register`](https://developers.maxio.com/http/advanced-billing-api/models/structures/register) | Optional | - | # Example (as JSON) ```json { "id": 136, "maxio_id": "maxio_id8", "number": "number6", "register": { "id": 54, "maxio_id": "maxio_id4", "name": "name2", "currency_code": "currency_code2" } } ``` ##### Count Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/count-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `count` | `Number` | Optional | - | # Example (as JSON) ```json { "count": 60 } ``` ##### Coupon Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `name` | `String` | Optional | - | | `code` | `String` | Optional | - | | `description` | `String` | Optional | - | | `amount` | `Decimal` | Optional | - | | `amount_in_cents` | `Long` | Optional | - | | `product_family_id` | `Number` | Optional | - | | `product_family_name` | `String` | Optional | - | | `start_date` | `DateTime` | Optional | - | | `end_date` | `DateTime` | Optional | After the given time, this coupon code will be invalid for new signups. Recurring discounts started before this date will continue to recur even after this date. | | `percentage` | `String` | Optional | - | | `recurring` | `Boolean` | Optional | - | | `recurring_scheme` | [`Recurring Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/recurring-scheme) | Optional | - | | `duration_period_count` | `Number` | Optional | - | | `duration_interval` | `Number` | Optional | - | | `duration_interval_unit` | `String` | Optional | - | | `duration_interval_span` | `String` | Optional | - | | `allow_negative_balance` | `Boolean` | Optional | If set to true, discount is not limited (credits will carry forward to next billing). | | `archived_at` | `DateTime` | Optional | - | | `conversion_limit` | `String` | Optional | - | | `stackable` | `Boolean` | Optional | A stackable coupon can be combined with other coupons on a Subscription. | | `compounding_strategy` | [`Compounding Strategy`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/compounding-strategy) | Optional | Applicable only to stackable coupons. For `compound`, Percentage-based discounts will be calculated against the remaining price, after prior discounts have been calculated. For `full-price`, Percentage-based discounts will always be calculated against the original item price, before other discounts are applied. | | `use_site_exchange_rate` | `Boolean` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `discount_type` | [`Discount Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/discount-type) | Optional | - | | `exclude_mid_period_allocations` | `Boolean` | Optional | - | | `apply_on_cancel_at_end_of_period` | `Boolean` | Optional | - | | `apply_on_subscription_expiration` | `Boolean` | Optional | - | | `coupon_restrictions` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-restriction) | Optional | - | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency) | Optional | Returned in read, find, and list endpoints if the query parameter is provided. | # Example (as JSON) ```json { "id": 22, "name": "name2", "code": "code0", "description": "description2", "amount": 62.64 } ``` ##### Coupon Currency Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `currency` | `String` | Optional | - | | `price` | `Decimal` | Optional | - | | `coupon_id` | `Number` | Optional | - | # Example (as JSON) ```json { "id": 228, "currency": "currency8", "price": 169.96, "coupon_id": 210 } ``` ##### Coupon Currency Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-coupon-currency) | Required | - | # Example (as JSON) ```json { "currency_prices": [ { "currency": "currency8", "price": 78 } ] } ``` ##### Coupon Currency Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-currency) | Optional | - | # Example (as JSON) ```json { "currency_prices": [ { "id": 50, "currency": "currency8", "price": 233.74, "coupon_id": 224 }, { "id": 50, "currency": "currency8", "price": 233.74, "coupon_id": 224 }, { "id": 50, "currency": "currency8", "price": 233.74, "coupon_id": 224 } ] } ``` ##### Coupon Payload Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-payload # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Optional | Required when creating a new coupon. This name is not displayed to customers and is limited to 255 characters. | | `code` | `String` | Optional | Required when creating a new coupon. The code is limited to 255 characters. May contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.”. | | `description` | `String` | Optional | Required when creating a new coupon. A description of the coupon that can be displayed to customers in transactions and on statements. The description is limited to 255 characters. | | `percentage` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/coupon-payload-percentage) | Optional | Required when creating a new percentage coupon. Can't be used together with amount_in_cents. Percentage discount. | | `amount_in_cents` | `Long` | Optional | Required when creating a new flat amount coupon. Can't be used together with percentage. Flat USD discount. | | `allow_negative_balance` | `Boolean` | Optional | If set to true, discount is not limited (credits will carry forward to next billing). Can't be used together with restrictions. | | `recurring` | `Boolean` | Optional | - | | `end_date` | `Date` | Optional | After the end of the given day, this coupon code will be invalid for new signups. Recurring discounts started before this date will continue to recur even after this date. | | `product_family_id` | `String` | Optional | - | | `stackable` | `Boolean` | Optional | A stackable coupon can be combined with other coupons on a Subscription. | | `compounding_strategy` | [`Compounding Strategy`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/compounding-strategy) | Optional | Applicable only to stackable coupons. For `compound`, Percentage-based discounts will be calculated against the remaining price, after prior discounts have been calculated. For `full-price`, Percentage-based discounts will always be calculated against the original item price, before other discounts are applied. | | `exclude_mid_period_allocations` | `Boolean` | Optional | - | | `apply_on_cancel_at_end_of_period` | `Boolean` | Optional | - | | `apply_on_subscription_expiration` | `Boolean` | Optional | - | # Example (as JSON) ```json { "name": "name8", "code": "code6", "description": "description8", "percentage": "String7", "amount_in_cents": 110 } ``` ##### Coupon Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `coupon` | [`Coupon Payload`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-payload) | Optional | - | | `restricted_products` | `map` | Optional | An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the product. | | `restricted_components` | `map` | Optional | An object where the keys are component IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the component. | # Example (as JSON) ```json { "coupon": { "name": "name4", "code": "code2", "description": "description6", "percentage": "String3", "amount_in_cents": 230 }, "restricted_products": { "key0": true }, "restricted_components": { "key0": true } } ``` ##### Coupon Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `coupon` | [`Coupon`](https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon) | Optional | - | # Example (as JSON) ```json { "coupon": { "id": 196, "name": "name4", "code": "code2", "description": "description6", "amount": 97.66 } } ``` ##### Coupon Restriction Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-restriction # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `item_type` | [`Restriction Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/restriction-type) | Optional | - | | `item_id` | `Number` | Optional | - | | `name` | `String` | Optional | - | | `handle` | `String` | Optional | - | # Example (as JSON) ```json { "id": 180, "item_type": "Component", "item_id": 184, "name": "name4", "handle": "handle0" } ``` ##### Coupon Subcodes Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-subcodes # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `codes` | `array` | Optional | - | # Example (as JSON) ```json { "codes": [ "codes8" ] } ``` ##### Coupon Subcodes Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-subcodes-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `created_codes` | `array` | Optional | - | | `duplicate_codes` | `array` | Optional | - | | `invalid_codes` | `array` | Optional | - | # Example (as JSON) ```json { "created_codes": [ "created_codes1", "created_codes2" ], "duplicate_codes": [ "duplicate_codes8", "duplicate_codes7" ], "invalid_codes": [ "invalid_codes0", "invalid_codes9", "invalid_codes8" ] } ``` ##### Coupon Usage Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/coupon-usage # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | The Chargify id of the product | | `name` | `String` | Optional | Name of the product | | `signups` | `Number` | Optional | Number of times the coupon has been applied | | `savings` | `Number` | Optional | Dollar amount of customer savings as a result of the coupon. | | `savings_in_cents` | `Long` | Optional | Dollar amount of customer savings as a result of the coupon. | | `revenue` | `Number` | Optional | Total revenue of all subscriptions that have received a discount from this coupon. | | `revenue_in_cents` | `Long` | Optional | Total revenue of all subscriptions that have received a discount from this coupon. | # Example (as JSON) ```json { "id": 14, "name": "name0", "signups": 34, "savings": 52, "savings_in_cents": 138 } ``` ##### Create Allocation Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-allocation # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `quantity` | `Decimal` | Required | The allocated quantity to which to set the line-items allocated quantity. By default, this is an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use 1 for on and 0 for off. | | `decimal_quantity` | `String` | Optional | Decimal representation of the allocated quantity. Only valid when decimal
allocations are enabled for the component. | | `previous_quantity` | `Decimal` | Optional | The quantity that was in effect before this allocation. Responses always
include this value; it may be supplied on preview requests to ensure the
expected change is evaluated. | | `decimal_previous_quantity` | `String` | Optional | Decimal representation of `previous_quantity`. Only valid when decimal
allocations are enabled for the component. | | `component_id` | `Number` | Optional | (required for the multiple allocations endpoint) The id associated with the component for which the allocation is being made. | | `memo` | `String` | Optional | A memo to record along with the allocation. | | `proration_downgrade_scheme` | `String` | Optional | The scheme used if the proration is a downgrade. Defaults to the site setting if one is not provided. | | `proration_upgrade_scheme` | `String` | Optional | The scheme used if the proration is an upgrade. Defaults to the site setting if one is not provided. | | `downgrade_credit` | [`Downgrade Credit Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/downgrade-credit-credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Values are:

`full` - A full price credit is added for the amount owed.

`prorated` - A prorated credit is added for the amount owed.

`none` - No charge is added. | | `upgrade_charge` | [`Upgrade Charge Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/upgrade-charge-credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Values are:

`full` - A charge is added for the full price of the component.

`prorated` - A charge is added for the prorated price of the component change.

`none` - No charge is added. | | `accrue_charge` | `Boolean` | Optional | "If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately.

`true` - Attempt to charge the customer at the next renewal.

`false` - Attempt to charge the customer right away. If it fails, the charge will be accrued until the next renewal.

Defaults to the site setting if unspecified in the request. | | `initiate_dunning` | `Boolean` | Optional | If set to true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. Defaults to false. | | `price_point_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-allocation-price-point-id) | Optional | Price point that the allocation should be charged at. Accepts either the price point's id (integer) or handle (string). When not specified, the default price point will be used. | | `billing_schedule` | [`Billing Schedule`](https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-schedule) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | | `custom_price` | [`Component Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-custom-price) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | # Example (as JSON) ```json { "quantity": 8.06, "decimal_quantity": "decimal_quantity4", "previous_quantity": 218.92, "decimal_previous_quantity": "decimal_previous_quantity0", "component_id": 192, "memo": "memo4" } ``` ##### Create Allocation Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-allocation-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `allocation` | [`Create Allocation`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-allocation) | Required | - | # Example (as JSON) ```json { "allocation": { "quantity": 228.94, "decimal_quantity": "decimal_quantity6", "previous_quantity": 254.04, "decimal_previous_quantity": "decimal_previous_quantity8", "component_id": 8, "memo": "memo2" } } ``` ##### Create Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-point # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | - | | `handle` | `String` | Optional | - | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Required | - | | `use_site_exchange_rate` | `Boolean` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Setting not supported when creating price points in bulk.

**Default**: `true` | | `tax_included` | `Boolean` | Optional | Whether or not the price point includes tax. Setting not supported when creating price points in bulk. | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this price point, either month or day. This property is only available for sites with Multifrequency enabled. | # Example (as JSON) ```json { "name": "name0", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "use_site_exchange_rate": true, "handle": "handle6", "tax_included": false, "interval": 24, "interval_unit": "day" } ``` ##### Create Component Price Point Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-point-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point` | [`Create Component Price Point \| Create Prepaid Usage Component Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-component-price-point-request-price-point) | Required | - | # Example (as JSON) ```json { "price_point": { "name": "name0", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "use_site_exchange_rate": true, "handle": "handle6", "tax_included": false, "interval": 24, "interval_unit": "day" } } ``` ##### Create Component Price Points Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-points-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-component-price-points-request-price-points) | Required | - | # Example (as JSON) ```json { "price_points": [ { "name": "name0", "handle": "handle6", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "use_site_exchange_rate": false, "tax_included": false, "interval": 24, "interval_unit": "day" }, { "name": "name0", "handle": "handle6", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "use_site_exchange_rate": false, "tax_included": false, "interval": 24, "interval_unit": "day" } ] } ``` ##### Create Currency Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-currency-price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency` | `String` | Optional | ISO code for a currency defined on the site level | | `price` | `Decimal` | Optional | Price for the price level in this currency | | `price_id` | `Number` | Optional | ID of the price that this corresponds with | # Example (as JSON) ```json { "currency": "currency2", "price": 10.4, "price_id": 54 } ``` ##### Create Currency Prices Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-currency-prices-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-currency-price) | Required | - | # Example (as JSON) ```json { "currency_prices": [ { "currency": "currency8", "price": 233.74, "price_id": 116 } ] } ``` ##### Create Customer Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-customer # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Required | - | | `last_name` | `String` | Required | - | | `email` | `String` | Required | - | | `cc_emails` | `String` | Optional | - | | `organization` | `String` | Optional | - | | `reference` | `String` | Optional | - | | `address` | `String` | Optional | - | | `address_2` | `String` | Optional | - | | `city` | `String` | Optional | - | | `state` | `String` | Optional | - | | `zip` | `String` | Optional | - | | `country` | `String` | Optional | - | | `phone` | `String` | Optional | - | | `locale` | `String` | Optional | Set a specific language on a customer record. | | `vat_number` | `String` | Optional | - | | `tax_exempt` | `Boolean` | Optional | - | | `surcharging` | `Boolean` | Optional | Whether surcharging is enabled for the customer. Defaults to `true` when omitted. Only applied on sites where surcharging control is enabled. | | `tax_exempt_reason` | `String` | Optional | - | | `parent_id` | `Number` | Optional | The parent ID in Chargify if applicable. Parent is another Customer object. | | `salesforce_id` | `String` | Optional | The Salesforce ID of the customer | | `branding_theme_id` | `Number` | Optional | The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. | # Example (as JSON) ```json { "first_name": "first_name8", "last_name": "last_name6", "email": "email8", "cc_emails": "cc_emails8", "organization": "organization2", "reference": "reference4", "address": "address4", "address_2": "address_22" } ``` ##### Create Customer Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-customer-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customer` | [`Create Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-customer) | Required | - | # Example (as JSON) ```json { "customer": { "first_name": "first_name0", "last_name": "last_name8", "email": "email6", "cc_emails": "cc_emails0", "organization": "organization6", "reference": "reference4", "address": "address6", "address_2": "address_24" } } ``` ##### Create EBB Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-ebb-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `event_based_component` | [`EBB Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/ebb-component) | Required | - | # Example (as JSON) ```json { "event_based_component": { "name": "name8", "unit_name": "unit_name0", "description": "description8", "handle": "handle4", "taxable": false, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "price_points": [ { "name": "name2", "handle": "handle8", "pricing_scheme": "per_unit", "interval": 92, "interval_unit": "day" } ], "event_based_billing_metric_id": 68 } } ``` ##### Create Feature Catalog Item Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-feature-catalog-item-request The owning product or component is taken from the URL and must not be included in the request body. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `feature` | [`Feature 2`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-2) | Required | - | # Example (as JSON) ```json { "feature": { "feature_template_id": 196, "value": "value6", "propagate_to_subscriptions": false, "periodicity_interval": 68, "periodicity_unit": "week", "price_point_type": "ProductPricePoint", "price_point_id": 84 } } ``` ##### Create Feature Template Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-feature-template-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `feature` | [`Feature`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature) | Required | - | # Example (as JSON) ```json { "feature": { "key": "sso", "name": "name4", "kind": "usage_limit", "description": "description4", "unit": "unit2", "value_type": "boolean", "default_value": "default_value4", "default_periodicity_interval": 150 } } ``` ##### Create Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-item) | Optional | - | | `issue_date` | `Date` | Optional | Date on which the invoice will be issued (format YYYY-MM-DD). This date is interpreted and validated in your site's time zone. It must be today or a date in the past — future dates are not accepted. If omitted, defaults to today in your site's time zone. | | `net_terms` | `Number` | Optional | By default, invoices will be created with a due date matching the date of invoice creation. If a different due date is desired, the net_terms parameter can be sent indicating the number of days in advance the due date should be. | | `payment_instructions` | `String` | Optional | - | | `memo` | `String` | Optional | A custom memo can be sent to override the site's default. | | `seller_address` | [`Create Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-address) | Optional | Overrides the defaults for the site. | | `billing_address` | [`Create Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-address) | Optional | Overrides the default for the customer. | | `shipping_address` | [`Create Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-address) | Optional | Overrides the default for the customer. | | `coupons` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-coupon) | Optional | - | | `status` | [`Create Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/create-invoice-status) | Optional | **Default**: `open` | # Example (as JSON) ```json { "issue_date": "2024-01-01", "status": "draft", "line_items": [ { "title": "title4", "quantity": 56.68, "unit_price": 39.9, "taxable": false, "tax_code": "tax_code6" } ], "net_terms": 18, "payment_instructions": "payment_instructions0", "memo": "memo6" } ``` ##### Create Invoice Address Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-address Overrides the default address. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `phone` | `String` | Optional | - | | `address` | `String` | Optional | - | | `address_2` | `String` | Optional | - | | `city` | `String` | Optional | - | | `state` | `String` | Optional | - | | `zip` | `String` | Optional | - | | `country` | `String` | Optional | - | # Example (as JSON) ```json { "first_name": "first_name4", "last_name": "last_name2", "phone": "phone6", "address": "address0", "address_2": "address_28" } ``` ##### Create Invoice Coupon Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-coupon # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `code` | `String` | Optional | - | | `subcode` | `String` | Optional | - | | `percentage` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-coupon-percentage) | Optional | - | | `amount` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-coupon-amount) | Optional | - | | `description` | `String` | Optional | **Constraints**: *Maximum Length*: `255` | | `product_family_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-coupon-product-family-id) | Optional | - | | `compounding_strategy` | [`Compounding Strategy`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/compounding-strategy) | Optional | Applicable only to stackable coupons. For `compound`, Percentage-based discounts will be calculated against the remaining price, after prior discounts have been calculated. For `full-price`, Percentage-based discounts will always be calculated against the original item price, before other discounts are applied. | # Example (as JSON) ```json { "percentage": 50.0, "code": "code4", "subcode": "subcode8", "amount": "String9", "description": "description4" } ``` ##### Create Invoice Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `title` | `String` | Optional | - | | `quantity` | [`Decimal \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-quantity) | Optional | The quantity can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. | | `unit_price` | [`Decimal \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-unit-price) | Optional | The unit_price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. | | `taxable` | `Boolean` | Optional | Set to true to automatically calculate taxes. Site must be configured to use and calculate taxes. If using AvaTax, a tax_code parameter must also be sent. | | `tax_code` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `period_range_start` | `String` | Optional | YYYY-MM-DD | | `period_range_end` | `String` | Optional | YYYY-MM-DD | | `product_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-product-id) | Optional | Product handle or product id. | | `component_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-component-id) | Optional | Component handle or component id. | | `price_point_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-price-point-id) | Optional | Price point handle or id. For component. | | `product_price_point_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-product-price-point-id) | Optional | - | | `description` | `String` | Optional | **Constraints**: *Maximum Length*: `255` | # Example (as JSON) ```json { "title": "title2", "quantity": 154.86, "unit_price": 138.08, "taxable": false, "tax_code": "tax_code4" } ``` ##### Create Invoice Payment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-payment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-payment-amount) | Optional | A string of the dollar amount to be refunded (eg. "10.50" => $10.50) | | `memo` | `String` | Optional | A description to be attached to the payment. Applicable only to `external` payments. | | `method` | [`Invoice Payment Method Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-payment-method-type) | Optional | The type of payment method used. Defaults to other. | | `details` | `String` | Optional | Additional information related to the payment method (eg. Check #). Applicable only to `external` payments. | | `payment_profile_id` | `Number` | Optional | The ID of the payment profile to be used for the payment. | | `received_on` | `Date` | Optional | Date reflecting when the payment was received from a customer. Must be in the past. Applicable only to
`external` payments. | # Example (as JSON) ```json { "amount": "String9", "memo": "memo0", "method": "cash", "details": "details6", "payment_profile_id": 122 } ``` ##### Create Invoice Payment Application Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-payment-application # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `invoice_uid` | `String` | Required | Unique identifier for the invoice. It has the prefix "inv_" followed by alphanumeric characters. | | `amount` | `String` | Required | Dollar amount of the invoice payment (eg. "10.50" => $10.50). | # Example (as JSON) ```json { "invoice_uid": "invoice_uid4", "amount": "amount6" } ``` ##### Create Invoice Payment Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-payment-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment` | [`Create Invoice Payment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-payment) | Required | - | | `type` | [`Invoice Payment Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-payment-type) | Optional | The type of payment to be applied to an Invoice. Defaults to external. | # Example (as JSON) ```json { "payment": { "amount": "String9", "memo": "memo0", "method": "ach", "details": "details6", "payment_profile_id": 42 }, "type": "external" } ``` ##### Create Invoice Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `invoice` | [`Create Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice) | Required | - | # Example (as JSON) ```json { "invoice": { "issue_date": "2024-01-01", "status": "draft", "line_items": [ { "title": "title4", "quantity": 56.68, "unit_price": 39.9, "taxable": false, "tax_code": "tax_code6" }, { "title": "title4", "quantity": 56.68, "unit_price": 39.9, "taxable": false, "tax_code": "tax_code6" }, { "title": "title4", "quantity": 56.68, "unit_price": 39.9, "taxable": false, "tax_code": "tax_code6" } ], "net_terms": 144, "payment_instructions": "payment_instructions6", "memo": "memo0" } } ``` ##### Create Metadata Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metadata # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Optional | - | | `value` | `String` | Optional | - | # Example (as JSON) ```json { "name": "name4", "value": "value6" } ``` ##### Create Metadata Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metadata-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `metadata` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metadata) | Required | - | # Example (as JSON) ```json { "metadata": [ { "name": "name6", "value": "value8" } ] } ``` ##### Create Metafield Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metafield # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Optional | - | | `scope` | [`Metafield Scope`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield-scope) | Optional | Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. | | `input_type` | [`Metafield Input`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/metafield-input) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | | `enum` | `array` | Optional | Only applicable when input_type is radio or dropdown. Empty strings will not be submitted. | # Example (as JSON) ```json { "name": "my_field", "scope": { "csv": "0", "invoices": "0", "statements": "0", "portal": "0", "public_show": "0", "public_edit": "0" }, "input_type": "text", "enum": [ "string" ] } ``` ##### Create Metafields Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metafields-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `metafields` | [`Create Metafield \| array`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-metafields-request-metafields) | Required | - | # Example (as JSON) ```json { "metafields": { "name": "my_field", "scope": { "csv": "0", "invoices": "0", "statements": "0", "portal": "0", "public_show": "0", "public_edit": "0" }, "input_type": "text", "enum": [ "string" ] } } ``` ##### Create Metered Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metered-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `metered_component` | [`Metered Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metered-component) | Required | - | # Example (as JSON) ```json { "metered_component": { "name": "name0", "unit_name": "unit_name2", "description": "description0", "handle": "handle6", "taxable": false, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "price_points": [ { "name": "name2", "handle": "handle8", "pricing_scheme": "per_unit", "interval": 92, "interval_unit": "day" }, { "name": "name2", "handle": "handle8", "pricing_scheme": "per_unit", "interval": 92, "interval_unit": "day" }, { "name": "name2", "handle": "handle8", "pricing_scheme": "per_unit", "interval": 92, "interval_unit": "day" } ] } } ``` ##### Create Multi Invoice Payment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-multi-invoice-payment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `memo` | `String` | Optional | A description to be attached to the payment. | | `details` | `String` | Optional | Additional information related to the payment method (eg. Check #). | | `method` | [`Invoice Payment Method Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-payment-method-type) | Optional | The type of payment method used. Defaults to other. | | `amount` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-multi-invoice-payment-amount) | Required | Dollar amount of the sum of the invoices payment (eg. "10.50" => $10.50). | | `received_on` | `String` | Optional | Date reflecting when the payment was received from a customer. Must be in the past. | | `applications` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-payment-application) | Required | - | # Example (as JSON) ```json { "amount": "String7", "applications": [ { "invoice_uid": "invoice_uid8", "amount": "amount0" } ], "memo": "memo8", "details": "details4", "method": "credit_card", "received_on": "received_on6" } ``` ##### Create Multi Invoice Payment Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-multi-invoice-payment-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment` | [`Create Multi Invoice Payment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-multi-invoice-payment) | Required | - | # Example (as JSON) ```json { "payment": { "amount": "String9", "applications": [ { "invoice_uid": "invoice_uid8", "amount": "amount0" } ], "memo": "memo0", "details": "details6", "method": "ach", "received_on": "received_on8" } } ``` ##### Create Offer Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-offer # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | - | | `handle` | `String` | Required | - | | `description` | `String` | Optional | - | | `product_id` | `Number` | Required | - | | `product_price_point_id` | `Number` | Optional | - | | `components` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-offer-component) | Optional | - | | `coupons` | `array` | Optional | - | # Example (as JSON) ```json { "name": "name4", "handle": "handle0", "description": "description4", "product_id": 208, "product_price_point_id": 132, "components": [ { "component_id": 108, "price_point_id": 124, "starting_quantity": 84 }, { "component_id": 108, "price_point_id": 124, "starting_quantity": 84 } ], "coupons": [ "coupons4" ] } ``` ##### Create Offer Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-offer-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `starting_quantity` | `Number` | Optional | - | # Example (as JSON) ```json { "component_id": 242, "price_point_id": 10, "starting_quantity": 50 } ``` ##### Create Offer Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-offer-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `offer` | [`Create Offer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-offer) | Required | - | # Example (as JSON) ```json { "offer": { "name": "name4", "handle": "handle0", "description": "description6", "product_id": 30, "product_price_point_id": 150, "components": [ { "component_id": 108, "price_point_id": 124, "starting_quantity": 84 }, { "component_id": 108, "price_point_id": 124, "starting_quantity": 84 } ], "coupons": [ "coupons6" ] } } ``` ##### Create On Off Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-on-off-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `on_off_component` | [`On Off Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/on-off-component) | Required | - | # Example (as JSON) ```json { "on_off_component": { "name": "name6", "description": "description6", "handle": "handle2", "taxable": false, "upgrade_charge": "full", "downgrade_credit": "full", "unit_price": "String5" } } ``` ##### Create or Update Endpoint Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-endpoint Used to Create or Update Endpoint. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `url` | `String` | Required | - | | `webhook_subscriptions` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/webhook-subscription) | Required | - | # Example (as JSON) ```json { "url": "url8", "webhook_subscriptions": [ "payment_success" ] } ``` ##### Create or Update Endpoint Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-endpoint-request Used to Create or Update Endpoint. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `endpoint` | [`Create or Update Endpoint`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-endpoint) | Required | Used to Create or Update Endpoint. | # Example (as JSON) ```json { "endpoint": { "url": "url2", "webhook_subscriptions": [ "statement_closed" ] } } ``` ##### Create or Update Product Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-product # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | The product name | | `handle` | `String` | Optional | The product API handle | | `description` | `String` | Required | The product description | | `accounting_code` | `String` | Optional | E.g. Internal ID or SKU Number | | `require_credit_card` | `Boolean` | Optional | Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, read this attribute from under the signup page. | | `price_in_cents` | `Long` | Required | The product price, in integer cents | | `interval` | `Number` | Required | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Required | A string representing the interval unit for this product, either month or day | | `trial_price_in_cents` | `Long` | Optional | The product trial price, in integer cents | | `trial_interval` | `Number` | Optional | The numerical trial interval. e.g., an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product trial would last 30 days. | | `trial_interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the trial interval unit for this product, either month or day | | `trial_type` | [`Trial Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/trial-type) | Optional | Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | | `expiration_interval` | `Number` | Optional | The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days. | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | A string representing the expiration interval unit for this product, either month, day or never | | `auto_create_signup_page` | `Boolean` | Optional | - | | `tax_code` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `unspsc_code` | `String` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this product instead of the default derived from item_category. | # Example (as JSON) ```json { "name": "name8", "handle": "handle4", "description": "description8", "accounting_code": "accounting_code4", "require_credit_card": false, "price_in_cents": 190, "interval": 174, "interval_unit": "day", "trial_price_in_cents": 22, "trial_interval": 76 } ``` ##### Create or Update Product Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-product-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product` | [`Create or Update Product`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-product) | Required | - | # Example (as JSON) ```json { "product": { "name": "name0", "handle": "handle6", "description": "description0", "accounting_code": "accounting_code6", "require_credit_card": false, "price_in_cents": 54, "interval": 186, "interval_unit": "day", "trial_price_in_cents": 34, "trial_interval": 88 } } ``` ##### Create or Update Segment Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-segment-price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `starting_quantity` | `Number` | Optional | - | | `ending_quantity` | `Number` | Optional | - | | `unit_price` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-or-update-segment-price-unit-price) | Required | The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 | # Example (as JSON) ```json { "starting_quantity": 78, "ending_quantity": 52, "unit_price": "String7" } ``` ##### Create Payment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-payment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount` | `String` | Required | - | | `memo` | `String` | Required | - | | `payment_details` | `String` | Required | - | | `payment_method` | [`Invoice Payment Method Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-payment-method-type) | Required | The type of payment method used. Defaults to other. | # Example (as JSON) ```json { "amount": "amount6", "memo": "memo8", "payment_details": "payment_details4", "payment_method": "cash" } ``` ##### Create Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `chargify_token` | `String` | Optional | Token received after sending billing information using Maxio.js (formerly Chargify.js). | | `id` | `Number` | Optional | - | | `payment_type` | [`Payment Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type) | Optional | - | | `first_name` | `String` | Optional | First name on card or bank account. If omitted, the first_name from customer attributes will be used. | | `last_name` | `String` | Optional | Last name on card or bank account. If omitted, the last_name from customer attributes will be used. | | `masked_card_number` | `String` | Optional | - | | `full_number` | `String` | Optional | The full credit card number | | `card_type` | [`Card Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/card-type) | Optional | The type of card used. | | `expiration_month` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-payment-profile-expiration-month) | Optional | (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, e.g., 5 | | `expiration_year` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-payment-profile-expiration-year) | Optional | (Optional when performing an Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, e.g., 2012 | | `billing_address` | `String` | Optional | The credit card or bank account billing street address (e.g., 123 Main St.). This value is merely passed through to the payment gateway. | | `billing_address_2` | `String` | Optional | Second line of the customer’s billing address e.g., Apt. 100 | | `billing_city` | `String` | Optional | The credit card or bank account billing address city (e.g., “Boston”). This value is merely passed through to the payment gateway. | | `billing_state` | `String` | Optional | The credit card or bank account billing address state (e.g., MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | | `billing_country` | `String` | Optional | “The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time.” | | `billing_zip` | `String` | Optional | The credit card or bank account billing address zip code (e.g., 12345). This value is merely passed through to the payment gateway. | | `current_vault` | [`All Vaults`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/all-vaults) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | | `vault_token` | `String` | Optional | The “token” provided by your vault storage for an already stored payment profile | | `customer_vault_token` | `String` | Optional | (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | | `customer_id` | `Number` | Optional | (Required when creating a new payment profile) The Chargify customer id. | | `paypal_email` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | | `payment_method_nonce` | `String` | Optional | used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Maxio.js (formerly Chargify.js) instead. | | `gateway_handle` | `String` | Optional | This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. gateway_handle is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [Multigateway description](https://chargify.zendesk.com/hc/en-us/articles/4407761759643#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed. | | `cvv` | `String` | Optional | The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | | `bank_name` | `String` | Optional | (Required when creating with ACH or GoCardless, optional with Stripe Direct Debit). The name of the bank where the customerʼs account resides | | `bank_iban` | `String` | Optional | (Optional when creating with GoCardless, required with Stripe Direct Debit). International Bank Account Number. Alternatively, local bank details can be provided. | | `bank_routing_number` | `String` | Optional | (Required when creating with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API. | | `bank_account_number` | `String` | Optional | (Required when creating with ACH, GoCardless, Stripe BECS or BACS Direct Debit, and bank_iban is blank) The customerʼs bank account number | | `bank_branch_code` | `String` | Optional | (Optional when creating with GoCardless, required with Stripe BECS or BACS Direct Debit) Branch/Sort code. Alternatively, an IBAN can be provided. | | `bank_account_type` | [`Bank Account Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-type) | Optional | Defaults to checking | | `bank_account_holder_type` | [`Bank Account Holder Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-holder-type) | Optional | Defaults to personal | | `last_four` | `String` | Optional | (Optional) Used for creating subscription with payment profile imported using vault_token, for proper display in Advanced Billing UI | # Example (as JSON) ```json { "chargify_token": "tok_9g6hw85pnpt6knmskpwp4ttt", "full_number": "5424000000000015", "id": 76, "payment_type": "credit_card", "first_name": "first_name8", "last_name": "last_name6" } ``` ##### Create Payment Profile Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-payment-profile-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile` | [`Create Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-payment-profile) | Required | - | # Example (as JSON) ```json { "payment_profile": { "chargify_token": "tok_9g6hw85pnpt6knmskpwp4ttt", "full_number": "5424000000000015", "id": 44, "payment_type": "credit_card", "first_name": "first_name4", "last_name": "last_name2" } } ``` ##### Create Prepaid Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepaid-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepaid_usage_component` | [`Prepaid Usage Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-usage-component) | Required | - | # Example (as JSON) ```json { "prepaid_usage_component": { "name": "name2", "unit_name": "unit_name4", "description": "description2", "handle": "handle8", "taxable": false, "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "upgrade_charge": "full", "overage_pricing": { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } } } ``` ##### Create Prepaid Usage Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepaid-usage-component-price-point # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | - | | `handle` | `String` | Optional | - | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Required | - | | `overage_pricing` | [`Overage Pricing`](https://developers.maxio.com/http/advanced-billing-api/models/structures/overage-pricing) | Required | - | | `use_site_exchange_rate` | `Boolean` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.

**Default**: `true` | | `rollover_prepaid_remainder` | `Boolean` | Optional | (only for prepaid usage components) Boolean which controls whether or not remaining units should be rolled over to the next period. | | `renew_prepaid_allocation` | `Boolean` | Optional | (only for prepaid usage components) Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. | | `expiration_interval` | `Decimal` | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire. | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) A string representing the expiration interval unit for this component, either month or day. | # Example (as JSON) ```json { "name": "name0", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "overage_pricing": { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] }, "use_site_exchange_rate": true, "handle": "handle6", "rollover_prepaid_remainder": false, "renew_prepaid_allocation": false, "expiration_interval": 101.18 } ``` ##### Create Prepayment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepayment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount` | `Decimal` | Required | - | | `details` | `String` | Required | - | | `memo` | `String` | Required | - | | `method` | [`Create Prepayment Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/create-prepayment-method) | Required | When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions. | | `payment_profile_id` | `Number` | Optional | - | # Example (as JSON) ```json { "amount": 23.92, "details": "details6", "memo": "memo0", "method": "credit_card_on_file", "payment_profile_id": 240 } ``` ##### Create Prepayment Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepayment-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepayment` | [`Create Prepayment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepayment) | Required | - | # Example (as JSON) ```json { "prepayment": { "amount": 11.6, "details": "details8", "memo": "memo2", "method": "money_order", "payment_profile_id": 240 } } ``` ##### Create Prepayment Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepayment-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepayment` | [`Created Prepayment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/created-prepayment) | Required | - | # Example (as JSON) ```json { "prepayment": { "id": 38, "subscription_id": 148, "amount_in_cents": 124, "memo": "memo2", "created_at": "2016-03-13T12:52:32.123Z" } } ``` ##### Create Product Currency Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-currency-price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency` | `String` | Required | ISO code for one of the site level currencies. | | `price` | `Number` | Required | Price for the given role. | | `role` | [`Currency Price Role`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/currency-price-role) | Required | Role for the price. | # Example (as JSON) ```json { "currency": "currency0", "price": 222, "role": "baseline" } ``` ##### Create Product Currency Prices Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-currency-prices-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-currency-price) | Required | - | # Example (as JSON) ```json { "currency_prices": [ { "currency": "currency8", "price": 78, "role": "initial" } ] } ``` ##### Create Product Family Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-family # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | - | | `handle` | `String` | Optional | - | | `description` | `String` | Optional | - | | `surcharging` | `Boolean` | Optional | Whether surcharging applies to this product family. Defaults to `true` when omitted. Only applied on sites where surcharging is enabled. | # Example (as JSON) ```json { "name": "name6", "handle": "handle2", "description": "description6", "surcharging": false } ``` ##### Create Product Family Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-family-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product_family` | [`Create Product Family`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-family) | Required | - | # Example (as JSON) ```json { "product_family": { "name": "name0", "handle": "handle6", "description": "description0", "surcharging": false } } ``` ##### Create Product Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-price-point # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | The product price point name | | `handle` | `String` | Optional | The product price point API handle | | `price_in_cents` | `Long` | Required | The product price point price, in integer cents | | `interval` | `Number` | Required | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Required | A string representing the interval unit for this product price point, either month or day | | `trial_price_in_cents` | `Long` | Optional | The product price point trial price, in integer cents | | `trial_interval` | `Number` | Optional | The numerical trial interval. e.g., an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. | | `trial_interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the trial interval unit for this product price point, either month or day | | `trial_type` | [`Trial Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/trial-type) | Optional | Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | | `initial_charge_in_cents` | `Long` | Optional | The product price point initial charge, in integer cents | | `initial_charge_after_trial` | `Boolean` | Optional | - | | `expiration_interval` | `Number` | Optional | The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | A string representing the expiration interval unit for this product price point, either month, day or never | | `use_site_exchange_rate` | `Boolean` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.

**Default**: `true` | # Example (as JSON) ```json { "name": "name6", "price_in_cents": 216, "interval": 200, "interval_unit": "day", "use_site_exchange_rate": true, "handle": "handle2", "trial_price_in_cents": 48, "trial_interval": 102, "trial_interval_unit": "day", "trial_type": "no_obligation" } ``` ##### Create Product Price Point Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-price-point-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point` | [`Create Product Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-product-price-point) | Required | - | # Example (as JSON) ```json { "price_point": { "name": "name0", "price_in_cents": 196, "interval": 44, "interval_unit": "day", "use_site_exchange_rate": true, "handle": "handle6", "trial_price_in_cents": 108, "trial_interval": 202, "trial_interval_unit": "day", "trial_type": "no_obligation" } } ``` ##### Create Quantity Based Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-quantity-based-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `quantity_based_component` | [`Quantity Based Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/quantity-based-component) | Required | - | # Example (as JSON) ```json { "quantity_based_component": { "name": "name0", "unit_name": "unit_name2", "description": "description0", "handle": "handle6", "taxable": false, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "upgrade_charge": "prorated" } } ``` ##### Create Reason Code Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-reason-code # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `code` | `String` | Required | The unique identifier for the ReasonCode | | `description` | `String` | Required | The friendly summary of what the code signifies | | `position` | `Number` | Optional | The order that code appears in lists | # Example (as JSON) ```json { "code": "code4", "description": "description6", "position": 86 } ``` ##### Create Reason Code Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-reason-code-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `reason_code` | [`Create Reason Code`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-reason-code) | Required | - | # Example (as JSON) ```json { "reason_code": { "code": "code4", "description": "description6", "position": 14 } } ``` ##### Create Segment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-segment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `segment_property_1_value` | [`String \| Decimal \| Number \| Boolean`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-1-value) | Optional | A value that will occur in your events that you want to bill upon. The type of the value depends on the property type in the related event based billing metric. | | `segment_property_2_value` | [`String \| Decimal \| Number \| Boolean`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-2-value) | Optional | A value that will occur in your events that you want to bill upon. The type of the value depends on the property type in the related event based billing metric. | | `segment_property_3_value` | [`String \| Decimal \| Number \| Boolean`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-3-value) | Optional | A value that will occur in your events that you want to bill upon. The type of the value depends on the property type in the related event based billing metric. | | `segment_property_4_value` | [`String \| Decimal \| Number \| Boolean`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-4-value) | Optional | A value that will occur in your events that you want to bill upon. The type of the value depends on the property type in the related event based billing metric. | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-segment-price) | Optional | - | # Example (as JSON) ```json { "segment_property_1_value": "String9", "segment_property_2_value": "String1", "segment_property_3_value": "String3", "segment_property_4_value": "String3", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" } ] } ``` ##### Create Segment Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-segment-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `segment` | [`Create Segment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-segment) | Required | - | # Example (as JSON) ```json { "segment": { "segment_property_1_value": "String1", "segment_property_2_value": "String3", "segment_property_3_value": "String1", "segment_property_4_value": "String5", "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" } ] } } ``` ##### Create Subscription Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product_handle` | `String` | Optional | The API Handle of the product for which you are creating a subscription. Required, unless a `product_id` is given instead. | | `product_id` | `Number` | Optional | The Product ID of the product for which you are creating a subscription. The product ID is not currently published, so we recommend using the API Handle instead. | | `product_price_point_handle` | `String` | Optional | The user-friendly API handle of a product's particular price point. | | `product_price_point_id` | `Number` | Optional | The ID of the particular price point on the product. | | `custom_price` | [`Subscription Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-custom-price) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription. A subscription can have up to 30 custom price points. Exceeding this limit will result in an API error. | | `coupon_code` | `String` | Optional | (deprecated) The coupon code of the single coupon currently applied to the subscription. See coupon_codes instead as subscriptions can now have more than one coupon. | | `coupon_codes` | `array` | Optional | An array for all the coupons attached to the subscription. | | `payment_collection_method` | [`Collection Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | | `receives_invoice_emails` | `String` | Optional | (Optional) Default: True - Whether or not this subscription is set to receive emails related to this subscription. | | `net_terms` | `String` | Optional | (Optional) Default: null The number of days after renewal (on invoice billing) that a subscription is due. A value between 0 (due immediately) and 180. | | `customer_id` | `Number` | Optional | The ID of an existing customer within Chargify. Required, unless a `customer_reference` or a set of `customer_attributes` is given. | | `branding_theme_id` | `Number` | Optional | The ID of the Branding Theme to assign to this subscription. When set, this subscription-level Branding Theme is used instead of the customer's default Branding Theme for subscription-related documents and communications that use subscription theming. Pass null or an empty value to clear the subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. Not returned in the response. | | `next_billing_at` | `DateTime` | Optional | (Optional) Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by next_billing_at. If you do not provide a value for next_billing_at, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. See further notes in the section on Importing Subscriptions. | | `initial_billing_at` | `DateTime` | Optional | (Optional) Set this attribute to a future date/time to create a subscription in the Awaiting Signup state, rather than Active or Trialing. You can omit the initial_billing_at date to activate the subscription immediately. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time Formats. | | `defer_signup` | `Boolean` | Optional | (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date state. Use this when you want to create a subscription that has an unknown first billing date. When the first billing date is known, update a subscription and set the `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `false` | | `stored_credential_transaction_id` | `Number` | Optional | For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. | | `sales_rep_id` | `Number` | Optional | - | | `payment_profile_id` | `Number` | Optional | The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id.) | | `reference` | `String` | Optional | The reference value (provided by your app) for the subscription itself. | | `customer_attributes` | [`Customer Attributes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-attributes) | Optional | - | | `payment_profile_attributes` | [`Payment Profile Attributes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-attributes) | Optional | alias to credit_card_attributes | | `credit_card_attributes` | [`Payment Profile Attributes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-attributes) | Optional | Credit Card data to create a new Subscription. Interchangeable with `payment_profile_attributes` property. | | `bank_account_attributes` | [`Bank Account Attributes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-attributes) | Optional | - | | `components` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-component) | Optional | (Optional) An array of component ids and quantities to be added to the subscription. See [Components](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview) for more information. | | `calendar_billing` | [`Calendar Billing`](https://developers.maxio.com/http/advanced-billing-api/models/structures/calendar-billing) | Optional | (Optional). Cannot be used when also specifying next_billing_at. | | `metafields` | `map` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | | `customer_reference` | `String` | Optional | The reference value (provided by your app) of an existing customer within Chargify. Required, unless a `customer_id` or a set of `customer_attributes` is given. | | `group` | [`Group Settings`](https://developers.maxio.com/http/advanced-billing-api/models/structures/group-settings) | Optional | - | | `ref` | `String` | Optional | A valid referral code. (optional, see [Referrals](https://maxio.zendesk.com/hc/en-us/articles/24286981223693-Referrals-Reference#how-to-obtain-referral-codes) for more details). If supplied, must be valid, or else subscription creation will fail. | | `cancellation_message` | `String` | Optional | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to make a note about the reason for cancellation. | | `cancellation_method` | `String` | Optional | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to make a note about how the subscription was canceled. | | `currency` | `String` | Optional | (Optional) If Multi-Currency is enabled and the currency is configured in Chargify, pass it at signup to create a subscription on a non-default currency. Note that you cannot update the currency of an existing subscription. | | `expires_at` | `DateTime` | Optional | Timestamp giving the expiration date of this subscription (if any). You may manually change the expiration date at any point during a subscription period. | | `expiration_tracks_next_billing_change` | `String` | Optional | (Optional, default false) When set to true, and when next_billing_at is present, if the subscription expires, the expires_at will be shifted by the same amount of time as the difference between the old and new “next billing” dates. | | `agreement_terms` | `String` | Optional | (Optional) The ACH authorization agreement terms. If enabled, an email will be sent to the customer with a copy of the terms. | | `authorizer_first_name` | `String` | Optional | (Optional) The first name of the person authorizing the ACH agreement. | | `authorizer_last_name` | `String` | Optional | (Optional) The last name of the person authorizing the ACH agreement. | | `calendar_billing_first_charge` | `String` | Optional | (Optional) One of “prorated” (the default – the prorated product price will be charged immediately), “immediate” (the full product price will be charged immediately), or “delayed” (the full product price will be charged with the first scheduled renewal). | | `reason_code` | `String` | Optional | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to indicate why a subscription was canceled. | | `product_change_delayed` | `Boolean` | Optional | (Optional) used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. | | `offer_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-offer-id) | Optional | Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify id of the offer or its handle prefixed with `handle:`. | | `prepaid_configuration` | [`Upsert Prepaid Configuration`](https://developers.maxio.com/http/advanced-billing-api/models/structures/upsert-prepaid-configuration) | Optional | - | | `previous_billing_at` | `DateTime` | Optional | Providing a previous_billing_at that is in the past will set the current_period_starts_at when the subscription is created. It will also set activated_at if not explicitly passed during the subscription import. Can only be used if next_billing_at is also passed. Using this option will allow you to set the period start for the subscription so mid period component allocations have the correct prorated amount. | | `import_mrr` | `Boolean` | Optional | Setting this attribute to true will cause the subscription's MRR to be added to your MRR analytics immediately. For this value to be honored, a next_billing_at must be present and set to a future date. This key/value will not be returned in the subscription response body. | | `canceled_at` | `DateTime` | Optional | - | | `activated_at` | `DateTime` | Optional | - | | `agreement_acceptance` | [`Agreement Acceptance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/agreement-acceptance) | Optional | Required when creating a subscription with Maxio Payments. | | `ach_agreement` | [`ACH Agreement`](https://developers.maxio.com/http/advanced-billing-api/models/structures/ach-agreement) | Optional | (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted. | | `dunning_communication_delay_enabled` | `Boolean` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute.

**Default**: `false` | | `dunning_communication_delay_time_zone` | `String` | Optional | Time zone for the Dunning Communication Delay feature. | | `skip_billing_manifest_taxes` | `Boolean` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests. Defaults to `false` when not provided. | # Example (as JSON) ```json { "defer_signup": false, "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" }, "dunning_communication_delay_enabled": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "product_handle": "product_handle6", "product_id": 212, "product_price_point_handle": "product_price_point_handle0", "product_price_point_id": 136, "custom_price": { "name": "name4", "handle": "handle0", "price_in_cents": "String3", "interval": "String3", "interval_unit": "day", "trial_price_in_cents": "String3", "trial_interval": "String5", "trial_interval_unit": "day" } } ``` ##### Create Subscription Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-component-id) | Optional | - | | `enabled` | `Boolean` | Optional | Used for on/off components only. | | `unit_balance` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-unit-balance) | Optional | Used for metered and events based components. | | `allocated_quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-allocated-quantity) | Optional | Used for quantity based components. | | `quantity` | `Number` | Optional | Deprecated. Use `allocated_quantity` instead. | | `price_point_id` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-price-point-id) | Optional | - | | `custom_price` | [`Component Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-custom-price) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | # Example (as JSON) ```json { "component_id": 8, "enabled": false, "unit_balance": 66, "allocated_quantity": 102, "quantity": 188 } ``` ##### Create Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-group # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Required | - | | `member_ids` | `array` | Optional | - | # Example (as JSON) ```json { "subscription_id": 38, "member_ids": [ 162 ] } ``` ##### Create Subscription Group Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-group-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_group` | [`Create Subscription Group`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-group) | Required | - | # Example (as JSON) ```json { "subscription_group": { "subscription_id": 36, "member_ids": [ 164, 165 ] } } ``` ##### Create Subscription Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription` | [`Create Subscription`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-subscription) | Required | - | # Example (as JSON) ```json { "subscription": { "defer_signup": false, "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" }, "dunning_communication_delay_enabled": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "product_handle": "product_handle6", "product_id": 206, "product_price_point_handle": "product_price_point_handle2", "product_price_point_id": 130, "custom_price": { "name": "name4", "handle": "handle0", "price_in_cents": "String3", "interval": "String3", "interval_unit": "day", "trial_price_in_cents": "String3", "trial_interval": "String5", "trial_interval_unit": "day" } } } ``` ##### Create Usage Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-usage # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `quantity` | `Decimal` | Optional | integer by default or decimal number if fractional quantities are enabled for the component | | `price_point_id` | `String` | Optional | - | | `memo` | `String` | Optional | - | | `billing_schedule` | [`Billing Schedule`](https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-schedule) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | | `custom_price` | [`Component Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-custom-price) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | # Example (as JSON) ```json { "quantity": 23.44, "price_point_id": "price_point_id0", "memo": "memo2", "billing_schedule": { "initial_billing_at": "2016-03-13" }, "custom_price": { "tax_included": false, "pricing_scheme": "stairstep", "interval": 66, "interval_unit": "day", "list_price_point_id": 174, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } } ``` ##### Create Usage Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/create-usage-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `usage` | [`Create Usage`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-usage) | Required | - | # Example (as JSON) ```json { "usage": { "quantity": 162.34, "price_point_id": "price_point_id0", "memo": "memo2", "billing_schedule": { "initial_billing_at": "2016-03-13" }, "custom_price": { "tax_included": false, "pricing_scheme": "stairstep", "interval": 66, "interval_unit": "day", "list_price_point_id": 174, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } } } ``` ##### Created Prepayment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/created-prepayment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Optional | **Constraints**: `>= 1` | | `subscription_id` | `Number` | Optional | **Constraints**: `>= 1` | | `amount_in_cents` | `Long` | Optional | **Constraints**: `>= 0.01` | | `memo` | `String` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `starting_balance_in_cents` | `Long` | Optional | **Constraints**: `>= 0` | | `ending_balance_in_cents` | `Long` | Optional | - | # Example (as JSON) ```json { "id": 110, "subscription_id": 220, "amount_in_cents": 196, "memo": "memo6", "created_at": "2016-03-13T12:52:32.123Z" } ``` ##### Credit Account Balance Changed Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-account-balance-changed # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `reason` | `String` | Required | - | | `service_credit_account_balance_in_cents` | `Long` | Required | - | | `service_credit_balance_change_in_cents` | `Long` | Required | - | | `currency_code` | `String` | Required | - | | `at_time` | `DateTime` | Required | - | # Example (as JSON) ```json { "reason": "reason8", "service_credit_account_balance_in_cents": 10, "service_credit_balance_change_in_cents": 116, "currency_code": "currency_code8", "at_time": "2016-03-13T12:52:32.123Z" } ``` ##### Credit Card Attributes Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-card-attributes # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `full_number` | `String` | Optional | - | | `expiration_month` | `String` | Optional | - | | `expiration_year` | `String` | Optional | - | # Example (as JSON) ```json { "full_number": "full_number0", "expiration_month": "expiration_month6", "expiration_year": "expiration_year0" } ``` ##### Credit Note Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | Unique identifier for the credit note. It is generated automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters. | | `site_id` | `Number` | Optional | ID of the site to which the credit note belongs. | | `customer_id` | `Number` | Optional | ID of the customer to which the credit note belongs. | | `subscription_id` | `Number` | Optional | ID of the subscription that generated the credit note. | | `number` | `String` | Optional | A unique, identifying string that appears on the credit note and in places it is referenced.

While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike. | | `sequence_number` | `Number` | Optional | A monotonically increasing number assigned to credit notes as they are created. This number is unique within a site and can be used to sort and order credit notes. | | `issue_date` | `Date` | Optional | Date the credit note was issued to the customer. This is the date that the credit was made available for application, and may come before it is fully applied.

The format is `"YYYY-MM-DD"`. | | `applied_date` | `Date` | Optional | Credit notes are applied to invoices to offset invoiced amounts - they reduce the amount due. This field is the date the credit note became fully applied to invoices.

If the credit note has been partially applied, this field will not have a value until it has been fully applied.

The format is `"YYYY-MM-DD"`. | | `status` | [`Credit Note Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-note-status) | Optional | Current status of the credit note. | | `currency` | `String` | Optional | The ISO 4217 currency code (3 character string) representing the currency of the credit note amount fields. | | `memo` | `String` | Optional | The memo printed on credit note, which is a description of the reason for the credit. | | `seller` | [`Invoice Seller`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-seller) | Optional | Information about the seller (merchant) listed on the masthead of the credit note. | | `customer` | [`Invoice Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-customer) | Optional | Information about the customer who is owner or recipient of the credited subscription. | | `billing_address` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Optional | The billing address of the credit subscription. | | `shipping_address` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Optional | The shipping address of the credited subscription. | | `subtotal_amount` | `String` | Optional | Subtotal of the credit note, which is the sum of all line items before discounts or taxes. Note that this is a positive amount representing the credit back to the customer. | | `discount_amount` | `String` | Optional | Total discount applied to the credit note. Note that this is a positive amount representing the discount amount being credited back to the customer (i.e., a credit on an earlier discount). For example, if the original purchase was $1.00 and the original discount was $0.10, a credit of $0.50 of the original purchase (half) would have a discount credit of $0.05 (also half). | | `tax_amount` | `String` | Optional | Total tax of the credit note. Note that this is a positive amount representing a previously taxed amount being credited back to the customer (i.e., a credit of an earlier tax). For example, if the original purchase was $1.00 and the original tax was $0.10, a credit of $0.50 of the original purchase (half) would also have a tax credit of $0.05 (also half). | | `total_amount` | `String` | Optional | The credit note total, which is `subtotal_amount - discount_amount + tax_amount`. | | `applied_amount` | `String` | Optional | The amount of the credit note that has already been applied to invoices. | | `remaining_amount` | `String` | Optional | The amount of the credit note remaining to be applied to invoices, which is `total_amount - applied_amount`. | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note-line-item) | Optional | Line items on the credit note. | | `discounts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-discount) | Optional | - | | `taxes` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax) | Optional | - | | `applications` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note-application) | Optional | - | | `refunds` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-refund) | Optional | - | | `origin_invoices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/origin-invoice) | Optional | An array of origin invoices for the credit note. Learn more about [Origin Invoice from our docs](https://maxio.zendesk.com/hc/en-us/articles/24252261284749-Credit-Notes-Proration#origin-invoices). | # Example (as JSON) ```json { "uid": "uid2", "site_id": 218, "customer_id": 74, "subscription_id": 146, "number": "number0" } ``` ##### Credit Note Application Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note-application # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `transaction_time` | `DateTime` | Optional | - | | `invoice_uid` | `String` | Optional | - | | `memo` | `String` | Optional | - | | `applied_amount` | `String` | Optional | - | # Example (as JSON) ```json { "uid": "uid0", "transaction_time": "2016-03-13T12:52:32.123Z", "invoice_uid": "invoice_uid0", "memo": "memo4", "applied_amount": "applied_amount8" } ``` ##### Credit Note Line Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note-line-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | Unique identifier for the line item. Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists. | | `title` | `String` | Optional | A short descriptor for the credit given by this line. | | `description` | `String` | Optional | Detailed description for the credit given by this line. May include proration details in plain text.

Note: this string may contain line breaks that are hints for the best display format on the credit note. | | `quantity` | `String` | Optional | The quantity or count of units credited by the line item.

This is a decimal number represented as a string. (See "About Decimal Numbers".) | | `unit_price` | `String` | Optional | The price per unit for the line item.

When tiered pricing was used (i.e., not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. | | `subtotal_amount` | `String` | Optional | The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount). | | `discount_amount` | `String` | Optional | The approximate discount of just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. | | `tax_amount` | `String` | Optional | The approximate tax of just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. | | `tax_included` | `Boolean` | Optional | Whether the unit price for this line item is tax-inclusive.

When `true`, `unit_price` already includes tax and `tax_amount` represents the portion of the price attributable to tax. When `false`, any applicable tax is added on top of the price.

The value is inherited from the source price point's `tax_included` setting. Custom or ad-hoc line items (which have no associated price point) always return `false`. | | `total_amount` | `String` | Optional | The non-canonical total amount for the line.

`subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. | | `tiered_unit_price` | `Boolean` | Optional | When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units. | | `period_range_start` | `Date` | Optional | Start date for the period credited by this line. The format is `"YYYY-MM-DD"`. | | `period_range_end` | `Date` | Optional | End date for the period credited by this line. The format is `"YYYY-MM-DD"`. | | `product_id` | `Number` | Optional | The ID of the product being credited.

This may be set even for component credits, so true product-only (non-component) credits will also have a nil `component_id`. | | `product_version` | `Number` | Optional | The version of the product being credited. | | `component_id` | `Number` | Optional | The ID of the component being credited. Will be `nil` for non-component credits. | | `price_point_id` | `Number` | Optional | The price point ID of the component being credited. Will be `nil` for non-component credits. | | `billing_schedule_item_id` | `Number` | Optional | - | | `custom_item` | `Boolean` | Optional | - | | `prepaid_allocation_expires_at` | `Date` | Optional | The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. | # Example (as JSON) ```json { "uid": "uid4", "title": "title0", "description": "description6", "quantity": "quantity0", "unit_price": "unit_price2" } ``` ##### Credit Scheme Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-scheme-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `credit_scheme` | [`Credit Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-scheme) | Required | - | # Example (as JSON) ```json { "credit_scheme": "credit" } ``` ##### Currency Overage Prices Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-overage-prices Extends a component price point with currency overage prices. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `type` | [`Price Point Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type) | Optional | Price point type. We expose the following types:

1. **default**: a price point that is marked as a default price for a certain product.
2. **custom**: a custom price point.
3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. | | `default` | `Boolean` | Optional | Note: Refer to type attribute instead. | | `name` | `String` | Optional | - | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `component_id` | `Number` | Optional | - | | `handle` | `String` | Optional | - | | `archived_at` | `DateTime` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price) | Optional | - | | `use_site_exchange_rate` | `Boolean` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Defaults to true during creation. | | `subscription_id` | `Number` | Optional | (only used for Custom Pricing - ie. when the price point's type is `custom`) The id of the subscription that the custom price point is for. | | `tax_included` | `Boolean` | Optional | - | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-price) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. The clone endpoint always returns currency prices if they are present. | | `overage_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price) | Optional | Applicable only to prepaid usage components. An array of overage price brackets. | | `overage_pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | Applicable only to prepaid usage components. Pricing scheme for overage pricing. | | `renew_prepaid_allocation` | `Boolean` | Optional | Applicable only to prepaid usage components. Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. | | `rollover_prepaid_remainder` | `Boolean` | Optional | Applicable only to prepaid usage components. Boolean which controls whether or not remaining units should be rolled over to the next period. | | `expiration_interval` | `Number` | Optional | Applicable only to prepaid usage components where rollover_prepaid_remainder is true. The number of `expiration_interval_unit`s after which rollover amounts should expire. | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | Applicable only to prepaid usage components where rollover_prepaid_remainder is true. A string representing the expiration interval unit for this component, either month or day. | | `currency_overage_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-currency-price) | Optional | Applicable only to prepaid usage components. An array of currency pricing data for overage prices. | # Example (as JSON) ```json { "id": 50, "type": "catalog", "default": false, "name": "name8", "pricing_scheme": "stairstep" } ``` ##### Currency Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `currency` | `String` | Optional | - | | `price` | `Decimal` | Optional | - | | `formatted_price` | `String` | Optional | - | | `price_id` | `Number` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `product_price_point_id` | `Number` | Optional | - | | `role` | [`Currency Price Role`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/currency-price-role) | Optional | Role for the price. | # Example (as JSON) ```json { "id": 88, "currency": "currency6", "price": 41.36, "formatted_price": "formatted_price4", "price_id": 178 } ``` ##### Currency Prices Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-prices-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-price) | Required | - | # Example (as JSON) ```json { "currency_prices": [ { "id": 50, "currency": "currency8", "price": 233.74, "formatted_price": "formatted_price6", "price_id": 116 } ] } ``` ##### Custom Field Value Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/custom-field-value-change # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `event_type` | `String` | Required | - | | `metafield_name` | `String` | Required | - | | `metafield_id` | `Number` | Required | - | | `old_value` | `String` | Required | - | | `new_value` | `String` | Required | - | | `resource_type` | `String` | Required | - | | `resource_id` | `Number` | Required | - | # Example (as JSON) ```json { "event_type": "event_type2", "metafield_name": "metafield_name6", "metafield_id": 78, "old_value": "old_value2", "new_value": "new_value8", "resource_type": "resource_type2", "resource_id": 74 } ``` ##### Customer Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/customer # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Optional | The first name of the customer | | `last_name` | `String` | Optional | The last name of the customer | | `email` | `String` | Optional | The email address of the customer | | `cc_emails` | `String` | Optional | “A comma-separated list of emails that should be cc’d on all customer communications (e.g., “joe@example.com, sue@example.com”)” | | `organization` | `String` | Optional | The organization of the customer. If no value, `null` or empty string is provided, `organization` will be populated with the customer's first and last name, separated with a space. | | `reference` | `String` | Optional | The unique identifier used within your own application for this customer | | `id` | `Number` | Optional | The customer ID in Chargify | | `created_at` | `DateTime` | Optional | The timestamp in which the customer object was created in Chargify | | `updated_at` | `DateTime` | Optional | The timestamp in which the customer object was last edited | | `address` | `String` | Optional | The customer’s shipping street address (e.g., “123 Main St.”) | | `address_2` | `String` | Optional | Second line of the customer’s shipping address e.g., “Apt. 100” | | `city` | `String` | Optional | The customer’s shipping address city (e.g., “Boston”) | | `state` | `String` | Optional | The customer’s shipping address state (e.g., “MA”) | | `state_name` | `String` | Optional | The customer's full name of state | | `zip` | `String` | Optional | The customer’s shipping address zip code (e.g., “12345”) | | `country` | `String` | Optional | The customer shipping address country | | `country_name` | `String` | Optional | The customer's full name of country | | `phone` | `String` | Optional | The phone number of the customer | | `verified` | `Boolean` | Optional | Is the customer verified to use ACH as a payment method. | | `portal_customer_created_at` | `DateTime` | Optional | The timestamp of when the Billing Portal entry was created at for the customer | | `portal_invite_last_sent_at` | `DateTime` | Optional | The timestamp of when the Billing Portal invite was last sent at | | `portal_invite_last_accepted_at` | `DateTime` | Optional | The timestamp of when the Billing Portal invite was last accepted | | `tax_exempt` | `Boolean` | Optional | The tax exempt status for the customer. Acceptable values are true or 1 for true and false or 0 for false. | | `surcharging` | `Boolean` | Optional | Whether surcharging is enabled for the customer. Only included on sites where surcharging control is enabled. | | `vat_number` | `String` | Optional | The VAT business identification number for the customer. This number is used to determine VAT tax opt out rules. It is not validated when added or updated on a customer record. Instead, it is validated via VIES before calculating taxes. Only valid business identification numbers will allow for VAT opt out. | | `parent_id` | `Number` | Optional | The parent ID in Chargify if applicable. Parent is another Customer object. | | `locale` | `String` | Optional | The locale for the customer to identify language-region | | `default_subscription_group_uid` | `String` | Optional | - | | `salesforce_id` | `String` | Optional | The Salesforce ID for the customer | | `tax_exempt_reason` | `String` | Optional | The Tax Exemption Reason Code for the customer | | `default_auto_renewal_profile_id` | `Number` | Optional | The default auto-renewal profile ID for the customer | | `maxioid` | `String` | Optional | The Maxio-generated unique identifier for the customer. | | `branding_theme_id` | `Number` | Optional | The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. | # Example (as JSON) ```json { "first_name": "first_name8", "last_name": "last_name6", "email": "email8", "cc_emails": "cc_emails2", "organization": "organization8" } ``` ##### Customer Attributes Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-attributes # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Optional | The first name of the customer. Required when creating a customer via attributes. | | `last_name` | `String` | Optional | The last name of the customer. Required when creating a customer via attributes. | | `email` | `String` | Optional | The email address of the customer. Required when creating a customer via attributes. | | `cc_emails` | `String` | Optional | (Optional) A list of emails that should be cc’d on all customer communications. | | `organization` | `String` | Optional | (Optional) The organization/company of the customer. | | `reference` | `String` | Optional | (Optional) A customer “reference”, or unique identifier from your app, stored in Chargify. Can be used so that you may reference your customer’s within Chargify using the same unique value you use in your application. | | `address` | `String` | Optional | (Optional) The customer’s shipping street address (e.g., “123 Main St.”). | | `address_2` | `String` | Optional | (Optional) Second line of the customer’s shipping address e.g., “Apt. 100” | | `city` | `String` | Optional | (Optional) The customer’s shipping address city (e.g., “Boston”). | | `state` | `String` | Optional | “(Optional) The customer’s shipping address state (e.g., “MA”). This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes.” | | `zip` | `String` | Optional | (Optional) The customer’s shipping address zip code (e.g., “12345”). | | `country` | `String` | Optional | “(Optional) The customer shipping address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”).” | | `phone` | `String` | Optional | (Optional) The phone number of the customer. | | `verified` | `Boolean` | Optional | - | | `tax_exempt` | `Boolean` | Optional | (Optional) The tax_exempt status of the customer. Acceptable values are true or 1 for true and false or 0 for false. | | `surcharging` | `Boolean` | Optional | (Optional) Whether surcharging is enabled for the customer. Defaults to `true` when omitted. Only applied on sites where surcharging control is enabled. | | `vat_number` | `String` | Optional | (Optional) Supplying the VAT number allows EU customers to opt-out of the Value Added Tax assuming the merchant address and customer billing address are not within the same EU country. It’s important to omit the country code from the VAT number upon entry. Otherwise, taxes will be assessed upon the purchase. | | `metafields` | `map` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | | `parent_id` | `Number` | Optional | The parent ID in Chargify if applicable. Parent is another Customer object. | | `salesforce_id` | `String` | Optional | (Optional) The Salesforce ID of the customer. | | `default_auto_renewal_profile_id` | `Number` | Optional | (Optional) The default auto-renewal profile ID for the customer | # Example (as JSON) ```json { "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" }, "first_name": "first_name4", "last_name": "last_name2", "email": "email2", "cc_emails": "cc_emails6", "organization": "organization8" } ``` ##### Customer Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-change # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payer` | [`Customer Payer Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-payer-change) | Optional | - | | `shipping_address` | [`Address Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/address-change) | Optional | - | | `billing_address` | [`Address Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/address-change) | Optional | - | | `custom_fields` | [`Customer Custom Fields Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-custom-fields-change) | Optional | - | # Example (as JSON) ```json { "payer": { "before": { "first_name": "first_name0", "last_name": "last_name8", "organization": "organization4", "email": "email6" }, "after": { "first_name": "first_name2", "last_name": "last_name0", "organization": "organization4", "email": "email4" } }, "shipping_address": { "before": { "street": "street0", "line2": "line24", "city": "city0", "state": "state6", "zip": "zip4" }, "after": { "street": "street2", "line2": "line26", "city": "city8", "state": "state2", "zip": "zip4" } }, "billing_address": { "before": { "street": "street0", "line2": "line24", "city": "city0", "state": "state6", "zip": "zip4" }, "after": { "street": "street2", "line2": "line26", "city": "city8", "state": "state2", "zip": "zip4" } }, "custom_fields": { "before": [ { "owner_id": 26, "owner_type": "Customer", "name": "name0", "value": "value2", "metadatum_id": 26 }, { "owner_id": 26, "owner_type": "Customer", "name": "name0", "value": "value2", "metadatum_id": 26 } ], "after": [ { "owner_id": 130, "owner_type": "Customer", "name": "name2", "value": "value4", "metadatum_id": 130 }, { "owner_id": 130, "owner_type": "Customer", "name": "name2", "value": "value4", "metadatum_id": 130 }, { "owner_id": 130, "owner_type": "Customer", "name": "name2", "value": "value4", "metadatum_id": 130 } ] } } ``` ##### Customer Changes Preview Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-changes-preview-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `changes` | [`Customer Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-change) | Required | - | # Example (as JSON) ```json { "changes": { "payer": { "before": { "first_name": "first_name0", "last_name": "last_name8", "organization": "organization4", "email": "email6" }, "after": { "first_name": "first_name2", "last_name": "last_name0", "organization": "organization4", "email": "email4" } }, "shipping_address": { "before": { "street": "street0", "line2": "line24", "city": "city0", "state": "state6", "zip": "zip4" }, "after": { "street": "street2", "line2": "line26", "city": "city8", "state": "state2", "zip": "zip4" } }, "billing_address": { "before": { "street": "street0", "line2": "line24", "city": "city0", "state": "state6", "zip": "zip4" }, "after": { "street": "street2", "line2": "line26", "city": "city8", "state": "state2", "zip": "zip4" } }, "custom_fields": { "before": [ { "owner_id": 26, "owner_type": "Customer", "name": "name0", "value": "value2", "metadatum_id": 26 }, { "owner_id": 26, "owner_type": "Customer", "name": "name0", "value": "value2", "metadatum_id": 26 } ], "after": [ { "owner_id": 130, "owner_type": "Customer", "name": "name2", "value": "value4", "metadatum_id": 130 }, { "owner_id": 130, "owner_type": "Customer", "name": "name2", "value": "value4", "metadatum_id": 130 }, { "owner_id": 130, "owner_type": "Customer", "name": "name2", "value": "value4", "metadatum_id": 130 } ] } } } ``` ##### Customer Custom Fields Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-custom-fields-change # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `before` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-custom-field) | Required | - | | `after` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-custom-field) | Required | - | # Example (as JSON) ```json { "before": [ { "owner_id": 26, "owner_type": "Customer", "name": "name0", "value": "value2", "metadatum_id": 26 } ], "after": [ { "owner_id": 130, "owner_type": "Customer", "name": "name2", "value": "value4", "metadatum_id": 130 } ] } ``` ##### Customer Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customer` | `String` | Optional | - | # Example (as JSON) ```json { "customer": "customer8" } ``` ##### Customer Error Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-error-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Customer Error \| array`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/customer-error-response-1-errors) | Optional | - | # Example (as JSON) ```json { "errors": { "customer": "customer8" } } ``` ##### Customer Payer Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-payer-change # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `before` | [`Invoice Payer Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payer-change) | Required | - | | `after` | [`Invoice Payer Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payer-change) | Required | - | # Example (as JSON) ```json { "before": { "first_name": "first_name0", "last_name": "last_name8", "organization": "organization4", "email": "email6" }, "after": { "first_name": "first_name2", "last_name": "last_name0", "organization": "organization4", "email": "email4" } } ``` ##### Customer Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customer` | [`Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer) | Required | - | # Example (as JSON) ```json { "customer": { "first_name": "first_name0", "last_name": "last_name8", "email": "email6", "cc_emails": "cc_emails0", "organization": "organization6" } } ``` ##### Debit Note Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/debit-note # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | Unique identifier for the debit note. It is generated automatically by Chargify and has the prefix "db_" followed by alphanumeric characters. | | `site_id` | `Number` | Optional | ID of the site to which the debit note belongs. | | `customer_id` | `Number` | Optional | ID of the customer to which the debit note belongs. | | `subscription_id` | `Number` | Optional | ID of the subscription that generated the debit note. | | `number` | `Number` | Optional | A unique identifier that appears on the debit note and in places it is referenced. | | `sequence_number` | `Number` | Optional | A monotonically increasing number assigned to debit notes as they are created. | | `origin_credit_note_uid` | `String` | Optional | Unique identifier for the connected credit note. It is generated automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters.

While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike. | | `origin_credit_note_number` | `String` | Optional | A unique identifying string of the connected credit note. | | `issue_date` | `Date` | Optional | Date the document was issued to the customer. This is the date that the document was made available for payment.

The format is "YYYY-MM-DD". | | `applied_date` | `Date` | Optional | Debit notes are applied to invoices to offset invoiced amounts - they adjust the amount due. This field is the date the debit note document became fully applied to the invoice.

The format is "YYYY-MM-DD". | | `due_date` | `Date` | Optional | Date the document is due for payment. The format is "YYYY-MM-DD". | | `status` | [`Debit Note Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/debit-note-status) | Optional | Current status of the debit note. | | `memo` | `String` | Optional | The memo printed on debit note, which is a description of the reason for the debit. | | `role` | [`Debit Note Role`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/debit-note-role) | Optional | The role of the debit note. | | `currency` | `String` | Optional | The ISO 4217 currency code (3 character string) representing the currency of the credit note amount fields. | | `seller` | [`Invoice Seller`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-seller) | Optional | Information about the seller (merchant) listed on the masthead of the debit note. | | `customer` | [`Invoice Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-customer) | Optional | Information about the customer who is the owner or recipient of the debited subscription. | | `billing_address` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Optional | The billing address of the debited subscription. | | `shipping_address` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Optional | The shipping address of the debited subscription. | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note-line-item) | Optional | Line items on the debit note. | | `discounts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-discount) | Optional | - | | `taxes` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax) | Optional | - | | `refunds` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-refund) | Optional | - | # Example (as JSON) ```json { "uid": "uid2", "site_id": 112, "customer_id": 224, "subscription_id": 40, "number": 172 } ``` ##### Deduct Service Credit Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/deduct-service-credit # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/deduct-service-credit-amount) | Required | - | | `memo` | `String` | Optional | - | # Example (as JSON) ```json { "amount": "String1", "memo": "memo2" } ``` ##### Deduct Service Credit Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/deduct-service-credit-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `deduction` | [`Deduct Service Credit`](https://developers.maxio.com/http/advanced-billing-api/models/structures/deduct-service-credit) | Required | - | # Example (as JSON) ```json { "deduction": { "amount": "String9", "memo": "memo0" } } ``` ##### Delayed Cancellation Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/delayed-cancellation-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `message` | `String` | Optional | - | # Example (as JSON) ```json { "message": "message8" } ``` ##### Delete Subscription Group Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/delete-subscription-group-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `deleted` | `Boolean` | Optional | - | # Example (as JSON) ```json { "uid": "uid4", "deleted": false } ``` ##### Deliver Proforma Invoice Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/deliver-proforma-invoice-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `recipient_emails` | `array` | Optional | - | | `cc_recipient_emails` | `array` | Optional | - | | `bcc_recipient_emails` | `array` | Optional | - | # Example (as JSON) ```json { "recipient_emails": [ "recipient_emails9" ], "cc_recipient_emails": [ "cc_recipient_emails8" ], "bcc_recipient_emails": [ "bcc_recipient_emails2", "bcc_recipient_emails3", "bcc_recipient_emails4" ] } ``` ##### Dunner Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/dunner-data # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `state` | `String` | Required | - | | `subscription_id` | `Number` | Required | - | | `revenue_at_risk_in_cents` | `Long` | Required | - | | `created_at` | `DateTime` | Required | - | | `attempts` | `Number` | Required | - | | `last_attempted_at` | `DateTime` | Required | - | # Example (as JSON) ```json { "state": "state4", "subscription_id": 126, "revenue_at_risk_in_cents": 30, "created_at": "2016-03-13T12:52:32.123Z", "attempts": 110, "last_attempted_at": "2016-03-13T12:52:32.123Z" } ``` ##### Dunning Step Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/dunning-step-data # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `day_threshold` | `Number` | Required | - | | `action` | `String` | Required | - | | `email_body` | `String` | Optional | - | | `email_subject` | `String` | Optional | - | | `send_email` | `Boolean` | Required | - | | `send_bcc_email` | `Boolean` | Required | - | | `send_sms` | `Boolean` | Required | - | | `sms_body` | `String` | Optional | - | # Example (as JSON) ```json { "day_threshold": 88, "action": "action4", "email_body": "email_body4", "email_subject": "email_subject4", "send_email": false, "send_bcc_email": false, "send_sms": false, "sms_body": "sms_body0" } ``` ##### Dunning Step Reached Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/dunning-step-reached # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `dunner` | [`Dunner Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/dunner-data) | Required | - | | `current_step` | [`Dunning Step Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/dunning-step-data) | Required | - | | `next_step` | [`Dunning Step Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/dunning-step-data) | Required | - | # Example (as JSON) ```json { "dunner": { "state": "state8", "subscription_id": 194, "revenue_at_risk_in_cents": 98, "created_at": "2016-03-13T12:52:32.123Z", "attempts": 42, "last_attempted_at": "2016-03-13T12:52:32.123Z" }, "current_step": { "day_threshold": 198, "action": "action4", "email_body": "email_body4", "email_subject": "email_subject6", "send_email": false, "send_bcc_email": false, "send_sms": false, "sms_body": "sms_body0" }, "next_step": { "day_threshold": 30, "action": "action4", "email_body": "email_body4", "email_subject": "email_subject4", "send_email": false, "send_bcc_email": false, "send_sms": false, "sms_body": "sms_body0" } } ``` ##### EBB Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/ebb-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, i.e., "Minutes". | | `unit_name` | `String` | Required | “The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e., “message”, which may then be shown as “5 messages” on a subscription’s component line-item” | | `description` | `String` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | | `handle` | `String` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-item) | Optional | - | | `unit_price` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/ebb-component-unit-price) | Optional | The amount the customer will be charged per unit when the pricing scheme is “per_unit”. The price can contain up to 8 decimal places. i.e., 1.00 or 0.0012 or 0.00000065 | | `tax_code` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `hide_date_range_on_invoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | | `event_based_billing_metric_id` | `Number` | Required | The ID of an event based billing metric that will be attached to this component. | | `interval` | `Number` | Optional | The numerical interval. i.e., an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `unspsc_code` | `String` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | # Example (as JSON) ```json { "name": "name0", "unit_name": "unit_name2", "description": "description0", "handle": "handle6", "taxable": false, "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "price_points": [ { "name": "name2", "handle": "handle8", "pricing_scheme": "per_unit", "interval": 92, "interval_unit": "day" } ], "event_based_billing_metric_id": 190 } ``` ##### EBB Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/ebb-event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `chargify` | [`Chargify EBB`](https://developers.maxio.com/http/advanced-billing-api/models/structures/chargify-ebb) | Optional | - | # Example (as JSON) ```json { "chargify": { "subscription_id": 1, "timestamp": "2020-02-27T17:45:50-05:00" }, "messages": 150, "country": "US", "customer": { "name": "John", "lastName": "Doe", "address": { "street": "Maple Street", "zip": 4888, "state": "MA" } } } ``` ##### Enable Webhooks Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/enable-webhooks-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `webhooks_enabled` | `Boolean` | Required | - | # Example (as JSON) ```json { "webhooks_enabled": false } ``` ##### Enable Webhooks Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/enable-webhooks-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `webhooks_enabled` | `Boolean` | Optional | - | # Example (as JSON) ```json { "webhooks_enabled": false } ``` ##### Endpoint Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/endpoint # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `url` | `String` | Optional | - | | `site_id` | `Number` | Optional | - | | `status` | `String` | Optional | - | | `webhook_subscriptions` | `array` | Optional | - | # Example (as JSON) ```json { "id": 196, "url": "url2", "site_id": 122, "status": "status0", "webhook_subscriptions": [ "webhook_subscriptions4", "webhook_subscriptions3" ] } ``` ##### Endpoint Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/endpoint-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `endpoint` | [`Endpoint`](https://developers.maxio.com/http/advanced-billing-api/models/structures/endpoint) | Optional | - | # Example (as JSON) ```json { "endpoint": { "id": 202, "url": "url2", "site_id": 128, "status": "status0", "webhook_subscriptions": [ "webhook_subscriptions4" ] } } ``` ##### Error Array Map Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/error-array-map-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `map` | Optional | - | # Example (as JSON) ```json { "errors": { "key0": { "key1": "val1", "key2": "val2" }, "key1": { "key1": "val1", "key2": "val2" }, "key2": { "key1": "val1", "key2": "val2" } } } ``` ##### Error List Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/error-list-response-1 Error which contains list of messages. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `array` | Required | - | # Example (as JSON) ```json { "errors": [ "errors5" ] } ``` ##### Error String Map Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/error-string-map-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `map` | Optional | - | # Example (as JSON) ```json { "errors": { "key0": "errors9" } } ``` ##### Errors Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/errors # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `per_page` | `array` | Optional | - | | `price_point` | `array` | Optional | - | # Example (as JSON) ```json { "per_page": [ "per_page7", "per_page8" ], "price_point": [ "price_point6", "price_point7" ] } ``` ##### Event Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Required | - | | `key` | [`Event Key`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/event-key) | Required | - | | `message` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `subscription_id` | `Number` | Required | - | | `customer_id` | `Number` | Required | - | | `created_at` | `DateTime` | Required | - | | `event_specific_data` | [`Subscription Product Change \| Subscription State Change \| Payment Related Events \| Refund Success \| Component Allocation Change \| Metered Usage \| Prepaid Usage \| Dunning Step Reached \| Invoice Issued \| Pending Cancellation Change \| Prepaid Subscription Balance Changed \| Proforma Invoice Issued \| Subscription Group Signup Event Data \| Credit Account Balance Changed \| Prepayment Account Balance Changed \| Payment Collection Method Changed \| Item Price Point Changed \| Custom Field Value Change \| Chjs Tokenization Success \| Chjs Tokenization Failure`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/event-event-specific-data) | Required | The schema varies based on the event key. The key-to-event data mapping is as follows:

* `subscription_product_change`, `subscription_product_change_scheduled` - SubscriptionProductChange
* `subscription_state_change` - SubscriptionStateChange
* `signup_success`, `delayed_signup_creation_success`, `payment_success`, `payment_failure`, `renewal_success`, `renewal_failure`, `chargeback_lost`, `chargeback_accepted`, `chargeback_closed` - PaymentRelatedEvents
* `refund_success` - RefundSuccess
* `component_allocation_change` - ComponentAllocationChange
* `metered_usage` - MeteredUsage
* `prepaid_usage` - PrepaidUsage
* `dunning_step_reached` - DunningStepReached
* `invoice_issued` - InvoiceIssued
* `pending_cancellation_change` - PendingCancellationChange
* `prepaid_subscription_balance_changed` - PrepaidSubscriptionBalanceChanged
* `subscription_group_signup_success` and `subscription_group_signup_failure` - SubscriptionGroupSignupEventData
* `proforma_invoice_issued` - ProformaInvoiceIssued
* `subscription_prepayment_account_balance_changed` - PrepaymentAccountBalanceChanged
* `payment_collection_method_changed` - PaymentCollectionMethodChanged
* `subscription_service_credit_account_balance_changed` - CreditAccountBalanceChanged
* `item_price_point_changed` - ItemPricePointChanged
* `custom_field_value_change` - CustomFieldValueChange
* `chjs_tokenization_success` - ChjsTokenizationSuccess
* `chjs_tokenization_failure` - ChjsTokenizationFailure
* The rest, that is `delayed_signup_creation_failure`, `billing_date_change`, `expiration_date_change`, `expiring_card`,
`customer_update`, `customer_create`, `customer_delete`, `upgrade_downgrade_success`, `upgrade_downgrade_failure`,
`statement_closed`, `statement_settled`, `subscription_card_update`, `subscription_group_card_update`,
`subscription_bank_account_update`, `refund_failure`, `upcoming_renewal_notice`, `trial_end_notice`,
`direct_debit_payment_paid_out`, `direct_debit_payment_rejected`, `direct_debit_payment_pending`, `pending_payment_created`,
`pending_payment_failed`, `pending_payment_completed`, don't have event_specific_data defined,
`renewal_success_recreated`, `renewal_failure_recreated`, `payment_success_recreated`, `payment_failure_recreated`,
`subscription_deletion`, `subscription_group_bank_account_update`, `subscription_paypal_account_update`, `subscription_group_paypal_account_update`,
`subscription_customer_change`, `account_transaction_changed`, `go_cardless_payment_paid_out`, `go_cardless_payment_rejected`,
`go_cardless_payment_pending`, `stripe_direct_debit_payment_paid_out`, `stripe_direct_debit_payment_rejected`, `stripe_direct_debit_payment_pending`,
`maxio_payments_direct_debit_payment_paid_out`, `maxio_payments_direct_debit_payment_rejected`, `maxio_payments_direct_debit_payment_pending`,
`invoice_in_collections_canceled`, `subscription_added_to_group`, `subscription_removed_from_group`, `chargeback_opened`, `chargeback_lost`,
`chargeback_accepted`, `chargeback_closed`, `chargeback_won`, `payment_collection_method_changed`, `component_billing_date_changed`,
`subscription_term_renewal_scheduled`, `subscription_term_renewal_pending`, `subscription_term_renewal_activated`, `subscription_term_renewal_removed`
they map to `null` instead. | # Example (as JSON) ```json { "id": 40, "key": "payment_collection_method_changed", "message": "message8", "subscription_id": 150, "customer_id": 78, "created_at": "2016-03-13T12:52:32.123Z", "event_specific_data": { "previous_unit_balance": null, "previous_overage_unit_balance": null, "new_unit_balance": null, "new_overage_unit_balance": null, "usage_quantity": null, "overage_usage_quantity": null, "component_id": null, "component_handle": null, "memo": null, "allocation_details": [ null ], "previous_product_id": 126, "new_product_id": 12, "previous_product_price_point_id": 250, "new_product_price_point_id": 244, "effective_at": "2016-03-13T12:52:32.123Z" } } ``` ##### Event Based Billing List Segments Errors 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-list-segments-errors-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Errors`](https://developers.maxio.com/http/advanced-billing-api/models/structures/errors) | Optional | - | # Example (as JSON) ```json { "errors": { "per_page": [ "per_page1", "per_page2", "per_page3" ], "price_point": [ "price_point0", "price_point9", "price_point8" ] } } ``` ##### Event Based Billing Segment Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-segment-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `segments` | `map` | Required | The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key. | # Example (as JSON) ```json { "segments": { "key0": { "key1": "val1", "key2": "val2" }, "key1": { "key1": "val1", "key2": "val2" } } } ``` ##### Event Based Billing Segment Errors 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-segment-errors-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `map` | Optional | The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key. | # Example (as JSON) ```json { "errors": { "key0": { "key1": "val1", "key2": "val2" } } } ``` ##### Event Based Billing Segment 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-segment-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Event Based Billing Segment Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-segment-error) | Required | - | # Example (as JSON) ```json { "errors": { "segments": { "key0": { "key1": "val1", "key2": "val2" } } } } ``` ##### Event Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/event-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `event` | [`Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/event) | Required | - | # Example (as JSON) ```json { "event": { "id": 242, "key": "subscription_removed_from_group", "message": "message0", "subscription_id": 96, "customer_id": 24, "created_at": "2016-03-13T12:52:32.123Z", "event_specific_data": { "previous_unit_balance": null, "previous_overage_unit_balance": null, "new_unit_balance": null, "new_overage_unit_balance": null, "usage_quantity": null, "overage_usage_quantity": null, "component_id": null, "component_handle": null, "memo": null, "allocation_details": [ null ], "previous_product_id": 126, "new_product_id": 12, "previous_product_price_point_id": 250, "new_product_price_point_id": 244, "effective_at": "2016-03-13T12:52:32.123Z" } } } ``` ##### Failed Payment Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/failed-payment-event-data Example schema for an `failed_payment` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount_in_cents` | `Number` | Required | The monetary value of the payment, expressed in cents. | | `applied_amount` | `Number` | Required | The monetary value of the payment, expressed in dollars. | | `memo` | `String` | Optional | The memo passed when the payment was created. | | `payment_method` | [`Invoice Payment Method Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-payment-method-type) | Required | - | | `transaction_id` | `Number` | Required | The transaction ID of the failed payment. | # Example (as JSON) ```json { "amount_in_cents": 128, "applied_amount": 154, "memo": "memo2", "payment_method": "credit_card", "transaction_id": 170 } ``` ##### Feature Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `key` | `String` | Required | A unique, lowercase, underscore-separated identifier for the feature. Immutable once set. | | `name` | `String` | Required | The display name of the feature. | | `description` | `String` | Optional | - | | `kind` | [`Feature Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-kind) | Required | The behavior of a feature:

- `access_right`: a boolean entitlement — a subscriber either has access or does not.
- `usage_limit`: a quantified allowance measured over a recurring period (for example, "10,000 API calls per month").
- `service_right`: a free-form value (text, boolean, or number) that isn't a simple access flag or a metered limit. | | `unit` | `String` | Optional | Required when `kind` is `usage_limit`. | | `value_type` | [`Feature Value Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-value-type) | Optional | Required when `kind` is `service_right`. Ignored for other kinds, where it is inferred automatically. | | `default_value` | `String` | Optional | - | | `default_periodicity_interval` | `Number` | Optional | Only valid when `kind` is `usage_limit`. | | `default_periodicity_unit` | [`Entitlement Periodicity Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/entitlement-periodicity-unit) | Optional | Only valid when `kind` is `usage_limit`. Must be set together with `default_periodicity_interval`. | # Example (as JSON) ```json { "key": "sso", "name": "name0", "kind": "access_right", "description": "description0", "unit": "unit8", "value_type": "text", "default_value": "default_value0", "default_periodicity_interval": 134 } ``` ##### Feature Catalog Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item A feature template attached to a specific product or component (or one of their price points), with a concrete value. When a subscriber signs up for or is assigned this product/component, the feature catalog item is provisioned as an entitlement on their subscription. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `feature_template_id` | `Number` | Optional | The id of the feature template this item was created from. | | `feature_key` | `String` | Optional | The `key` of the parent feature template. | | `feature_name` | `String` | Optional | The `name` of the parent feature template. | | `feature_kind` | [`Feature Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-kind) | Optional | The behavior of a feature:

- `access_right`: a boolean entitlement — a subscriber either has access or does not.
- `usage_limit`: a quantified allowance measured over a recurring period (for example, "10,000 API calls per month").
- `service_right`: a free-form value (text, boolean, or number) that isn't a simple access flag or a metered limit. | | `value` | `String` | Optional | The value granted by this feature catalog item. Interpreted according to `feature_kind`: `"true"`/`"false"` for `access_right`, a numeric string for `usage_limit`, or any string for `service_right` (shaped by the feature template's `value_type`). | | `periodicity_interval` | `Number` | Optional | Set when `feature_kind` is `usage_limit`; `null` otherwise. | | `periodicity_unit` | [`Entitlement Periodicity Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/entitlement-periodicity-unit) | Optional | Set when `feature_kind` is `usage_limit`; `null` otherwise. | | `price_point_type` | [`Feature Owner Price Point Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-owner-price-point-type) | Optional | `null` when this feature catalog item applies to every price point of its owning product/component. Set when it's an override for one specific price point. | | `price_point_id` | `Number` | Optional | Set together with `price_point_type` for price-point-specific overrides. | | `archived_at` | `DateTime` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "id": 152, "feature_template_id": 142, "feature_key": "feature_key2", "feature_name": "feature_name6", "feature_kind": "access_right" } ``` ##### Feature Catalog Item Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `feature` | [`Feature Catalog Item`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item) | Required | A feature template attached to a specific product or component (or one of their price points), with a concrete value. When a subscriber signs up for or is assigned this product/component, the feature catalog item is provisioned as an entitlement on their subscription. | # Example (as JSON) ```json { "feature": { "id": 206, "feature_template_id": 196, "feature_key": "feature_key2", "feature_name": "feature_name6", "feature_kind": "service_right" } } ``` ##### Feature Catalog Items List Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-items-list-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `features` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item) | Required | - | | `subscriptions_count` | `Number` | Required | The number of subscriptions on this product/component that would be affected if a feature catalog item change were propagated with `propagate_to_subscriptions=true`. | # Example (as JSON) ```json { "features": [ { "id": 174, "feature_template_id": 164, "feature_key": "feature_key2", "feature_name": "feature_name6", "feature_kind": "access_right" } ], "subscriptions_count": 14 } ``` ##### Feature Template Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template A feature that can be granted to subscribers, defined once at the site level and then attached to products or components. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | The Advanced Billing id of the feature template. | | `key` | `String` | Optional | A unique, lowercase, underscore-separated identifier for the feature. Immutable once set. | | `name` | `String` | Optional | The display name of the feature. | | `description` | `String` | Optional | An optional description of the feature. | | `kind` | [`Feature Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-kind) | Optional | The behavior of a feature:

- `access_right`: a boolean entitlement — a subscriber either has access or does not.
- `usage_limit`: a quantified allowance measured over a recurring period (for example, "10,000 API calls per month").
- `service_right`: a free-form value (text, boolean, or number) that isn't a simple access flag or a metered limit. | | `unit` | `String` | Optional | The unit the feature is measured in (for example, `requests` or `GB`). Required when `kind` is `usage_limit`. | | `value_type` | [`Feature Value Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-value-type) | Optional | The data type of a feature's value. For `access_right` features this is always `boolean`, and for `usage_limit` features this is always `numeric`. For `service_right` features, you choose the value type explicitly. | | `default_value` | `String` | Optional | A default value used to pre-populate new feature catalog items created from this template. | | `default_periodicity_interval` | `Number` | Optional | For `usage_limit` features, the default periodicity interval used to pre-populate new feature catalog items. Always `null` for other kinds. | | `default_periodicity_unit` | [`Entitlement Periodicity Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/entitlement-periodicity-unit) | Optional | For `usage_limit` features, the default periodicity unit used to pre-populate new feature catalog items. Always `null` for other kinds. | | `archived_at` | `DateTime` | Optional | The date and time the feature template was archived, or `null` if it is active. | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `products_count` | `Number` | Optional | The number of **components** this feature template is currently attached to via an active feature catalog item. Despite the name, this counts components, not products — in the Advanced Billing UI, components are labelled "Products." | | `plans_count` | `Number` | Optional | The number of **products** this feature template is currently attached to via an active feature catalog item. Despite the name, this counts products, not plans — in the Advanced Billing UI, products are labelled "Plans." | # Example (as JSON) ```json { "key": "sso", "name": "Single Sign-On", "id": 98, "description": "description0", "kind": "access_right" } ``` ##### Feature Template Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `feature` | [`Feature Template`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template) | Required | A feature that can be granted to subscribers, defined once at the site level and then attached to products or components. | # Example (as JSON) ```json { "feature": { "key": "sso", "name": "Single Sign-On", "id": 206, "description": "description4", "kind": "usage_limit" } } ``` ##### Feature Templates List Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-templates-list-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-template) | Required | - | | `total_count` | `Number` | Required | Total number of feature templates matching the filters, across all pages. | | `archived_count` | `Number` | Required | Number of archived feature templates matching the filters. Returned as `0` unless the active result set is empty or `status=archived` was requested. | # Example (as JSON) ```json { "items": [ { "key": "sso", "name": "Single Sign-On", "id": 66, "description": "description2", "kind": "access_right" } ], "total_count": 50, "archived_count": 74 } ``` ##### Feature 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-1 `key` cannot be changed once set. `kind` cannot be changed once any feature catalog item has been created from this template. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Optional | - | | `description` | `String` | Optional | - | | `unit` | `String` | Optional | - | | `value_type` | [`Feature Value Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-value-type) | Optional | The data type of a feature's value. For `access_right` features this is always `boolean`, and for `usage_limit` features this is always `numeric`. For `service_right` features, you choose the value type explicitly. | | `default_value` | `String` | Optional | - | | `default_periodicity_interval` | `Number` | Optional | - | | `default_periodicity_unit` | [`Entitlement Periodicity Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/entitlement-periodicity-unit) | Optional | - | # Example (as JSON) ```json { "name": "name6", "description": "description6", "unit": "unit4", "value_type": "text", "default_value": "default_value6" } ``` ##### Feature 2 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-2 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `feature_template_id` | `Number` | Required | The id of the feature template to attach. | | `value` | `String` | Required | - | | `periodicity_interval` | `Number` | Optional | - | | `periodicity_unit` | [`Entitlement Periodicity Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/entitlement-periodicity-unit) | Optional | - | | `price_point_type` | [`Feature Owner Price Point Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-owner-price-point-type) | Optional | Omit to have this feature catalog item apply to every price point of the product/component. Set together with `price_point_id` to scope it to a single price point. | | `price_point_id` | `Number` | Optional | - | | `propagate_to_subscriptions` | `Boolean` | Optional | When `true`, existing subscriptions on this product/component are immediately granted an entitlement for this feature, instead of waiting for their next subscription change.

**Default**: `false` | # Example (as JSON) ```json { "feature_template_id": 42, "value": "value0", "propagate_to_subscriptions": false, "periodicity_interval": 170, "periodicity_unit": "day", "price_point_type": "ProductPricePoint", "price_point_id": 70 } ``` ##### Feature 3 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-3 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `value` | `String` | Optional | - | | `periodicity_interval` | `Number` | Optional | - | | `periodicity_unit` | [`Entitlement Periodicity Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/entitlement-periodicity-unit) | Optional | - | | `propagate_to_subscriptions` | `Boolean` | Optional | When `true`, the new `value`/periodicity is immediately applied to every existing entitlement created from this feature catalog item.

**Default**: `false` | # Example (as JSON) ```json { "propagate_to_subscriptions": false, "value": "value8", "periodicity_interval": 220, "periodicity_unit": "year" } ``` ##### Full Subscription Group Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/full-subscription-group-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `scheme` | `Number` | Optional | - | | `customer_id` | `Number` | Optional | - | | `payment_profile_id` | `Number` | Optional | - | | `subscription_ids` | `array` | Optional | - | | `primary_subscription_id` | `Number` | Optional | - | | `next_assessment_at` | `DateTime` | Optional | - | | `state` | [`Subscription State`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state) | Optional | The state of a subscription.

* **Live States**
* `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
* `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
* `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
* **Problem States**
* `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
* `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
* `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`.
* **End of Life States**
* `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription.
While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
* `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
* `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
* `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
* `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
* `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details.

See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. | | `cancel_at_end_of_period` | `Boolean` | Optional | - | | `current_billing_amount_in_cents` | `Long` | Optional | - | | `customer` | [`Subscription Group Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-customer) | Optional | - | | `account_balances` | [`Subscription Group Balances`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-balances) | Optional | - | # Example (as JSON) ```json { "uid": "uid8", "scheme": 90, "customer_id": 110, "payment_profile_id": 18, "subscription_ids": [ 220, 221, 222 ] } ``` ##### Get One Time Token Bank Account Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/get-one-time-token-bank-account-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `String` | Optional | - | | `first_name` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `last_name` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `customer_id` | `String` | Optional | - | | `current_vault` | [`Bank Account Vault`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-vault) | Required | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | | `vault_token` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_address` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_address_2` | `String` | Optional | - | | `billing_city` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_country` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_state` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_zip` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `bank_name` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `masked_bank_routing_number` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `masked_bank_account_number` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `bank_account_type` | [`Bank Account Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-type) | Required | Defaults to checking | | `bank_account_holder_type` | [`Bank Account Holder Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-holder-type) | Required | Defaults to personal | | `payment_type` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `disabled` | `Boolean` | Required | - | | `site_gateway_setting_id` | `Number` | Required | - | | `customer_vault_token` | `String` | Optional | - | | `gateway_handle` | `String` | Optional | - | | `verified` | `Boolean` | Optional | - | # Example (as JSON) ```json { "id": "id8", "first_name": "first_name8", "last_name": "last_name6", "customer_id": "customer_id6", "current_vault": "maxp", "vault_token": "vault_token0", "billing_address": "billing_address0", "billing_address_2": "billing_address_20", "billing_city": "billing_city4", "billing_country": "billing_country2", "billing_state": "billing_state8", "billing_zip": "billing_zip6", "bank_name": "bank_name6", "masked_bank_routing_number": "masked_bank_routing_number6", "masked_bank_account_number": "masked_bank_account_number0", "bank_account_type": "checking", "bank_account_holder_type": "personal", "payment_type": "payment_type2", "disabled": false, "site_gateway_setting_id": 254, "customer_vault_token": "customer_vault_token6", "gateway_handle": "gateway_handle0" } ``` ##### Get One Time Token Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/get-one-time-token-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `String` | Optional | - | | `first_name` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `last_name` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `masked_card_number` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `card_type` | [`Card Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/card-type) | Required | The type of card used. | | `expiration_month` | `Decimal` | Required | - | | `expiration_year` | `Decimal` | Required | - | | `customer_id` | `String` | Optional | - | | `current_vault` | [`Credit Card Vault`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-card-vault) | Required | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | | `vault_token` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_address` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_address_2` | `String` | Optional | - | | `billing_city` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_country` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_state` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `billing_zip` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `payment_type` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `disabled` | `Boolean` | Required | - | | `site_gateway_setting_id` | `Number` | Required | - | | `customer_vault_token` | `String` | Optional | - | | `gateway_handle` | `String` | Optional | - | # Example (as JSON) ```json { "id": "id2", "first_name": "first_name2", "last_name": "last_name0", "masked_card_number": "masked_card_number0", "card_type": "routex", "expiration_month": 187.78, "expiration_year": 164.44, "customer_id": "customer_id0", "current_vault": "braintree_blue", "vault_token": "vault_token4", "billing_address": "billing_address4", "billing_address_2": "billing_address_24", "billing_city": "billing_city0", "billing_country": "billing_country6", "billing_state": "billing_state6", "billing_zip": "billing_zip0", "payment_type": "payment_type2", "disabled": false, "site_gateway_setting_id": 232, "customer_vault_token": "customer_vault_token0", "gateway_handle": "gateway_handle4" } ``` ##### Get One Time Token Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/get-one-time-token-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile` | [`Get One Time Token Payment Profile \| Get One Time Token Bank Account Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/get-one-time-token-request-payment-profile) | Required | - | # Example (as JSON) ```json { "payment_profile": { "id": "id2", "first_name": "first_name2", "last_name": "last_name0", "masked_card_number": "masked_card_number0", "card_type": "routex", "expiration_month": 187.78, "expiration_year": 164.44, "customer_id": "customer_id0", "current_vault": "braintree_blue", "vault_token": "vault_token4", "billing_address": "billing_address4", "billing_address_2": "billing_address_24", "billing_city": "billing_city0", "billing_country": "billing_country6", "billing_state": "billing_state6", "billing_zip": "billing_zip0", "payment_type": "payment_type2", "disabled": false, "site_gateway_setting_id": 232, "customer_vault_token": "customer_vault_token0", "gateway_handle": "gateway_handle4" } } ``` ##### Group Billing Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/group-billing (Optional) Attributes related to billing date and accrual. Note: Only applicable for new subscriptions. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `accrue` | `Boolean` | Optional | A flag indicating whether or not to accrue charges on the new subscription.

**Default**: `false` | | `align_date` | `Boolean` | Optional | A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be true if prorate is also true.

**Default**: `false` | | `prorate` | `Boolean` | Optional | A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of true is ignored unless align_date is also true.

**Default**: `false` | # Example (as JSON) ```json { "accrue": false, "align_date": false, "prorate": false } ``` ##### Group Settings Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/group-settings # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `target` | [`Group Target`](https://developers.maxio.com/http/advanced-billing-api/models/structures/group-target) | Required | Attributes of the target customer who will be the responsible payer of the created subscription. Required. | | `billing` | [`Group Billing`](https://developers.maxio.com/http/advanced-billing-api/models/structures/group-billing) | Optional | (Optional) Attributes related to billing date and accrual. Note: Only applicable for new subscriptions. | # Example (as JSON) ```json { "target": { "type": "parent", "id": 236 }, "billing": { "accrue": false, "align_date": false, "prorate": false } } ``` ##### Group Target Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/group-target Attributes of the target customer who will be the responsible payer of the created subscription. Required. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `type` | [`Group Target Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/group-target-type) | Required | The type of object indicated by the id attribute. | | `id` | `Number` | Optional | The id of the target customer or subscription to group the existing subscription with. Ignored and should not be included if type is "self", "parent", or "eldest". | # Example (as JSON) ```json { "type": "self", "id": 134 } ``` ##### Historic Usage Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/historic-usage (Optional) For Event Based Components. If the `include=historic_usages` query param is provided, the last ten billing periods will be returned. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `total_usage_quantity` | `Decimal` | Optional | Total usage of a component for billing period | | `billing_period_starts_at` | `DateTime` | Optional | Start date of billing period | | `billing_period_ends_at` | `DateTime` | Optional | End date of billing period | # Example (as JSON) ```json { "total_usage_quantity": 26.6, "billing_period_starts_at": "2016-03-13T12:52:32.123Z", "billing_period_ends_at": "2016-03-13T12:52:32.123Z" } ``` ##### Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Optional | - | | `uid` | `String` | Optional | Unique identifier for the invoice. It is generated automatically by Chargify and has the prefix "inv_" followed by alphanumeric characters. | | `site_id` | `Number` | Optional | ID of the site to which the invoice belongs. | | `customer_id` | `Number` | Optional | ID of the customer to which the invoice belongs. | | `subscription_id` | `Number` | Optional | ID of the subscription that generated the invoice. | | `number` | `String` | Optional | A unique, identifying string that appears on the invoice and in places the invoice is referenced.

While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike. | | `sequence_number` | `Number` | Optional | A monotonically increasing number assigned to invoices as they are created. This number is unique within a site and can be used to sort and order invoices. | | `transaction_time` | `DateTime` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `issue_date` | `Date` | Optional | Date the invoice was issued to the customer. This is the date that the invoice was made available for payment.

The format is `"YYYY-MM-DD"`. | | `due_date` | `Date` | Optional | Date the invoice is due.

The format is `"YYYY-MM-DD"`. | | `paid_date` | `Date` | Optional | Date the invoice became fully paid.

If partial payments are applied to the invoice, this date will not be present until payment has been made in full.

The format is `"YYYY-MM-DD"`. | | `status` | [`Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-status) | Optional | The current status of the invoice. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | | `role` | [`Invoice Role`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-role) | Optional | - | | `parent_invoice_id` | `Number` | Optional | - | | `collection_method` | [`Collection Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | | `payment_instructions` | `String` | Optional | A message that is printed on the invoice when it is marked for remittance collection. It is intended to describe to the customer how they may make payment, and is configured by the merchant. | | `currency` | `String` | Optional | The ISO 4217 currency code (3 character string) representing the currency of invoice transaction. | | `consolidation_level` | [`Invoice Consolidation Level`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-consolidation-level) | Optional | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | | `parent_invoice_uid` | `String` | Optional | For invoices with `consolidation_level` of `child`, this specifies the UID of the parent (consolidated) invoice. | | `subscription_group_id` | `Number` | Optional | - | | `parent_invoice_number` | `Number` | Optional | For invoices with `consolidation_level` of `child`, this specifies the number of the parent (consolidated) invoice. | | `group_primary_subscription_id` | `Number` | Optional | For invoices with `consolidation_level` of `parent`, this specifies the ID of the subscription which was the primary subscription of the subscription group that generated the invoice. | | `product_name` | `String` | Optional | The name of the product subscribed when the invoice was generated. | | `product_family_name` | `String` | Optional | The name of the product family subscribed when the invoice was generated. | | `seller` | [`Invoice Seller`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-seller) | Optional | Information about the seller (merchant) listed on the masthead of the invoice. | | `customer` | [`Invoice Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-customer) | Optional | Information about the customer who is owner or recipient of the invoiced subscription. | | `payer` | [`Invoice Payer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payer) | Optional | - | | `recipient_emails` | `array` | Optional | **Constraints**: *Maximum Items*: `5` | | `net_terms` | `Number` | Optional | - | | `memo` | `String` | Optional | The memo printed on invoices of any collection type. This message is in control of the merchant. | | `billing_address` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Optional | The invoice billing address. | | `shipping_address` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Optional | The invoice shipping address. | | `subtotal_amount` | `String` | Optional | Subtotal of the invoice, which is the sum of all line items before discounts or taxes. | | `discount_amount` | `String` | Optional | Total discount applied to the invoice. | | `tax_amount` | `String` | Optional | Total tax on the invoice. | | `total_amount` | `String` | Optional | The invoice total, which is `subtotal_amount - discount_amount + tax_amount`. | | `credit_amount` | `String` | Optional | The amount of credit (from credit notes) applied to this invoice.

Credits offset the amount due from the customer. | | `debit_amount` | `String` | Optional | - | | `refund_amount` | `String` | Optional | - | | `paid_amount` | `String` | Optional | The amount paid on the invoice by the customer. | | `due_amount` | `String` | Optional | Amount due on the invoice, which is `total_amount - credit_amount - paid_amount`. | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item) | Optional | Line items on the invoice. | | `discounts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-discount) | Optional | - | | `taxes` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax) | Optional | - | | `credits` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-credit) | Optional | - | | `debits` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-debit) | Optional | - | | `refunds` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-refund) | Optional | - | | `payments` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payment) | Optional | - | | `custom_fields` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-custom-field) | Optional | - | | `display_settings` | [`Invoice Display Settings`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-display-settings) | Optional | - | | `avatax_details` | [`Invoice Avatax Details`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-avatax-details) | Optional | - | | `public_url` | `String` | Optional | The public URL of the invoice | | `previous_balance_data` | [`Invoice Previous Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-previous-balance) | Optional | - | | `public_url_expires_on` | `Date` | Optional | The format is `"YYYY-MM-DD"`. | | `branding_theme_id` | `Number` | Optional | The ID of the Branding Theme associated with this invoice. This value represents the Branding Theme used for invoice theming, such as themed invoice rendering. Available only when Branding Themes are enabled for the site. | # Example (as JSON) ```json { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 252, "uid": "uid0", "site_id": 178, "customer_id": 34, "subscription_id": 106 } ``` ##### Invoice Address Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `street` | `String` | Optional | - | | `line2` | `String` | Optional | - | | `city` | `String` | Optional | - | | `state` | `String` | Optional | - | | `zip` | `String` | Optional | - | | `country` | `String` | Optional | - | # Example (as JSON) ```json { "street": "street0", "line2": "line24", "city": "city0", "state": "state6", "zip": "zip4" } ``` ##### Invoice Avatax Details Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-avatax-details # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Optional | - | | `status` | `String` | Optional | - | | `document_code` | `String` | Optional | - | | `commit_date` | `DateTime` | Optional | - | | `modify_date` | `DateTime` | Optional | - | # Example (as JSON) ```json { "id": 112, "status": "status2", "document_code": "document_code0", "commit_date": "2016-03-13T12:52:32.123Z", "modify_date": "2016-03-13T12:52:32.123Z" } ``` ##### Invoice Balance Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-balance-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `number` | `String` | Optional | - | | `outstanding_amount` | `String` | Optional | - | # Example (as JSON) ```json { "uid": "uid8", "number": "number6", "outstanding_amount": "outstanding_amount6" } ``` ##### Invoice Credit Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-credit # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `credit_note_number` | `String` | Optional | - | | `credit_note_uid` | `String` | Optional | - | | `transaction_time` | `DateTime` | Optional | - | | `memo` | `String` | Optional | - | | `original_amount` | `String` | Optional | - | | `applied_amount` | `String` | Optional | - | # Example (as JSON) ```json { "uid": "uid6", "credit_note_number": "credit_note_number0", "credit_note_uid": "credit_note_uid0", "transaction_time": "2016-03-13T12:52:32.123Z", "memo": "memo0" } ``` ##### Invoice Custom Field Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-custom-field # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `owner_id` | `Number` | Optional | - | | `owner_type` | [`Custom Field Owner`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/custom-field-owner) | Optional | - | | `name` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `value` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `metadatum_id` | `Number` | Optional | - | # Example (as JSON) ```json { "owner_id": 142, "owner_type": "Customer", "name": "name0", "value": "value2", "metadatum_id": 142 } ``` ##### Invoice Customer Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-customer Information about the customer who is owner or recipient of the invoiced subscription. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `chargify_id` | `Number` | Optional | - | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `organization` | `String` | Optional | - | | `email` | `String` | Optional | - | | `vat_number` | `String` | Optional | - | | `reference` | `String` | Optional | - | # Example (as JSON) ```json { "chargify_id": 236, "first_name": "first_name0", "last_name": "last_name8", "organization": "organization4", "email": "email6" } ``` ##### Invoice Debit Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-debit # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `debit_note_number` | `String` | Optional | - | | `debit_note_uid` | `String` | Optional | - | | `role` | [`Debit Note Role`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/debit-note-role) | Optional | The role of the debit note. | | `transaction_time` | `DateTime` | Optional | - | | `memo` | `String` | Optional | - | | `original_amount` | `String` | Optional | - | | `applied_amount` | `String` | Optional | - | # Example (as JSON) ```json { "uid": "uid2", "debit_note_number": "debit_note_number2", "debit_note_uid": "debit_note_uid8", "role": "chargeback", "transaction_time": "2016-03-13T12:52:32.123Z" } ``` ##### Invoice Discount Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-discount # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `title` | `String` | Optional | - | | `description` | `String` | Optional | - | | `code` | `String` | Optional | - | | `source_type` | [`Invoice Discount Source Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-discount-source-type) | Optional | - | | `source_id` | `Number` | Optional | - | | `discount_type` | [`Invoice Discount Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-discount-type) | Optional | - | | `percentage` | `String` | Optional | - | | `eligible_amount` | `String` | Optional | - | | `discount_amount` | `String` | Optional | - | | `transaction_id` | `Number` | Optional | - | | `line_item_breakouts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-discount-breakout) | Optional | - | # Example (as JSON) ```json { "uid": "uid0", "title": "title4", "description": "description0", "code": "code8", "source_type": "Coupon" } ``` ##### Invoice Discount Breakout Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-discount-breakout # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `eligible_amount` | `String` | Optional | - | | `discount_amount` | `String` | Optional | - | # Example (as JSON) ```json { "uid": "uid8", "eligible_amount": "eligible_amount0", "discount_amount": "discount_amount8" } ``` ##### Invoice Display Settings Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-display-settings # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `hide_zero_subtotal_lines` | `Boolean` | Optional | - | | `include_discounts_on_lines` | `Boolean` | Optional | - | # Example (as JSON) ```json { "hide_zero_subtotal_lines": false, "include_discounts_on_lines": false } ``` ##### Invoice Issued Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-issued # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Required | - | | `number` | `String` | Required | - | | `role` | `String` | Required | - | | `due_date` | `Date` | Required | - | | `issue_date` | `String` | Required | Invoice issue date. Can be an empty string if value is missing. | | `paid_date` | `String` | Required | Paid date. Can be an empty string if value is missing. | | `due_amount` | `String` | Required | - | | `paid_amount` | `String` | Required | - | | `tax_amount` | `String` | Required | - | | `refund_amount` | `String` | Required | - | | `total_amount` | `String` | Required | - | | `status_amount` | `String` | Required | - | | `product_name` | `String` | Required | - | | `consolidation_level` | `String` | Required | - | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-event-data) | Required | - | # Example (as JSON) ```json { "uid": "uid4", "number": "number8", "role": "role2", "due_date": "2016-03-13", "issue_date": "issue_date0", "paid_date": "paid_date6", "due_amount": "due_amount6", "paid_amount": "paid_amount4", "tax_amount": "tax_amount2", "refund_amount": "refund_amount0", "total_amount": "total_amount0", "status_amount": "status_amount4", "product_name": "product_name0", "consolidation_level": "consolidation_level4", "line_items": [ { "uid": "uid8", "title": "title4", "description": "description8", "quantity": 102, "quantity_delta": 204 } ] } ``` ##### Invoice Line Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | Unique identifier for the line item. Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists. | | `title` | `String` | Optional | A short descriptor for the charge or item represented by this line. | | `description` | `String` | Optional | Detailed description for the charge or item represented by this line. May include proration details in plain text.

Note: this string may contain line breaks that are hints for the best display format on the invoice. | | `quantity` | `String` | Optional | The quantity or count of units billed by the line item.

This is a decimal number represented as a string. (See "About Decimal Numbers".) | | `unit_price` | `String` | Optional | The price per unit for the line item.

When tiered pricing was used (i.e., not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. | | `subtotal_amount` | `String` | Optional | The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount). | | `discount_amount` | `String` | Optional | The approximate discount applied to just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. | | `tax_amount` | `String` | Optional | The approximate tax applied to just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. | | `tax_included` | `Boolean` | Optional | Whether the unit price for this line item is tax-inclusive.

When `true`, `unit_price` already includes tax and `tax_amount` represents the portion of the price attributable to tax. When `false`, any applicable tax is added on top of the price.

The value is inherited from the source price point's `tax_included` setting. Custom or ad-hoc line items (which have no associated price point) always return `false`. | | `total_amount` | `String` | Optional | The non-canonical total amount for the line.

`subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. | | `tiered_unit_price` | `Boolean` | Optional | When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units. | | `period_range_start` | `Date` | Optional | Start date for the period covered by this line. The format is `"YYYY-MM-DD"`.

* For periodic charges paid in advance, this date will match the billing date, and the end date will be in the future.
* For periodic charges paid in arrears (e.g., metered charges), this date will be the date of the previous billing, and the end date will be the current billing date.
* For non-periodic charges, this date and the end date will match. | | `period_range_end` | `Date` | Optional | End date for the period covered by this line. The format is `"YYYY-MM-DD"`.

* For periodic charges paid in advance, this date will match the next (future) billing date.
* For periodic charges paid in arrears (e.g., metered charges), this date will be the date of the current billing date.
* For non-periodic charges, this date and the start date will match. | | `transaction_id` | `Number` | Optional | - | | `product_id` | `Number` | Optional | The ID of the product subscribed when the charge was made.

This may be set even for component charges, so true product-only (non-component) charges will also have a nil `component_id`. | | `product_version` | `Number` | Optional | The version of the product subscribed when the charge was made. | | `component_id` | `Number` | Optional | The ID of the component being billed. Will be `nil` for non-component charges. | | `price_point_id` | `Number` | Optional | The price point ID of the component being billed. Will be `nil` for non-component charges. | | `billing_schedule_item_id` | `Number` | Optional | - | | `hide` | `Boolean` | Optional | - | | `component_cost_data` | [`Invoice Line Item Component Cost Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-component-cost-data) | Optional | - | | `product_price_point_id` | `Number` | Optional | The price point ID of the line item's product | | `custom_item` | `Boolean` | Optional | - | | `kind` | `String` | Optional | - | | `prepaid_allocation_expires_at` | `Date` | Optional | The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. | # Example (as JSON) ```json { "uid": "uid4", "title": "title0", "description": "description4", "quantity": "quantity0", "unit_price": "unit_price2" } ``` ##### Invoice Line Item Component Cost Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-component-cost-data # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `rates` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-cost-data) | Optional | - | # Example (as JSON) ```json { "rates": [ { "component_code_id": 116, "price_point_id": 226, "product_id": 94, "quantity": "quantity0", "amount": "amount6" }, { "component_code_id": 116, "price_point_id": 226, "product_id": 94, "quantity": "quantity0", "amount": "amount6" }, { "component_code_id": 116, "price_point_id": 226, "product_id": 94, "quantity": "quantity0", "amount": "amount6" } ] } ``` ##### Invoice Line Item Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-event-data # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `title` | `String` | Optional | - | | `description` | `String` | Optional | - | | `quantity` | `Number` | Optional | - | | `quantity_delta` | `Number` | Optional | - | | `unit_price` | `String` | Optional | - | | `period_range_start` | `String` | Optional | - | | `period_range_end` | `String` | Optional | - | | `amount` | `String` | Optional | - | | `line_references` | `String` | Optional | - | | `pricing_details_index` | `Number` | Optional | - | | `pricing_details` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-pricing-detail) | Optional | - | | `tax_code` | `String` | Optional | - | | `tax_amount` | `String` | Optional | - | | `product_id` | `Number` | Optional | - | | `product_price_point_id` | `Number` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `component_id` | `Number` | Optional | - | | `billing_schedule_item_id` | `Number` | Optional | - | | `custom_item` | `Boolean` | Optional | - | # Example (as JSON) ```json { "uid": "uid4", "title": "title0", "description": "description6", "quantity": 40, "quantity_delta": 114 } ``` ##### Invoice Line Item Pricing Detail Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-pricing-detail # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `label` | `String` | Optional | - | | `amount` | `String` | Optional | - | # Example (as JSON) ```json { "label": "label0", "amount": "amount2" } ``` ##### Invoice Payer Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payer # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `chargify_id` | `Number` | Optional | - | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `organization` | `String` | Optional | - | | `email` | `String` | Optional | - | | `vat_number` | `String` | Optional | - | # Example (as JSON) ```json { "chargify_id": 46, "first_name": "first_name4", "last_name": "last_name2", "organization": "organization8", "email": "email2" } ``` ##### Invoice Payer Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payer-change # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `organization` | `String` | Optional | - | | `email` | `String` | Optional | - | # Example (as JSON) ```json { "first_name": "first_name2", "last_name": "last_name0", "organization": "organization4", "email": "email4" } ``` ##### Invoice Payment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `transaction_time` | `DateTime` | Optional | - | | `memo` | `String` | Optional | - | | `original_amount` | `String` | Optional | - | | `applied_amount` | `String` | Optional | - | | `payment_method` | [`Invoice Payment Method`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payment-method) | Optional | - | | `transaction_id` | `Number` | Optional | - | | `prepayment` | `Boolean` | Optional | - | | `gateway_handle` | `String` | Optional | - | | `gateway_used` | `String` | Optional | - | | `gateway_transaction_id` | `String` | Optional | The transaction ID for the payment as returned from the payment gateway | | `received_on` | `Date` | Optional | Date reflecting when the payment was received from a customer. Must be in the past. Applicable only to
`external` payments. | | `uid` | `String` | Optional | - | # Example (as JSON) ```json { "transaction_time": "2016-03-13T12:52:32.123Z", "memo": "memo6", "original_amount": "original_amount6", "applied_amount": "applied_amount6", "payment_method": { "details": "details0", "kind": "kind8", "memo": "memo4", "type": "type0", "card_brand": "card_brand6" } } ``` ##### Invoice Payment Application Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payment-application # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `invoice_uid` | `String` | Optional | Unique identifier for the paid invoice. It has the prefix "inv_" followed by alphanumeric characters. | | `application_uid` | `String` | Optional | Unique identifier for the payment. It has the prefix "pmt_" followed by alphanumeric characters. | | `applied_amount` | `String` | Optional | Dollar amount of the paid invoice. | # Example (as JSON) ```json { "invoice_uid": "invoice_uid2", "application_uid": "application_uid4", "applied_amount": "applied_amount6" } ``` ##### Invoice Payment Method Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payment-method # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `details` | `String` | Optional | - | | `kind` | `String` | Optional | - | | `memo` | `String` | Optional | - | | `type` | `String` | Optional | - | | `card_brand` | `String` | Optional | - | | `card_expiration` | `String` | Optional | - | | `last_four` | `String` | Optional | - | | `masked_card_number` | `String` | Optional | - | # Example (as JSON) ```json { "details": "details8", "kind": "kind6", "memo": "memo2", "type": "type8", "card_brand": "card_brand8" } ``` ##### Invoice Pre Payment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-pre-payment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Optional | The subscription id for the prepayment account | | `amount_in_cents` | `Long` | Optional | The amount in cents of the prepayment that was created as a result of this payment. | | `ending_balance_in_cents` | `Long` | Optional | The total balance of the prepayment account for this subscription including any prior prepayments | # Example (as JSON) ```json { "subscription_id": 180, "amount_in_cents": 100, "ending_balance_in_cents": 60 } ``` ##### Invoice Previous Balance Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-previous-balance # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `captured_at` | `DateTime` | Optional | - | | `invoices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-balance-item) | Optional | - | # Example (as JSON) ```json { "captured_at": "2016-03-13T12:52:32.123Z", "invoices": [ { "uid": "uid6", "number": "number6", "outstanding_amount": "outstanding_amount8" } ] } ``` ##### Invoice Refund Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-refund # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `transaction_id` | `Number` | Optional | - | | `payment_id` | `Number` | Optional | - | | `memo` | `String` | Optional | - | | `original_amount` | `String` | Optional | - | | `applied_amount` | `String` | Optional | - | | `gateway_transaction_id` | `String` | Optional | The transaction ID for the refund as returned from the payment gateway | | `gateway_used` | `String` | Optional | - | | `gateway_handle` | `String` | Optional | - | | `ach_late_reject` | `Boolean` | Optional | - | # Example (as JSON) ```json { "transaction_id": 172, "payment_id": 42, "memo": "memo6", "original_amount": "original_amount6", "applied_amount": "applied_amount6" } ``` ##### Invoice Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `invoice` | [`Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | # Example (as JSON) ```json { "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 166, "uid": "uid6", "site_id": 92, "customer_id": 204, "subscription_id": 20 } } ``` ##### Invoice Seller Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-seller Information about the seller (merchant) listed on the masthead of the invoice. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Optional | - | | `address` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Optional | - | | `phone` | `String` | Optional | - | | `logo_url` | `String` | Optional | - | # Example (as JSON) ```json { "name": "name0", "address": { "street": "street6", "line2": "line20", "city": "city6", "state": "state2", "zip": "zip0" }, "phone": "phone0", "logo_url": "logo_url0" } ``` ##### Invoice Tax Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `title` | `String` | Optional | - | | `description` | `String` | Optional | - | | `source_type` | [`Proforma Invoice Tax Source Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-tax-source-type) | Optional | - | | `source_id` | `Number` | Optional | - | | `percentage` | `String` | Optional | - | | `taxable_amount` | `String` | Optional | - | | `tax_amount` | `String` | Optional | - | | `transaction_id` | `Number` | Optional | - | | `line_item_breakouts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax-breakout) | Optional | - | | `tax_component_breakouts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax-component-breakout) | Optional | - | | `eu_vat` | `Boolean` | Optional | - | | `type` | `String` | Optional | - | | `tax_exempt_amount` | `String` | Optional | - | # Example (as JSON) ```json { "uid": "uid8", "title": "title6", "description": "description2", "source_type": "Tax", "source_id": 164 } ``` ##### Invoice Tax Breakout Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax-breakout # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `taxable_amount` | `String` | Optional | - | | `tax_amount` | `String` | Optional | - | | `tax_exempt_amount` | `String` | Optional | - | # Example (as JSON) ```json { "uid": "uid2", "taxable_amount": "taxable_amount6", "tax_amount": "tax_amount6", "tax_exempt_amount": "tax_exempt_amount2" } ``` ##### Invoice Tax Component Breakout Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax-component-breakout # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `tax_rule_id` | `Number` | Optional | - | | `percentage` | `String` | Optional | - | | `country_code` | `String` | Optional | - | | `subdivision_code` | `String` | Optional | - | | `tax_amount` | `String` | Optional | - | | `taxable_amount` | `String` | Optional | - | | `tax_exempt_amount` | `String` | Optional | - | | `non_taxable_amount` | `String` | Optional | - | | `tax_name` | `String` | Optional | - | | `tax_type` | `String` | Optional | - | | `rate_type` | `String` | Optional | - | | `tax_authority_type` | `Number` | Optional | - | | `state_assigned_no` | `String` | Optional | - | | `tax_sub_type` | `String` | Optional | - | # Example (as JSON) ```json { "tax_rule_id": 226, "percentage": "percentage0", "country_code": "country_code8", "subdivision_code": "subdivision_code6", "tax_amount": "tax_amount4" } ``` ##### Issue Advance Invoice Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-advance-invoice-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `force` | `Boolean` | Optional | - | # Example (as JSON) ```json { "force": false } ``` ##### Issue Invoice Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-invoice-event-data Example schema for an `issue_invoice` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `consolidation_level` | [`Invoice Consolidation Level`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-consolidation-level) | Required | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | | `from_status` | [`Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-status) | Required | The status of the invoice before event occurrence. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | | `to_status` | [`Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-status) | Required | The status of the invoice after event occurrence. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | | `due_amount` | `String` | Required | Amount due on the invoice, which is `total_amount - credit_amount - paid_amount`. | | `total_amount` | `String` | Required | The invoice total, which is `subtotal_amount - discount_amount + tax_amount`.' | # Example (as JSON) ```json { "consolidation_level": "none", "from_status": "voided", "to_status": "draft", "due_amount": "due_amount6", "total_amount": "total_amount0" } ``` ##### Issue Invoice Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-invoice-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `on_failed_payment` | [`Failed Payment Action`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/failed-payment-action) | Optional | Action taken when payment for an invoice fails:

- `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option.
- `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history.
- `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).

**Default**: `leave_open_invoice` | # Example (as JSON) ```json { "on_failed_payment": "leave_open_invoice" } ``` ##### Issue Service Credit Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-service-credit # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount` | [`Decimal \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/issue-service-credit-amount) | Required | - | | `memo` | `String` | Optional | - | # Example (as JSON) ```json { "amount": 5.82, "memo": "memo4" } ``` ##### Issue Service Credit Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-service-credit-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `service_credit` | [`Issue Service Credit`](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-service-credit) | Required | - | # Example (as JSON) ```json { "service_credit": { "amount": 31.42, "memo": "memo0" } } ``` ##### Item Price Point Changed Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/item-price-point-changed # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `item_id` | `Number` | Required | - | | `item_type` | `String` | Required | - | | `item_handle` | `String` | Required | - | | `item_name` | `String` | Required | - | | `previous_price_point` | [`Item Price Point Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/item-price-point-data) | Required | - | | `current_price_point` | [`Item Price Point Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/item-price-point-data) | Required | - | # Example (as JSON) ```json { "item_id": 66, "item_type": "item_type6", "item_handle": "item_handle4", "item_name": "item_name8", "previous_price_point": { "id": 216, "handle": "handle6", "name": "name0" }, "current_price_point": { "id": 218, "handle": "handle6", "name": "name0" } } ``` ##### Item Price Point Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/item-price-point-data # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `handle` | `String` | Optional | - | | `name` | `String` | Optional | - | # Example (as JSON) ```json { "id": 192, "handle": "handle6", "name": "name0" } ``` ##### List Components Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-components-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `ids` | `array` | Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `use_site_exchange_rate` | `Boolean` | Optional | Allows fetching components with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | # Example (as JSON) ```json { "ids": [ 1, 2, 3 ], "use_site_exchange_rate": false } ``` ##### List Components Price Points Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-components-price-points-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point) | Required | - | # Example (as JSON) ```json { "price_points": [ { "id": 40, "type": "default", "default": false, "name": "name2", "pricing_scheme": "per_unit" } ] } ``` ##### List Coupons Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-coupons-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `date_field` | [`Basic Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) | Optional | The type of filter you would like to apply to your search. Use in query `filter[date_field]=created_at`. | | `start_date` | `Date` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `filter[start_date]=2011-12-17`. | | `end_date` | `Date` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `filter[end_date]=2011-12-15`. | | `start_datetime` | `DateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `filter[start_datetime]=2011-12-19T10:15:30+01:00`. | | `end_datetime` | `DateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `filter[end_datetime]=2011-12-1T10:15:30+01:00`. | | `ids` | `array` | Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `codes` | `array` | Optional | Allows fetching coupons with matching codes based on provided values. Use in query `filter[codes]=free,free_trial`. | | `use_site_exchange_rate` | `Boolean` | Optional | If true, restricts the list to coupons whose pricing is recalculated from the site’s current exchange rates, so their currency_prices array contains on-the-fly conversions rather than stored price records. If false, restricts the list to coupons that have manually defined amounts for each currency, ensuring the response includes the saved currency_prices entries instead of exchange-rate-derived values. Use in query `filter[use_site_exchange_rate]=true`. | | `include_archived` | `Boolean` | Optional | Controls returning archived coupons. | # Example (as JSON) ```json { "start_date": "2011-12-17", "end_date": "2011-12-15", "start_datetime": "2011-12-19T10:15:30+01:00", "end_datetime": "2019-06-07T17:20:06Z", "ids": [ 1, 2, 3 ], "codes": [ "free", "free_trial" ], "date_field": "updated_at" } ``` ##### List Credit Notes Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-credit-notes-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `credit_notes` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note) | Required | - | # Example (as JSON) ```json { "credit_notes": [ { "uid": "uid2", "site_id": 112, "customer_id": 224, "subscription_id": 40, "number": "number0" } ] } ``` ##### List Invoices Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-invoices-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `invoices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice) | Required | - | # Example (as JSON) ```json { "invoices": [ { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21", "id": 196, "uid": "uid6", "site_id": 122, "customer_id": 234, "subscription_id": 50 } ] } ``` ##### List Metafields Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-metafields-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `total_count` | `Number` | Optional | - | | `current_page` | `Number` | Optional | - | | `total_pages` | `Number` | Optional | - | | `per_page` | `Number` | Optional | - | | `metafields` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield) | Optional | - | # Example (as JSON) ```json { "total_count": 210, "current_page": 186, "total_pages": 198, "per_page": 92, "metafields": [ { "id": 22, "name": "name2", "scope": { "csv": "0", "invoices": "0", "statements": "0", "portal": "0", "public_show": "0" }, "data_count": 10, "input_type": "balance_tracker" } ] } ``` ##### List Mrr Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-mrr-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_ids` | `array` | Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | # Example (as JSON) ```json { "subscription_ids": [ 1, 2, 3 ] } ``` ##### List MRR Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-mrr-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `mrr` | [`List MRR Response Result`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-mrr-response-result) | Required | - | # Example (as JSON) ```json { "mrr": { "page": 30, "per_page": 198, "total_pages": 92, "total_entries": 188, "currency": "currency4" } } ``` ##### List MRR Response Result Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-mrr-response-result # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `page` | `Number` | Optional | - | | `per_page` | `Number` | Optional | - | | `total_pages` | `Number` | Optional | - | | `total_entries` | `Number` | Optional | - | | `currency` | `String` | Optional | - | | `currency_symbol` | `String` | Optional | - | | `movements` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/movement) | Optional | - | # Example (as JSON) ```json { "page": 150, "per_page": 238, "total_pages": 16, "total_entries": 112, "currency": "currency8" } ``` ##### List Offers Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-offers-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `offers` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer) | Optional | - | # Example (as JSON) ```json { "offers": [ { "id": 12, "site_id": 194, "product_family_id": 16, "product_id": 210, "product_price_point_id": 134 }, { "id": 12, "site_id": 194, "product_family_id": 16, "product_id": 210, "product_price_point_id": 134 }, { "id": 12, "site_id": 194, "product_family_id": 16, "product_id": 210, "product_price_point_id": 134 } ] } ``` ##### List Prepayments Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-prepayments-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `date_field` | [`List Prepayment Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-prepayment-date-field) | Optional | The type of filter you would like to apply to your search. `created_at` - Time when prepayment was created. `application_at` - Time when prepayment was applied to invoice. Use in query `filter[date_field]=created_at`. | | `start_date` | `Date` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp at or after midnight (12:00:00 AM) in your site's time zone on the date specified. Use in query: `filter[start_date]=2011-12-15`. | | `end_date` | `Date` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp up to and including 11:59:59PM in your site's time zone on the date specified. Use in query: `filter[end_date]=2011-12-15`. | # Example (as JSON) ```json { "date_field": "created_at", "start_date": "2024-01-01", "end_date": "2024-01-31" } ``` ##### List Price Points Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-price-points-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `date_field` | [`Basic Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) | Optional | The type of filter you would like to apply to your search. Use in query: `filter[date_field]=created_at`. | | `start_date` | `Date` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `end_date` | `Date` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `start_datetime` | `DateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `end_datetime` | `DateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `type` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type) | Optional | Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. | | `ids` | `array` | Optional | Allows fetching price points with matching id based on provided values. Use in query: `filter[ids]=1,2,3`. | | `archived_at` | [`Include Null or Not Null`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-null-or-not-null) | Optional | Allows fetching price points only if archived_at is present or not. Use in query: `filter[archived_at]=not_null`. | # Example (as JSON) ```json { "start_date": "2011-12-17", "end_date": "2011-12-15", "start_datetime": "2011-12-19T10:15:30+01:00", "end_datetime": "2019-06-07T17:20:06Z", "type": [ "catalog", "default", "custom" ], "ids": [ 1, 2, 3 ], "date_field": "updated_at" } ``` ##### List Product Price Points Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-product-price-points-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point) | Required | - | # Example (as JSON) ```json { "price_points": [ { "id": 40, "name": "name2", "handle": "handle8", "price_in_cents": 108, "interval": 92 } ] } ``` ##### List Products Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-products-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `ids` | `array` | Optional | Allows fetching products with matching id based on provided values. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `prepaid_product_price_point` | [`Prepaid Product Price Point Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-product-price-point-filter) | Optional | Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. | | `use_site_exchange_rate` | `Boolean` | Optional | Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | # Example (as JSON) ```json { "ids": [ 1, 2, 3 ], "prepaid_product_price_point": { "product_price_point_id": "product_price_point_id2" }, "use_site_exchange_rate": false } ``` ##### List Proforma Invoices Meta Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-proforma-invoices-meta # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `total_count` | `Number` | Optional | - | | `current_page` | `Number` | Optional | - | | `total_pages` | `Number` | Optional | - | | `status_code` | `Number` | Optional | - | # Example (as JSON) ```json { "total_count": 226, "current_page": 202, "total_pages": 214, "status_code": 244 } ``` ##### List Proforma Invoices Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-proforma-invoices-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `proforma_invoices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) | Optional | - | | `meta` | [`List Proforma Invoices Meta`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-proforma-invoices-meta) | Optional | - | # Example (as JSON) ```json { "proforma_invoices": [ { "uid": "uid0", "site_id": 140, "customer_id": 252, "subscription_id": 68, "number": 56 }, { "uid": "uid0", "site_id": 140, "customer_id": 252, "subscription_id": 68, "number": 56 }, { "uid": "uid0", "site_id": 140, "customer_id": 252, "subscription_id": 68, "number": 56 } ], "meta": { "total_count": 150, "current_page": 126, "total_pages": 138, "status_code": 168 } } ``` ##### List Public Keys Meta Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-public-keys-meta # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `total_count` | `Number` | Optional | - | | `current_page` | `Number` | Optional | - | | `total_pages` | `Number` | Optional | - | | `per_page` | `Number` | Optional | - | # Example (as JSON) ```json { "total_count": 22, "current_page": 254, "total_pages": 10, "per_page": 24 } ``` ##### List Public Keys Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-public-keys-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `chargify_js_keys` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/public-key) | Optional | - | | `meta` | [`List Public Keys Meta`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-public-keys-meta) | Optional | - | # Example (as JSON) ```json { "chargify_js_keys": [ { "public_key": "public_key8", "requires_security_token": false, "created_at": "2016-03-13T12:52:32.123Z" }, { "public_key": "public_key8", "requires_security_token": false, "created_at": "2016-03-13T12:52:32.123Z" } ], "meta": { "total_count": 150, "current_page": 126, "total_pages": 138, "per_page": 152 } } ``` ##### List Sale Rep Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-sale-rep-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `full_name` | `String` | Optional | - | | `subscriptions_count` | `Number` | Optional | - | | `mrr_data` | [`map`](https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep-item-mrr) | Optional | - | | `test_mode` | `Boolean` | Optional | - | # Example (as JSON) ```json { "mrr_data": { "november_2019": { "mrr": "$0.00", "usage": "$0.00", "recurring": "$0.00" }, "december_2019": { "mrr": "$0.00", "usage": "$0.00", "recurring": "$0.00" }, "january_2020": { "mrr": "$400.00", "usage": "$0.00", "recurring": "$400.00" } }, "id": 26, "full_name": "full_name8", "subscriptions_count": 154, "test_mode": false } ``` ##### List Segments Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-segments-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `segment_property_1_value` | `String` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_1` on attached Metric. If empty string is passed, this filter would be rejected. Use in query `filter[segment_property_1_value]=EU`. | | `segment_property_2_value` | `String` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_2` on attached Metric. If empty string is passed, this filter would be rejected. | | `segment_property_3_value` | `String` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_3` on attached Metric. If empty string is passed, this filter would be rejected. | | `segment_property_4_value` | `String` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_4` on attached Metric. If empty string is passed, this filter would be rejected. | # Example (as JSON) ```json { "segment_property_1_value": "EU", "segment_property_2_value": "segment_property_2_value4", "segment_property_3_value": "segment_property_3_value2", "segment_property_4_value": "segment_property_4_value6" } ``` ##### List Segments Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-segments-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `segments` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/segment) | Optional | - | # Example (as JSON) ```json { "segments": [ { "id": 50, "component_id": 160, "price_point_id": 184, "event_based_billing_metric_id": 244, "pricing_scheme": "stairstep" } ] } ``` ##### List Service Credits Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-service-credits-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `service_credits` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit-1) | Optional | - | # Example (as JSON) ```json { "service_credits": [ { "id": 224, "amount_in_cents": 54, "ending_balance_in_cents": 94, "entry_type": "Credit", "memo": "memo2" }, { "id": 224, "amount_in_cents": 54, "ending_balance_in_cents": 94, "entry_type": "Credit", "memo": "memo2" } ] } ``` ##### List Subscription Components Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-components-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currencies` | `array` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.

**Constraints**: *Minimum Items*: `1` | | `use_site_exchange_rate` | `Boolean` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | # Example (as JSON) ```json { "currencies": [ "EUR", "USD" ], "use_site_exchange_rate": false } ``` ##### List Subscription Components for Site Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-components-for-site-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currencies` | `array` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`.

**Constraints**: *Minimum Items*: `1` | | `use_site_exchange_rate` | `Boolean` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | | `subscription` | [`Subscription Filter`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-filter) | Optional | Nested filter used for List Subscription Components For Site Filter | # Example (as JSON) ```json { "currencies": [ "EUR", "USD" ], "use_site_exchange_rate": false, "subscription": { "states": [ "trialing", "unpaid", "active" ], "date_field": "updated_at", "start_date": "2016-03-13", "end_date": "2016-03-13", "start_datetime": "2016-03-13T12:52:32.123Z" } } ``` ##### List Subscription Components Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-components-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptions_components` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component) | Required | - | # Example (as JSON) ```json { "subscriptions_components": [ { "id": 138, "name": "name2", "kind": "metered_component", "unit_name": "unit_name4", "enabled": false } ] } ``` ##### List Subscription Group Prepayment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-group-prepayment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepayment` | [`List Subscription Group Prepayment Item`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-group-prepayment-item) | Required | - | # Example (as JSON) ```json { "prepayment": { "id": 38, "subscription_group_uid": "subscription_group_uid2", "amount_in_cents": 124, "remaining_amount_in_cents": 182, "details": "details8" } } ``` ##### List Subscription Group Prepayment Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-group-prepayment-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `subscription_group_uid` | `String` | Optional | - | | `amount_in_cents` | `Long` | Optional | - | | `remaining_amount_in_cents` | `Long` | Optional | - | | `details` | `String` | Optional | - | | `external` | `Boolean` | Optional | - | | `memo` | `String` | Optional | - | | `payment_type` | [`Prepayment Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/prepayment-method) | Optional | - | | `created_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "id": 176, "subscription_group_uid": "subscription_group_uid2", "amount_in_cents": 250, "remaining_amount_in_cents": 64, "details": "details8" } ``` ##### List Subscription Group Prepayment Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-group-prepayment-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepayments` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-group-prepayment) | Required | - | # Example (as JSON) ```json { "prepayments": [ { "prepayment": { "id": 38, "subscription_group_uid": "subscription_group_uid2", "amount_in_cents": 124, "remaining_amount_in_cents": 182, "details": "details8" } } ] } ``` ##### List Subscription Groups Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-groups-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `scheme` | `Number` | Optional | - | | `customer_id` | `Number` | Optional | - | | `payment_profile_id` | `Number` | Optional | - | | `subscription_ids` | `array` | Optional | - | | `primary_subscription_id` | `Number` | Optional | - | | `next_assessment_at` | `DateTime` | Optional | - | | `state` | `String` | Optional | - | | `cancel_at_end_of_period` | `Boolean` | Optional | - | | `account_balances` | [`Subscription Group Balances`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-balances) | Optional | - | | `group_type` | [`Group Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/group-type) | Optional | - | # Example (as JSON) ```json { "uid": "uid0", "scheme": 124, "customer_id": 144, "payment_profile_id": 52, "subscription_ids": [ 254 ] } ``` ##### List Subscription Groups Meta Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-groups-meta # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `current_page` | `Number` | Optional | - | | `total_count` | `Number` | Optional | - | # Example (as JSON) ```json { "current_page": 14, "total_count": 38 } ``` ##### List Subscription Groups Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-groups-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_groups` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-groups-item) | Optional | - | | `meta` | [`List Subscription Groups Meta`](https://developers.maxio.com/http/advanced-billing-api/models/structures/list-subscription-groups-meta) | Optional | - | # Example (as JSON) ```json { "subscription_groups": [ { "uid": "uid2", "scheme": 166, "customer_id": 186, "payment_profile_id": 162, "subscription_ids": [ 40 ] }, { "uid": "uid2", "scheme": 166, "customer_id": 186, "payment_profile_id": 162, "subscription_ids": [ 40 ] }, { "uid": "uid2", "scheme": 166, "customer_id": 186, "payment_profile_id": 162, "subscription_ids": [ 40 ] } ], "meta": { "current_page": 126, "total_count": 150 } } ``` ##### Metadata Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/metadata # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `value` | `String` | Optional | - | | `resource_id` | `Number` | Optional | - | | `name` | `String` | Optional | - | | `deleted_at` | `DateTime` | Optional | - | | `metafield_id` | `Number` | Optional | - | # Example (as JSON) ```json { "id": 12, "value": "value0", "resource_id": 96, "name": "name8", "deleted_at": "2016-03-13T12:52:32.123Z" } ``` ##### Metafield Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `name` | `String` | Optional | - | | `scope` | [`Metafield Scope`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield-scope) | Optional | Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. | | `data_count` | `Number` | Optional | The amount of subscriptions this metafield has been applied to in Advanced Billing. | | `input_type` | [`Metafield Input`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/metafield-input) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | | `enum` | [`String \| array`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/metafield-enum) | Optional | - | # Example (as JSON) ```json { "id": 52, "name": "name8", "scope": { "csv": "0", "invoices": "0", "statements": "0", "portal": "0", "public_show": "0" }, "data_count": 216, "input_type": "radio" } ``` ##### Metafield Scope Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield-scope Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `csv` | [`Include Option`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-option) | Optional | Include (1) or exclude (0) metafields from the csv export. | | `invoices` | [`Include Option`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-option) | Optional | Include (1) or exclude (0) metafields from invoices. | | `statements` | [`Include Option`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-option) | Optional | Include (1) or exclude (0) metafields from statements. | | `portal` | [`Include Option`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-option) | Optional | Include (1) or exclude (0) metafields from the portal. | | `public_show` | [`Include Option`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-option) | Optional | Include (1) or exclude (0) metafields used in [Embeddable Components](https://developers.maxio.com/http/development-tools/embeddable-components/overview) from being viewable by your ecosystem. | | `public_edit` | [`Include Option`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-option) | Optional | Include (1) or exclude (0) metafields used in [Embeddable Components](https://developers.maxio.com/http/development-tools/embeddable-components/overview) from being editable by your ecosystem. | | `hosted` | `array` | Optional | - | # Example (as JSON) ```json { "csv": "0", "invoices": "0", "statements": "0", "portal": "0", "public_show": "0" } ``` ##### Metered Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/metered-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". | | `unit_name` | `String` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. e.g., “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `String` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | | `handle` | `String` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-item) | Optional | - | | `unit_price` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/metered-component-unit-price) | Optional | The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 | | `tax_code` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `hide_date_range_on_invoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | | `display_on_hosted_page` | `Boolean` | Optional | - | | `allow_fractional_quantities` | `Boolean` | Optional | - | | `public_signup_page_ids` | `array` | Optional | - | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `unspsc_code` | `String` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | # Example (as JSON) ```json { "name": "name4", "unit_name": "unit_name6", "description": "description6", "handle": "handle0", "taxable": false, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "price_points": [ { "name": "name2", "handle": "handle8", "pricing_scheme": "per_unit", "interval": 92, "interval_unit": "day" } ] } ``` ##### Metered Usage Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/metered-usage # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `previous_unit_balance` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `new_unit_balance` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/metered-usage-new-unit-balance) | Required | - | | `usage_quantity` | `Number` | Required | - | | `component_id` | `Number` | Required | - | | `component_handle` | `String` | Required | - | | `memo` | `String` | Required | - | # Example (as JSON) ```json { "previous_unit_balance": "previous_unit_balance6", "new_unit_balance": 2, "usage_quantity": 42, "component_id": 4, "component_handle": "component_handle8", "memo": "memo2" } ``` ##### Movement Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/movement # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `timestamp` | `DateTime` | Optional | - | | `amount_in_cents` | `Long` | Optional | - | | `amount_formatted` | `String` | Optional | - | | `description` | `String` | Optional | - | | `category` | `String` | Optional | - | | `breakouts` | [`Breakouts`](https://developers.maxio.com/http/advanced-billing-api/models/structures/breakouts) | Optional | - | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/movement-line-item) | Optional | - | | `subscription_id` | `Number` | Optional | - | | `subscriber_name` | `String` | Optional | - | # Example (as JSON) ```json { "timestamp": "2016-03-13T12:52:32.123Z", "amount_in_cents": 174, "amount_formatted": "amount_formatted4", "description": "description2", "category": "category0" } ``` ##### Movement Line Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/movement-line-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Optional | - | | `component_id` | `Number` | Optional | For Product (or "baseline") line items, this field will have a value of `0`. | | `price_point_id` | `Number` | Optional | - | | `name` | `String` | Optional | - | | `mrr` | `Number` | Optional | - | | `mrr_movements` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/mrr-movement) | Optional | - | | `quantity` | `Number` | Optional | - | | `prev_quantity` | `Number` | Optional | - | | `recurring` | `Boolean` | Optional | When `true`, the line item's MRR value will contribute to the `plan` breakout. When `false`, the line item contributes to the `usage` breakout. | # Example (as JSON) ```json { "product_id": 156, "component_id": 68, "price_point_id": 164, "name": "name6", "mrr": 154 } ``` ##### MRR Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/mrr # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount_in_cents` | `Long` | Optional | - | | `amount_formatted` | `String` | Optional | - | | `currency` | `String` | Optional | - | | `currency_symbol` | `String` | Optional | - | | `breakouts` | [`Breakouts`](https://developers.maxio.com/http/advanced-billing-api/models/structures/breakouts) | Optional | - | | `at_time` | `DateTime` | Optional | ISO8601 timestamp | # Example (as JSON) ```json { "amount_in_cents": 208, "amount_formatted": "amount_formatted2", "currency": "currency0", "currency_symbol": "currency_symbol8", "breakouts": { "plan_amount_in_cents": 254, "plan_amount_formatted": "plan_amount_formatted0", "usage_amount_in_cents": 106, "usage_amount_formatted": "usage_amount_formatted8" } } ``` ##### MRR Movement Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/mrr-movement # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount` | `Number` | Optional | - | | `category` | `String` | Optional | - | | `subscriber_delta` | `Number` | Optional | - | | `lead_delta` | `Number` | Optional | - | # Example (as JSON) ```json { "amount": 210, "category": "category0", "subscriber_delta": 170, "lead_delta": 198 } ``` ##### MRR Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/mrr-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `mrr` | [`MRR`](https://developers.maxio.com/http/advanced-billing-api/models/structures/mrr) | Required | - | # Example (as JSON) ```json { "mrr": { "amount_in_cents": 198, "amount_formatted": "amount_formatted6", "currency": "currency4", "currency_symbol": "currency_symbol2", "breakouts": { "plan_amount_in_cents": 254, "plan_amount_formatted": "plan_amount_formatted0", "usage_amount_in_cents": 106, "usage_amount_formatted": "usage_amount_formatted8" } } } ``` ##### Multi Invoice Payment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/multi-invoice-payment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `transaction_id` | `Number` | Optional | The numeric ID of the transaction. | | `total_amount` | `String` | Optional | Dollar amount of the sum of the paid invoices. | | `currency_code` | `String` | Optional | The ISO 4217 currency code (3 character string) representing the currency of invoice transaction. | | `applications` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-payment-application) | Optional | - | # Example (as JSON) ```json { "transaction_id": 144, "total_amount": "total_amount2", "currency_code": "currency_code2", "applications": [ { "invoice_uid": "invoice_uid8", "application_uid": "application_uid8", "applied_amount": "applied_amount0" } ] } ``` ##### Multi Invoice Payment Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/multi-invoice-payment-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment` | [`Multi Invoice Payment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/multi-invoice-payment) | Required | - | # Example (as JSON) ```json { "payment": { "transaction_id": 224, "total_amount": "total_amount2", "currency_code": "currency_code2", "applications": [ { "invoice_uid": "invoice_uid8", "application_uid": "application_uid8", "applied_amount": "applied_amount0" }, { "invoice_uid": "invoice_uid8", "application_uid": "application_uid8", "applied_amount": "applied_amount0" }, { "invoice_uid": "invoice_uid8", "application_uid": "application_uid8", "applied_amount": "applied_amount0" } ] } } ``` ##### Nested Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/nested-subscription-group # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | The UID for the group | | `scheme` | `Number` | Optional | Whether the group is configured to rely on a primary subscription for billing. At this time, it will always be 1. | | `primary_subscription_id` | `Number` | Optional | The subscription ID of the primary within the group. Applicable to scheme 1. | | `primary` | `Boolean` | Optional | A boolean indicating whether the subscription is the primary in the group. Applicable to scheme 1. | # Example (as JSON) ```json { "uid": "uid2", "scheme": 62, "primary_subscription_id": 10, "primary": false } ``` ##### Net Terms Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/net-terms # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `default_net_terms` | `Number` | Optional | **Default**: `0` | | `automatic_net_terms` | `Number` | Optional | **Default**: `0` | | `remittance_net_terms` | `Number` | Optional | **Default**: `0` | | `net_terms_on_remittance_signups_enabled` | `Boolean` | Optional | **Default**: `false` | | `custom_net_terms_enabled` | `Boolean` | Optional | **Default**: `false` | # Example (as JSON) ```json { "default_net_terms": 0, "automatic_net_terms": 0, "remittance_net_terms": 0, "net_terms_on_remittance_signups_enabled": false, "custom_net_terms_enabled": false } ``` ##### Offer Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/offer # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `site_id` | `Number` | Optional | - | | `product_family_id` | `Number` | Optional | - | | `product_id` | `Number` | Optional | - | | `product_price_point_id` | `Number` | Optional | - | | `product_revisable_number` | `Number` | Optional | - | | `name` | `String` | Optional | - | | `handle` | `String` | Optional | - | | `description` | `String` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `archived_at` | `DateTime` | Optional | - | | `offer_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-item) | Optional | - | | `offer_discounts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-discount) | Optional | - | | `product_family_name` | `String` | Optional | - | | `product_name` | `String` | Optional | - | | `product_price_point_name` | `String` | Optional | - | | `product_price_in_cents` | `Long` | Optional | - | | `offer_signup_pages` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-signup-page) | Optional | - | # Example (as JSON) ```json { "id": 154, "site_id": 80, "product_family_id": 158, "product_id": 96, "product_price_point_id": 20 } ``` ##### Offer Discount Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-discount # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `coupon_code` | `String` | Optional | - | | `coupon_id` | `Number` | Optional | - | | `coupon_name` | `String` | Optional | - | # Example (as JSON) ```json { "coupon_code": "coupon_code8", "coupon_id": 86, "coupon_name": "coupon_name4" } ``` ##### Offer Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `starting_quantity` | `String` | Optional | - | | `editable` | `Boolean` | Optional | - | | `component_unit_price` | `String` | Optional | - | | `component_name` | `String` | Optional | - | | `price_point_name` | `String` | Optional | - | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-price) | Optional | - | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | # Example (as JSON) ```json { "component_id": 216, "price_point_id": 16, "starting_quantity": "starting_quantity0", "editable": false, "component_unit_price": "component_unit_price8" } ``` ##### Offer Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `offer` | [`Offer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/offer) | Optional | - | # Example (as JSON) ```json { "offer": { "id": 28, "site_id": 210, "product_family_id": 224, "product_id": 30, "product_price_point_id": 150 } } ``` ##### Offer Signup Page Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/offer-signup-page # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `nickname` | `String` | Optional | - | | `enabled` | `Boolean` | Optional | - | | `return_url` | `String` | Optional | - | | `return_params` | `String` | Optional | - | | `url` | `String` | Optional | - | # Example (as JSON) ```json { "id": 50, "nickname": "nickname8", "enabled": false, "return_url": "return_url2", "return_params": "return_params0" } ``` ##### Ok Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/ok-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `ok` | `String` | Optional | - | # Example (as JSON) ```json { "ok": "ok4" } ``` ##### On Off Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/on-off-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". | | `description` | `String` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | | `handle` | `String` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-item) | Optional | - | | `unit_price` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/on-off-component-unit-price) | Required | This is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 | | `tax_code` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `hide_date_range_on_invoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | | `display_on_hosted_page` | `Boolean` | Optional | - | | `allow_fractional_quantities` | `Boolean` | Optional | - | | `public_signup_page_ids` | `array` | Optional | - | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `unspsc_code` | `String` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | # Example (as JSON) ```json { "name": "name2", "description": "description2", "handle": "handle8", "taxable": false, "upgrade_charge": "prorated", "downgrade_credit": "prorated", "unit_price": "String1" } ``` ##### Organization Address Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/organization-address # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `street` | `String` | Optional | - | | `line2` | `String` | Optional | - | | `city` | `String` | Optional | - | | `state` | `String` | Optional | - | | `zip` | `String` | Optional | - | | `country` | `String` | Optional | - | | `name` | `String` | Optional | - | | `phone` | `String` | Optional | - | # Example (as JSON) ```json { "street": "street4", "line2": "line28", "city": "city4", "state": "state0", "zip": "zip2" } ``` ##### Origin Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/origin-invoice # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | The UID of the invoice serving as an origin invoice. | | `number` | `String` | Optional | The number of the invoice serving as an origin invoice. | # Example (as JSON) ```json { "uid": "uid0", "number": "number8" } ``` ##### Overage Pricing Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/overage-pricing # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Optional | - | # Example (as JSON) ```json { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } ``` ##### Override Subscription Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/override-subscription # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `activated_at` | `DateTime` | Optional | Can be used to record an external signup date. Chargify uses this field to record when a subscription first goes active (either at signup or at trial end). Only ISO8601 format is supported. | | `canceled_at` | `DateTime` | Optional | Can be used to record an external cancellation date. Chargify sets this field automatically when a subscription is canceled, whether by request or via dunning. Only ISO8601 format is supported. | | `cancellation_message` | `String` | Optional | Can be used to record a reason for the original cancellation. | | `expires_at` | `DateTime` | Optional | Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. This field is not supported when Multi-frequency is enabled for the Site. To change the Term End of a Subscription, use the Update Subscription endpoint. | | `current_period_starts_at` | `DateTime` | Optional | Can only be used when a subscription is unbilled, which happens when a future initial billing date is passed at subscription creation. The value passed must be before the current date and time. Allows you to set when the period started so mid period component allocations have the correct proration. Only ISO8601 format is supported. | # Example (as JSON) ```json { "activated_at": "2016-03-13T12:52:32.123Z", "canceled_at": "2016-03-13T12:52:32.123Z", "cancellation_message": "cancellation_message4", "expires_at": "2016-03-13T12:52:32.123Z", "current_period_starts_at": "2016-03-13T12:52:32.123Z" } ``` ##### Override Subscription Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/override-subscription-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription` | [`Override Subscription`](https://developers.maxio.com/http/advanced-billing-api/models/structures/override-subscription) | Required | - | # Example (as JSON) ```json { "subscription": { "activated_at": "2016-03-13T12:52:32.123Z", "canceled_at": "2016-03-13T12:52:32.123Z", "cancellation_message": "cancellation_message2", "expires_at": "2016-03-13T12:52:32.123Z", "current_period_starts_at": "2016-03-13T12:52:32.123Z" } } ``` ##### Paginated Metadata Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/paginated-metadata # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `total_count` | `Number` | Optional | - | | `current_page` | `Number` | Optional | - | | `total_pages` | `Number` | Optional | - | | `per_page` | `Number` | Optional | - | | `metadata` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metadata) | Optional | - | # Example (as JSON) ```json { "total_count": 26, "current_page": 2, "total_pages": 14, "per_page": 20, "metadata": [ { "id": 50, "value": "value8", "resource_id": 134, "name": "name6", "deleted_at": "2016-03-13T12:52:32.123Z" }, { "id": 50, "value": "value8", "resource_id": 134, "name": "name6", "deleted_at": "2016-03-13T12:52:32.123Z" } ] } ``` ##### Paid Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/paid-invoice # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `invoice_id` | `String` | Optional | The uid of the paid invoice | | `status` | [`Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-status) | Optional | The current status of the invoice. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | | `due_amount` | `String` | Optional | The remaining due amount on the invoice | | `paid_amount` | `String` | Optional | The total amount paid on this invoice (including any prior payments) | # Example (as JSON) ```json { "invoice_id": "invoice_id6", "status": "open", "due_amount": "due_amount8", "paid_amount": "paid_amount8" } ``` ##### Pause Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/pause-request Allows you to pause a Subscription. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `hold` | [`Auto Resume`](https://developers.maxio.com/http/advanced-billing-api/models/structures/auto-resume) | Optional | - | # Example (as JSON) ```json { "hold": { "automatically_resume_at": "2016-03-13T12:52:32.123Z" } } ``` ##### Payer Attributes Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payer-attributes # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `email` | `String` | Optional | - | | `cc_emails` | `String` | Optional | - | | `organization` | `String` | Optional | - | | `reference` | `String` | Optional | - | | `address` | `String` | Optional | - | | `address_2` | `String` | Optional | - | | `city` | `String` | Optional | - | | `state` | `String` | Optional | - | | `zip` | `String` | Optional | - | | `country` | `String` | Optional | - | | `phone` | `String` | Optional | - | | `locale` | `String` | Optional | - | | `vat_number` | `String` | Optional | - | | `tax_exempt` | `Boolean` | Optional | - | | `tax_exempt_reason` | `String` | Optional | - | | `metafields` | `map` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | # Example (as JSON) ```json { "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" }, "first_name": "first_name4", "last_name": "last_name2", "email": "email2", "cc_emails": "cc_emails4", "organization": "organization8" } ``` ##### Payer Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payer-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `last_name` | `array` | Optional | - | | `first_name` | `array` | Optional | - | | `email` | `array` | Optional | - | # Example (as JSON) ```json { "last_name": [ "last_name1", "last_name2", "last_name3" ], "first_name": [ "first_name4", "first_name5" ], "email": [ "email4" ] } ``` ##### Payment Collection Method Changed Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-collection-method-changed # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `previous_value` | `String` | Required | - | | `current_value` | `String` | Required | - | # Example (as JSON) ```json { "previous_value": "previous_value4", "current_value": "current_value2" } ``` ##### Payment for Allocation Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-for-allocation Information for captured payment, if applicable # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `amount_in_cents` | `Long` | Optional | - | | `success` | `Boolean` | Optional | - | | `memo` | `String` | Optional | - | # Example (as JSON) ```json { "id": 72, "amount_in_cents": 158, "success": false, "memo": "memo6" } ``` ##### Payment Profile Attributes Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-attributes alias to credit_card_attributes # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `chargify_token` | `String` | Optional | (Optional) Token received after sending billing information using Maxio.js (formerly Chargify.js). This token must be passed as a sole attribute of `payment_profile_attributes` (e.g., tok_9g6hw85pnpt6knmskpwp4ttt). | | `id` | `Number` | Optional | - | | `payment_type` | [`Payment Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type) | Optional | - | | `first_name` | `String` | Optional | (Optional) First name on card or bank account. If omitted, the first_name from customer attributes will be used. | | `last_name` | `String` | Optional | (Optional) Last name on card or bank account. If omitted, the last_name from customer attributes will be used. | | `masked_card_number` | `String` | Optional | - | | `full_number` | `String` | Optional | The full credit card number (string representation, e.g., 5424000000000015) | | `card_type` | [`Card Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/card-type) | Optional | (Optional, used only for Subscription Import) If you know the card type (e.g., Visa, MC, etc.) you may supply it here so that we may display the card type in the UI. | | `expiration_month` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/payment-profile-attributes-expiration-month) | Optional | (Optional when performing a Subscription Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, e.g., 5 | | `expiration_year` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/payment-profile-attributes-expiration-year) | Optional | (Optional when performing a Subscription Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, e.g., 2012 | | `billing_address` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing street address (e.g., 123 Main St.). This value is merely passed through to the payment gateway. | | `billing_address_2` | `String` | Optional | (Optional) Second line of the customer’s billing address, e.g., Apt. 100 | | `billing_city` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address city (e.g., “Boston”). This value is merely passed through to the payment gateway. | | `billing_state` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address state (e.g., MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | | `billing_country` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | | `billing_zip` | `String` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address zip code (e.g., 12345). This value is merely passed through to the payment gateway. | | `current_vault` | [`All Vaults`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/all-vaults) | Optional | (Optional, used only for Subscription Import) The vault that stores the payment profile with the provided vault_token. | | `vault_token` | `String` | Optional | (Optional, used only for Subscription Import) The “token” provided by your vault storage for an already stored payment profile | | `customer_vault_token` | `String` | Optional | (Optional, used only for Subscription Import) (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | | `customer_id` | `Number` | Optional | - | | `paypal_email` | `String` | Optional | - | | `payment_method_nonce` | `String` | Optional | (Required for Square unless importing with vault_token and customer_vault_token) The nonce generated by the Square Javascript library (SqPaymentForm) | | `gateway_handle` | `String` | Optional | (Optional) This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. gateway_handle is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [Multigateway description](https://chargify.zendesk.com/hc/en-us/articles/4407761759643#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed. | | `cvv` | `String` | Optional | (Optional, may be required by your gateway settings) The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | | `last_four` | `String` | Optional | (Optional, used only for Subscription Import) If you have the last 4 digits of the credit card number, you may supply them here so that we may create a masked card number (e.g., XXXX-XXXX-XXXX-1234) for display in the UI. Last 4 digits are required for refunds in Auth.Net. | # Example (as JSON) ```json { "chargify_token": "chargify_token8", "id": 80, "payment_type": "credit_card", "first_name": "first_name0", "last_name": "last_name8" } ``` ##### Payment Profile Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile` | [`Apple Pay Payment Profile \| Bank Account Payment Profile \| Credit Card Payment Profile \| Paypal Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/payment-profile) | Required | - | # Example (as JSON) ```json { "payment_profile": { "payment_type": "apple_pay", "id": 60, "first_name": "first_name2", "last_name": "last_name0", "customer_id": 98, "current_vault": "braintree_blue" } } ``` ##### Payment Related Events Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-related-events # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Required | - | | `account_transaction_id` | `Number` | Required | - | # Example (as JSON) ```json { "product_id": 42, "account_transaction_id": 58 } ``` ##### Payment Profile Params Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-profile-params PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `card_type` | `String` | Optional | - | # Example (as JSON) ```json { "first_name": "first_name2", "last_name": "last_name0", "card_type": "card_type8" } ``` ##### Pending Cancellation Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/pending-cancellation-change # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `cancellation_state` | `String` | Required | - | | `cancels_at` | `DateTime` | Required | - | # Example (as JSON) ```json { "cancellation_state": "cancellation_state8", "cancels_at": "2016-03-13T12:52:32.123Z" } ``` ##### Portal Management Link Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/portal-management-link # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `url` | `String` | Optional | - | | `fetch_count` | `Number` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `new_link_available_at` | `DateTime` | Optional | - | | `expires_at` | `DateTime` | Optional | - | | `last_invite_sent_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "url": "url0", "fetch_count": 222, "created_at": "2016-03-13T12:52:32.123Z", "new_link_available_at": "2016-03-13T12:52:32.123Z", "expires_at": "2016-03-13T12:52:32.123Z" } ``` ##### Prepaid Configuration Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-configuration # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `initial_funding_amount_in_cents` | `Long` | Optional | - | | `replenish_to_amount_in_cents` | `Long` | Optional | - | | `auto_replenish` | `Boolean` | Optional | - | | `replenish_threshold_amount_in_cents` | `Long` | Optional | - | # Example (as JSON) ```json { "id": 156, "initial_funding_amount_in_cents": 88, "replenish_to_amount_in_cents": 166, "auto_replenish": false, "replenish_threshold_amount_in_cents": 222 } ``` ##### Prepaid Configuration Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-configuration-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepaid_configuration` | [`Prepaid Configuration`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-configuration) | Required | - | # Example (as JSON) ```json { "prepaid_configuration": { "id": 142, "initial_funding_amount_in_cents": 74, "replenish_to_amount_in_cents": 76, "auto_replenish": false, "replenish_threshold_amount_in_cents": 20 } } ``` ##### Prepaid Product Price Point Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-product-price-point-filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product_price_point_id` | `String` | Required, Constant | Passed as a parameter to list methods to return only non null values.

**Value**: `not_null` | # Example (as JSON) ```json { "product_price_point_id": "not_null" } ``` ##### Prepaid Subscription Balance Changed Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-subscription-balance-changed # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `reason` | `String` | Required | - | | `current_account_balance_in_cents` | `Long` | Required | - | | `prepayment_account_balance_in_cents` | `Long` | Required | - | | `current_usage_amount_in_cents` | `Long` | Required | - | # Example (as JSON) ```json { "reason": "reason8", "current_account_balance_in_cents": 250, "prepayment_account_balance_in_cents": 44, "current_usage_amount_in_cents": 242 } ``` ##### Prepaid Usage Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-usage # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `previous_unit_balance` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `previous_overage_unit_balance` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `new_unit_balance` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/prepaid-usage-new-unit-balance) | Required | - | | `new_overage_unit_balance` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/prepaid-usage-new-overage-unit-balance) | Required | - | | `usage_quantity` | `Number` | Required | - | | `overage_usage_quantity` | `Number` | Required | - | | `component_id` | `Number` | Required | - | | `component_handle` | `String` | Required | - | | `memo` | `String` | Required | - | | `allocation_details` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-usage-allocation-detail) | Required | - | # Example (as JSON) ```json { "previous_unit_balance": "previous_unit_balance0", "previous_overage_unit_balance": "previous_overage_unit_balance4", "new_unit_balance": 174, "new_overage_unit_balance": 146, "usage_quantity": 214, "overage_usage_quantity": 106, "component_id": 176, "component_handle": "component_handle4", "memo": "memo8", "allocation_details": [ { "allocation_id": 18, "charge_id": 84, "usage_quantity": 10 } ] } ``` ##### Prepaid Usage Allocation Detail Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-usage-allocation-detail # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `allocation_id` | `Number` | Optional | - | | `charge_id` | `Number` | Optional | - | | `usage_quantity` | `Number` | Optional | - | # Example (as JSON) ```json { "allocation_id": 72, "charge_id": 30, "usage_quantity": 212 } ``` ##### Prepaid Usage Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-usage-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". | | `unit_name` | `String` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. e.g., “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `description` | `String` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | | `handle` | `String` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepaid-usage-component-price-point) | Optional | - | | `unit_price` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/prepaid-usage-component-unit-price) | Optional | The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 | | `tax_code` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `hide_date_range_on_invoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | | `overage_pricing` | [`Overage Pricing`](https://developers.maxio.com/http/advanced-billing-api/models/structures/overage-pricing) | Required | - | | `rollover_prepaid_remainder` | `Boolean` | Optional | Boolean which controls whether or not remaining units should be rolled over to the next period. | | `renew_prepaid_allocation` | `Boolean` | Optional | Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. | | `expiration_interval` | `Decimal` | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | - | | `display_on_hosted_page` | `Boolean` | Optional | - | | `allow_fractional_quantities` | `Boolean` | Optional | - | | `public_signup_page_ids` | `array` | Optional | - | | `unspsc_code` | `String` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | # Example (as JSON) ```json { "name": "name2", "unit_name": "unit_name4", "description": "description8", "handle": "handle8", "taxable": false, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "upgrade_charge": "prorated", "overage_pricing": { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } } ``` ##### Prepayment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Required | - | | `subscription_id` | `Number` | Required | - | | `amount_in_cents` | `Long` | Required | - | | `remaining_amount_in_cents` | `Long` | Required | - | | `refunded_amount_in_cents` | `Long` | Optional | - | | `details` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `external` | `Boolean` | Required | - | | `memo` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `payment_type` | [`Prepayment Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/prepayment-method) | Optional | The payment type of the prepayment. | | `created_at` | `DateTime` | Required | - | # Example (as JSON) ```json { "id": 50, "subscription_id": 160, "amount_in_cents": 120, "remaining_amount_in_cents": 194, "refunded_amount_in_cents": 144, "details": "details4", "external": false, "memo": "memo8", "payment_type": "cash", "created_at": "2016-03-13T12:52:32.123Z" } ``` ##### Prepayment Account Balance Changed Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment-account-balance-changed # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `reason` | `String` | Required | - | | `prepayment_account_balance_in_cents` | `Long` | Required | - | | `prepayment_balance_change_in_cents` | `Long` | Required | - | | `currency_code` | `String` | Required | - | # Example (as JSON) ```json { "reason": "reason4", "prepayment_account_balance_in_cents": 182, "prepayment_balance_change_in_cents": 206, "currency_code": "currency_code4" } ``` ##### Prepayment Aggregated Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment-aggregated-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount_in_cents` | `array` | Optional | - | | `base` | `array` | Optional | - | | `external` | `array` | Optional | - | # Example (as JSON) ```json { "amount_in_cents": [ "amount_in_cents7", "amount_in_cents6", "amount_in_cents5" ], "base": [ "base7", "base8" ], "external": [ "external0", "external1", "external2" ] } ``` ##### Prepayment Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepayment` | [`Prepayment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment) | Required | - | # Example (as JSON) ```json { "prepayment": { "id": 38, "subscription_id": 148, "amount_in_cents": 124, "remaining_amount_in_cents": 182, "refunded_amount_in_cents": 132, "details": "details8", "external": false, "memo": "memo2", "payment_type": "credit_card", "created_at": "2016-03-13T12:52:32.123Z" } } ``` ##### Prepayments Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayments-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepayments` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment) | Optional | **Constraints**: *Unique Items Required* | # Example (as JSON) ```json { "prepayments": [ { "id": 76, "subscription_id": 186, "amount_in_cents": 94, "remaining_amount_in_cents": 220, "refunded_amount_in_cents": 170, "details": "details6", "external": false, "memo": "memo0", "payment_type": "cash", "created_at": "2016-03-13T12:52:32.123Z" }, { "id": 76, "subscription_id": 186, "amount_in_cents": 94, "remaining_amount_in_cents": 220, "refunded_amount_in_cents": 170, "details": "details6", "external": false, "memo": "memo0", "payment_type": "cash", "created_at": "2016-03-13T12:52:32.123Z" } ] } ``` ##### Preview Allocations Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/preview-allocations-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `allocations` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-allocation) | Required | - | | `effective_proration_date` | `Date` | Optional | To calculate proration amounts for a future time. Only within a current subscription period. Only ISO8601 format is supported. | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | # Example (as JSON) ```json { "allocations": [ { "quantity": 26.48, "decimal_quantity": "decimal_quantity8", "previous_quantity": 55.5, "decimal_previous_quantity": "decimal_previous_quantity2", "component_id": 242, "memo": "memo6" } ], "effective_proration_date": "2023-12-01", "upgrade_charge": "none", "downgrade_credit": "prorated" } ``` ##### Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `starting_quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/price-starting-quantity) | Required | - | | `ending_quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/price-ending-quantity) | Optional | - | | `unit_price` | [`Decimal \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/price-unit-price) | Required | The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 | # Example (as JSON) ```json { "starting_quantity": 40, "ending_quantity": 14, "unit_price": 125.12 } ``` ##### Product Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/product # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `name` | `String` | Optional | The product name | | `handle` | `String` | Optional | The product API handle | | `description` | `String` | Optional | The product description | | `accounting_code` | `String` | Optional | E.g., Internal ID or SKU Number | | `request_credit_card` | `Boolean` | Optional | Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, read this attribute from under the signup page. | | `expiration_interval` | `Number` | Optional | A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval. | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | A string representing the expiration interval unit for this product, either month, day or never | | `created_at` | `DateTime` | Optional | Timestamp indicating when this product was created | | `updated_at` | `DateTime` | Optional | Timestamp indicating when this product was last updated | | `price_in_cents` | `Long` | Optional | The product price, in integer cents | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this product, either month or day | | `initial_charge_in_cents` | `Long` | Optional | The up front charge you have specified. | | `trial_price_in_cents` | `Long` | Optional | The price of the trial period for a subscription to this product, in integer cents. | | `trial_interval` | `Number` | Optional | A numerical interval for the length of the trial period of a subscription to this product. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval. | | `trial_interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the trial interval unit for this product, either month or day | | `archived_at` | `DateTime` | Optional | Timestamp indicating when this product was archived | | `require_credit_card` | `Boolean` | Optional | Boolean that controls whether a payment profile is required to be entered for customers wishing to sign up on this product. | | `return_params` | `String` | Optional | - | | `taxable` | `Boolean` | Optional | - | | `update_return_url` | `String` | Optional | The url to which a customer will be returned after a successful account update | | `initial_charge_after_trial` | `Boolean` | Optional | - | | `version_number` | `Number` | Optional | The version of the product | | `update_return_params` | `String` | Optional | The parameters will append to the url after a successful account update. See [help documentation](https://help.chargify.com/products/product-editing.html#return-parameters-after-account-update). | | `product_family` | [`Product Family`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-family) | Optional | - | | `public_signup_pages` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/public-signup-page) | Optional | - | | `product_price_point_name` | `String` | Optional | - | | `request_billing_address` | `Boolean` | Optional | A boolean indicating whether to request a billing address on any Self-Service Pages that are used by subscribers of this product. | | `require_billing_address` | `Boolean` | Optional | A boolean indicating whether a billing address is required to add a payment profile, especially at signup. | | `require_shipping_address` | `Boolean` | Optional | A boolean indicating whether a shipping address is required for the customer, especially at signup. | | `tax_code` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `default_product_price_point_id` | `Number` | Optional | - | | `use_site_exchange_rate` | `Boolean` | Optional | - | | `item_category` | `String` | Optional | One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other | | `product_price_point_id` | `Number` | Optional | - | | `product_price_point_handle` | `String` | Optional | - | | `unspsc_code` | `String` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this product instead of the default derived from item_category. | | `features` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-catalog-item) | Optional | The active feature catalog items attached to this product. Present only when the request includes `include_features=true`. | # Example (as JSON) ```json { "id": 180, "name": "name4", "handle": "handle0", "description": "description4", "accounting_code": "accounting_code0" } ``` ##### Product Family Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/product-family # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `name` | `String` | Optional | - | | `handle` | `String` | Optional | - | | `accounting_code` | `String` | Optional | - | | `description` | `String` | Optional | - | | `surcharging` | `Boolean` | Optional | Whether surcharging applies to this product family. Only included on sites where surcharging is enabled. | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `archived_at` | `DateTime` | Optional | Timestamp indicating when this product family was archived. `null` if the product family is not archived. | # Example (as JSON) ```json { "id": 194, "name": "name2", "handle": "handle8", "accounting_code": "accounting_code8", "description": "description8" } ``` ##### Product Family Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/product-family-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product_family` | [`Product Family`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-family) | Optional | - | # Example (as JSON) ```json { "product_family": { "id": 14, "name": "name0", "handle": "handle6", "accounting_code": "accounting_code6", "description": "description0" } } ``` ##### Product Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `name` | `String` | Optional | The product price point name | | `handle` | `String` | Optional | The product price point API handle | | `price_in_cents` | `Long` | Optional | The product price point price, in integer cents | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this product price point, either month or day | | `trial_price_in_cents` | `Long` | Optional | The product price point trial price, in integer cents | | `trial_interval` | `Number` | Optional | The numerical trial interval. e.g., an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. | | `trial_interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the trial interval unit for this product price point, either month or day | | `trial_type` | [`Trial Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/trial-type) | Optional | Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | | `introductory_offer` | `Boolean` | Optional | reserved for future use | | `initial_charge_in_cents` | `Long` | Optional | The product price point initial charge, in integer cents | | `initial_charge_after_trial` | `Boolean` | Optional | - | | `expiration_interval` | `Number` | Optional | The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | A string representing the expiration interval unit for this product price point, either month, day or never | | `product_id` | `Number` | Optional | The product id this price point belongs to | | `archived_at` | `DateTime` | Optional | Timestamp indicating when this price point was archived | | `created_at` | `DateTime` | Optional | Timestamp indicating when this price point was created | | `updated_at` | `DateTime` | Optional | Timestamp indicating when this price point was last updated | | `use_site_exchange_rate` | `Boolean` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined. | | `type` | [`Price Point Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type) | Optional | The type of price point | | `tax_included` | `Boolean` | Optional | Whether or not the price point includes tax | | `subscription_id` | `Number` | Optional | The subscription id this price point belongs to | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/currency-price) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. | # Example (as JSON) ```json { "id": 196, "name": "name6", "handle": "handle2", "price_in_cents": 248, "interval": 8 } ``` ##### Product Price Point Error Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-error-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Product Price Point Errors`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-errors) | Required | - | # Example (as JSON) ```json { "errors": { "price_point": "can't be blank", "interval": [ "Recurring Interval: cannot be blank.", "Recurring Interval: must be greater than or equal to 1." ], "interval_unit": [ "Interval unit: cannot be blank.", "Interval unit: must be 'month' or 'day'." ], "name": [ "Name: cannot be blank." ], "price": [ "Price: is not a number.", "Price: must be greater than or equal to 0." ], "price_in_cents": [ "Price in cents: cannot be blank." ] } } ``` ##### Product Price Point Errors Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-errors # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point` | `String` | Optional | - | | `interval` | `array` | Optional | - | | `interval_unit` | `array` | Optional | - | | `name` | `array` | Optional | - | | `price` | `array` | Optional | - | | `price_in_cents` | `array` | Optional | - | # Example (as JSON) ```json { "price_point": "can't be blank", "interval": [ "Recurring Interval: cannot be blank.", "Recurring Interval: must be greater than or equal to 1." ], "interval_unit": [ "Interval unit: cannot be blank.", "Interval unit: must be 'month' or 'day'." ], "name": [ "Name: cannot be blank." ], "price": [ "Price: is not a number.", "Price: must be greater than or equal to 0." ], "price_in_cents": [ "Price in cents: cannot be blank." ] } ``` ##### Product Price Point Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point` | [`Product Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point) | Required | - | # Example (as JSON) ```json { "price_point": { "id": 248, "name": "name0", "handle": "handle6", "price_in_cents": 196, "interval": 44 } } ``` ##### Product Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/product-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product` | [`Product`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product) | Required | - | # Example (as JSON) ```json { "product": { "id": 134, "name": "name0", "handle": "handle6", "description": "description0", "accounting_code": "accounting_code6" } } ``` ##### Proforma Bad Request Error Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-bad-request-error-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Proforma Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-error) | Optional | - | # Example (as JSON) ```json { "errors": { "subscription": { "base": [ "base3", "base4" ] } } } ``` ##### Proforma Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription` | [`Base String Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/base-string-error) | Optional | The error is base if it is not directly associated with a single attribute. | # Example (as JSON) ```json { "subscription": { "base": [ "base3", "base4" ] } } ``` ##### Proforma Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `site_id` | `Number` | Optional | - | | `customer_id` | `Number` | Optional | - | | `subscription_id` | `Number` | Optional | - | | `number` | `Number` | Optional | - | | `sequence_number` | `Number` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `delivery_date` | `Date` | Optional | - | | `status` | [`Proforma Invoice Status`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-status) | Optional | - | | `collection_method` | [`Collection Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | | `payment_instructions` | `String` | Optional | - | | `currency` | `String` | Optional | - | | `consolidation_level` | [`Invoice Consolidation Level`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-consolidation-level) | Optional | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | | `product_name` | `String` | Optional | - | | `product_family_name` | `String` | Optional | - | | `role` | [`Proforma Invoice Role`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-role) | Optional | 'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic. | | `seller` | [`Invoice Seller`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-seller) | Optional | Information about the seller (merchant) listed on the masthead of the invoice. | | `customer` | [`Invoice Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-customer) | Optional | Information about the customer who is owner or recipient of the invoiced subscription. | | `memo` | `String` | Optional | - | | `billing_address` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Optional | - | | `shipping_address` | [`Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-address) | Optional | - | | `subtotal_amount` | `String` | Optional | - | | `discount_amount` | `String` | Optional | - | | `tax_amount` | `String` | Optional | - | | `total_amount` | `String` | Optional | - | | `credit_amount` | `String` | Optional | - | | `paid_amount` | `String` | Optional | - | | `refund_amount` | `String` | Optional | - | | `due_amount` | `String` | Optional | - | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item) | Optional | - | | `discounts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-discount) | Optional | - | | `taxes` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-tax) | Optional | - | | `credits` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-credit) | Optional | - | | `payments` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-payment) | Optional | - | | `custom_fields` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-custom-field) | Optional | - | | `public_url` | `String` | Optional | - | | `available_actions` | [`Available Actions`](https://developers.maxio.com/http/advanced-billing-api/models/structures/available-actions) | Optional | - | # Example (as JSON) ```json { "uid": "uid6", "site_id": 196, "customer_id": 52, "subscription_id": 124, "number": 0 } ``` ##### Proforma Invoice Credit Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-credit # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `memo` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `original_amount` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `applied_amount` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | # Example (as JSON) ```json { "uid": "uid8", "memo": "memo2", "original_amount": "original_amount2", "applied_amount": "applied_amount0" } ``` ##### Proforma Invoice Discount Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-discount # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `title` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `code` | `String` | Optional | - | | `source_type` | [`Proforma Invoice Discount Source Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-discount-source-type) | Optional | - | | `discount_type` | [`Invoice Discount Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-discount-type) | Optional | - | | `eligible_amount` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `discount_amount` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `line_item_breakouts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-discount-breakout) | Optional | **Constraints**: *Minimum Items*: `1`, *Unique Items Required* | # Example (as JSON) ```json { "uid": "uid2", "title": "title8", "code": "code0", "source_type": "Coupon", "discount_type": "percentage" } ``` ##### Proforma Invoice Issued Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-issued # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Required | - | | `number` | `String` | Required | - | | `role` | `String` | Required | - | | `delivery_date` | `Date` | Required | - | | `created_at` | `DateTime` | Required | - | | `due_amount` | `String` | Required | - | | `paid_amount` | `String` | Required | - | | `tax_amount` | `String` | Required | - | | `total_amount` | `String` | Required | - | | `product_name` | `String` | Required | - | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-line-item-event-data) | Required | - | # Example (as JSON) ```json { "uid": "uid0", "number": "number2", "role": "role6", "delivery_date": "2016-03-13", "created_at": "2016-03-13T12:52:32.123Z", "due_amount": "due_amount2", "paid_amount": "paid_amount8", "tax_amount": "tax_amount6", "total_amount": "total_amount6", "product_name": "product_name6", "line_items": [ { "uid": "uid8", "title": "title4", "description": "description8", "quantity": 102, "quantity_delta": 204 } ] } ``` ##### Proforma Invoice Payment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-payment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `memo` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `original_amount` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `applied_amount` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `prepayment` | `Boolean` | Optional | - | # Example (as JSON) ```json { "memo": "memo4", "original_amount": "original_amount4", "applied_amount": "applied_amount8", "prepayment": false } ``` ##### Proforma Invoice Tax Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-tax # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `title` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `source_type` | [`Proforma Invoice Tax Source Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-tax-source-type) | Optional | - | | `percentage` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `taxable_amount` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `tax_amount` | `String` | Optional | **Constraints**: *Minimum Length*: `1` | | `line_item_breakouts` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-tax-breakout) | Optional | **Constraints**: *Minimum Items*: `1`, *Unique Items Required* | # Example (as JSON) ```json { "uid": "uid8", "title": "title4", "source_type": "Tax", "percentage": "percentage6", "taxable_amount": "taxable_amount2" } ``` ##### Proration Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/proration # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `preserve_period` | `Boolean` | Optional | The alternative to sending preserve_period as a direct attribute to migration | # Example (as JSON) ```json { "preserve_period": false } ``` ##### Public Key Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/public-key # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `public_key` | `String` | Optional | - | | `requires_security_token` | `Boolean` | Optional | - | | `created_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "public_key": "public_key8", "requires_security_token": false, "created_at": "2016-03-13T12:52:32.123Z" } ``` ##### Public Signup Page Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/public-signup-page # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | The id of the signup page (public_signup_pages only) | | `return_url` | `String` | Optional | The url to which a customer will be returned after a successful signup (public_signup_pages only). | | `return_params` | `String` | Optional | The params to be appended to the return_url (public_signup_pages only) | | `url` | `String` | Optional | The url where the signup page can be viewed (public_signup_pages only). | # Example (as JSON) ```json { "id": 6, "return_url": "return_url0", "return_params": "return_params2", "url": "url8" } ``` ##### Quantity Based Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/quantity-based-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". | | `unit_name` | `String` | Required | “The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. e.g., “message”, which may then be shown as “5 messages” on a subscription’s component line-item.” | | `description` | `String` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | | `handle` | `String` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `price_points` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-item) | Optional | - | | `unit_price` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/quantity-based-component-unit-price) | Optional | The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 | | `tax_code` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `hide_date_range_on_invoice` | `Boolean` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | | `recurring` | `Boolean` | Optional | - | | `display_on_hosted_page` | `Boolean` | Optional | - | | `allow_fractional_quantities` | `Boolean` | Optional | - | | `public_signup_page_ids` | `array` | Optional | - | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component’s default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `unspsc_code` | `String` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | # Example (as JSON) ```json { "name": "name8", "unit_name": "unit_name0", "description": "description8", "handle": "handle4", "taxable": false, "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "upgrade_charge": "full" } ``` ##### Reactivate Subscription Group Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivate-subscription-group-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `resume` | `Boolean` | Optional | - | | `resume_members` | `Boolean` | Optional | - | # Example (as JSON) ```json { "resume": false, "resume_members": false } ``` ##### Reactivate Subscription Group Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivate-subscription-group-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `scheme` | `Number` | Optional | - | | `customer_id` | `Number` | Optional | - | | `payment_profile_id` | `Number` | Optional | - | | `subscription_ids` | `array` | Optional | - | | `primary_subscription_id` | `Number` | Optional | - | | `next_assessment_at` | `DateTime` | Optional | - | | `state` | `String` | Optional | - | | `cancel_at_end_of_period` | `Boolean` | Optional | - | # Example (as JSON) ```json { "uid": "uid4", "scheme": 66, "customer_id": 86, "payment_profile_id": 250, "subscription_ids": [ 196, 197 ] } ``` ##### Reactivate Subscription Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivate-subscription-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `calendar_billing` | [`Reactivation Billing`](https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivation-billing) | Optional | These values are only applicable to subscriptions using calendar billing. | | `include_trial` | `Boolean` | Optional | If `true` is sent, the reactivated Subscription will include a trial if one is available. If `false` is sent, the trial period will be ignored. | | `preserve_balance` | `Boolean` | Optional | If `true` is passed, the existing subscription balance will NOT be cleared/reset before adding the additional reactivation charges. | | `coupon_code` | `String` | Optional | The coupon code to be applied during reactivation. | | `use_credits_and_prepayments` | `Boolean` | Optional | If true is sent, Advanced Billing will use service credits and prepayments upon reactivation. If false is sent, the service credits and prepayments will be ignored. | | `resume` | [`Boolean \| Resume Options`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/reactivate-subscription-request-resume) | Optional | If `true`, Advanced Billing will attempt to resume the subscription's billing period. If not resumable, the subscription will be reactivated with a new billing period. If `false` or omitted, Advanced Billing will only attempt to reactivate the subscription with a new billing period, regardless of whether or not the subscription is resumable. | # Example (as JSON) ```json { "calendar_billing": { "reactivation_charge": "prorated" }, "include_trial": false, "preserve_balance": false, "coupon_code": "coupon_code6", "use_credits_and_prepayments": false } ``` ##### Reactivation Billing Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/reactivation-billing These values are only applicable to subscriptions using calendar billing. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `reactivation_charge` | [`Reactivation Charge`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/reactivation-charge) | Optional | You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal.

**Default**: `prorated` | # Example (as JSON) ```json { "reactivation_charge": "prorated" } ``` ##### Reason Code Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/reason-code # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `site_id` | `Number` | Optional | - | | `code` | `String` | Optional | - | | `description` | `String` | Optional | - | | `position` | `Number` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "id": 164, "site_id": 90, "code": "code0", "description": "description2", "position": 194 } ``` ##### Reason Code Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/reason-code-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `reason_code` | [`Reason Code`](https://developers.maxio.com/http/advanced-billing-api/models/structures/reason-code) | Required | - | # Example (as JSON) ```json { "reason_code": { "id": 240, "site_id": 166, "code": "code4", "description": "description6", "position": 14 } } ``` ##### Record Payment Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/record-payment-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment` | [`Create Payment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-payment) | Required | - | # Example (as JSON) ```json { "payment": { "amount": "amount8", "memo": "memo0", "payment_details": "payment_details6", "payment_method": "cash" } } ``` ##### Record Payment Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/record-payment-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `paid_invoices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/paid-invoice) | Optional | - | | `prepayment` | [`Invoice Pre Payment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-pre-payment) | Optional | - | # Example (as JSON) ```json { "paid_invoices": [ { "invoice_id": "invoice_id8", "status": "draft", "due_amount": "due_amount0", "paid_amount": "paid_amount0" }, { "invoice_id": "invoice_id8", "status": "draft", "due_amount": "due_amount0", "paid_amount": "paid_amount0" }, { "invoice_id": "invoice_id8", "status": "draft", "due_amount": "due_amount0", "paid_amount": "paid_amount0" } ], "prepayment": { "subscription_id": 148, "amount_in_cents": 124, "ending_balance_in_cents": 164 } } ``` ##### Referral Code Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/referral-code # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `site_id` | `Number` | Optional | - | | `subscription_id` | `Number` | Optional | - | | `code` | `String` | Optional | - | # Example (as JSON) ```json { "id": 42, "site_id": 224, "subscription_id": 152, "code": "code6" } ``` ##### Referral Validation Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/referral-validation-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `referral_code` | [`Referral Code`](https://developers.maxio.com/http/advanced-billing-api/models/structures/referral-code) | Optional | - | # Example (as JSON) ```json { "referral_code": { "id": 46, "site_id": 228, "subscription_id": 156, "code": "code0" } } ``` ##### Refund Consolidated Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-consolidated-invoice Refund consolidated invoice. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `memo` | `String` | Required | A description for the refund | | `payment_id` | `Number` | Required | The ID of the payment to be refunded | | `segment_uids` | [`array \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/refund-consolidated-invoice-segment-uids) | Required | An array of segment uids to refund or the string 'all' to indicate that all segments should be refunded | | `external` | `Boolean` | Optional | Flag that marks refund as external (no money is returned to the customer). Defaults to `false`. | | `apply_credit` | `Boolean` | Optional | If set to true, creates credit and applies it to an invoice. Defaults to `false`. | | `amount` | `String` | Optional | The amount of payment to be refunded in decimal format. Example: "10.50". This will default to the full amount of the payment if not provided. | # Example (as JSON) ```json { "memo": "memo0", "payment_id": 46, "segment_uids": [ "String0", "String1" ], "external": false, "apply_credit": false, "amount": "amount8" } ``` ##### Refund Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice Refund an invoice or a segment of a consolidated invoice. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount` | `String` | Required | The amount to be refunded in decimal format as a string. Example: "10.50". Must not exceed the remaining refundable balance of the payment. | | `memo` | `String` | Required | A description that will be attached to the refund | | `payment_id` | `Number` | Required | The ID of the payment to be refunded | | `external` | `Boolean` | Optional | Flag that marks refund as external (no money is returned to the customer). Defaults to `false`. | | `apply_credit` | `Boolean` | Optional | If set to true, creates credit and applies it to an invoice. Defaults to `false`. | | `void_invoice` | `Boolean` | Optional | If `apply_credit` is set to false and refunding full amount, if `void_invoice` is set to true, invoice will be voided after refund. Defaults to `false`. | # Example (as JSON) ```json { "amount": "amount8", "memo": "memo0", "payment_id": 0, "external": false, "apply_credit": false, "void_invoice": false } ``` ##### Refund Invoice Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice-event-data Example schema for an `refund_invoice` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `apply_credit` | `Boolean` | Required | If true, credit was created and applied it to the invoice. | | `consolidation_level` | [`Invoice Consolidation Level`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-consolidation-level) | Optional | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | | `credit_note_attributes` | [`Credit Note`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note) | Required | - | | `memo` | `String` | Optional | The refund memo. | | `original_amount` | `String` | Optional | The full, original amount of the refund. | | `payment_id` | `Number` | Required | The ID of the payment transaction to be refunded. | | `refund_amount` | `String` | Required | The amount of the refund. | | `refund_id` | `Number` | Required | The ID of the refund transaction. | | `transaction_time` | `DateTime` | Required | The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | # Example (as JSON) ```json { "apply_credit": false, "consolidation_level": "parent", "credit_note_attributes": { "uid": "uid2", "site_id": 72, "customer_id": 184, "subscription_id": 0, "number": "number0" }, "memo": "memo0", "original_amount": "original_amount0", "payment_id": 114, "refund_amount": "refund_amount8", "refund_id": 158, "transaction_time": "2016-03-13T12:52:32.123Z" } ``` ##### Refund Invoice Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `refund` | [`Refund Invoice \| Refund Consolidated Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/refund-invoice-request-refund) | Required | - | # Example (as JSON) ```json { "refund": { "amount": "amount8", "memo": "memo0", "payment_id": 0, "external": false, "apply_credit": false, "void_invoice": false } } ``` ##### Refund Prepayment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount_in_cents` | `Long` | Required | `amount` is not required if you pass `amount_in_cents`. | | `amount` | [`String \| Decimal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/refund-prepayment-amount) | Required | `amount_in_cents` is not required if you pass `amount`. | | `memo` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `external` | `Boolean` | Optional | Specify the type of refund you wish to initiate. When the prepayment is external, the `external` flag is optional. But if the prepayment was made through a payment profile, the `external` flag is required. | # Example (as JSON) ```json { "amount_in_cents": 110, "amount": "String3", "memo": "memo4", "external": false } ``` ##### Refund Prepayment Aggregated Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-aggregated-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `refund` | [`Prepayment Aggregated Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment-aggregated-error) | Optional | - | # Example (as JSON) ```json { "refund": { "amount_in_cents": [ "amount_in_cents5" ], "base": [ "base7" ], "external": [ "external0", "external1" ] } } ``` ##### Refund Prepayment Aggregated Errors Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-aggregated-errors-response Errors returned on creating a refund prepayment, grouped by field, as arrays of strings. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Refund Prepayment Aggregated Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-aggregated-error) | Optional | - | # Example (as JSON) ```json { "errors": { "refund": { "amount_in_cents": [ "amount_in_cents5" ], "base": [ "base7" ], "external": [ "external0", "external1" ] } } } ``` ##### Refund Prepayment Base Errors Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-base-errors-response-1 Errors returned on creating a refund prepayment when bad request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Refund Prepayment Base Refund Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-base-refund-error) | Optional | - | # Example (as JSON) ```json { "errors": { "refund": { "base": [ { "key1": "val1", "key2": "val2" } ] } } } ``` ##### Refund Prepayment Base Refund Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-base-refund-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `refund` | [`Base Refund Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/base-refund-error) | Optional | - | # Example (as JSON) ```json { "refund": { "base": [ { "key1": "val1", "key2": "val2" } ] } } ``` ##### Refund Prepayment Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `refund` | [`Refund Prepayment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment) | Required | - | # Example (as JSON) ```json { "refund": { "amount_in_cents": 132, "amount": "String1", "memo": "memo2", "external": false } } ``` ##### Refund Success Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-success # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `refund_id` | `Number` | Required | - | | `gateway_transaction_id` | `Number` | Required | - | | `product_id` | `Number` | Required | - | # Example (as JSON) ```json { "refund_id": 12, "gateway_transaction_id": 182, "product_id": 168 } ``` ##### Register Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/register # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `maxio_id` | `String` | Optional | - | | `name` | `String` | Optional | - | | `currency_code` | `String` | Optional | The ISO 4217 currency code (3 character string) representing the currency of an invoice transaction. | # Example (as JSON) ```json { "id": 90, "maxio_id": "maxio_id0", "name": "name6", "currency_code": "currency_code2" } ``` ##### Remove Payment Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/remove-payment-event-data Example schema for an `remove_payment` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `transaction_id` | `Number` | Required | Transaction ID of the original payment that was removed | | `memo` | `String` | Required | Memo of the original payment | | `original_amount` | `String` | Optional | Full amount of the original payment | | `applied_amount` | `String` | Required | Applied amount of the original payment | | `transaction_time` | `DateTime` | Required | Transaction time of the original payment, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | | `payment_method` | [`Payment Method Apple Pay \| Payment Method Bank Account \| Payment Method Credit Card \| Payment Method External \| Payment Method Paypal`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/invoice-event-payment) | Required | A nested data structure detailing the method of payment | | `prepayment` | `Boolean` | Required | The flag that shows whether the original payment was a prepayment or not | # Example (as JSON) ```json { "transaction_id": 180, "memo": "memo0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z", "payment_method": { "type": "apple_pay" }, "prepayment": false, "original_amount": "original_amount0" } ``` ##### Renewal Preview Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `next_assessment_at` | `DateTime` | Optional | The timestamp for the subscription’s next renewal | | `subtotal_in_cents` | `Long` | Optional | An integer representing the amount of the total pre-tax, pre-discount charges that will be assessed at the next renewal | | `total_tax_in_cents` | `Long` | Optional | An integer representing the total tax charges that will be assessed at the next renewal | | `total_discount_in_cents` | `Long` | Optional | An integer representing the amount of the coupon discounts that will be applied to the next renewal | | `total_in_cents` | `Long` | Optional | An integer representing the total amount owed, less any discounts, that will be assessed at the next renewal | | `existing_balance_in_cents` | `Long` | Optional | An integer representing the amount of the subscription’s current balance | | `total_amount_due_in_cents` | `Long` | Optional | An integer representing the existing_balance_in_cents plus the total_in_cents | | `uncalculated_taxes` | `Boolean` | Optional | A boolean indicating whether or not additional taxes will be calculated at the time of renewal. This will be true if you are using Avalara and the address of the subscription is in one of your defined taxable regions. | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-line-item) | Optional | An array of objects representing the individual transactions that will be created at the next renewal | # Example (as JSON) ```json { "next_assessment_at": "2016-03-13T12:52:32.123Z", "subtotal_in_cents": 160, "total_tax_in_cents": 28, "total_discount_in_cents": 34, "total_in_cents": 48 } ``` ##### Renewal Preview Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/renewal-preview-component-component-id) | Optional | Either the component's Chargify id or its handle prefixed with `handle:` | | `quantity` | `Number` | Optional | The quantity for which you wish to preview billing. This is useful if you want to preview a predicted, higher usage value than is currently present on the subscription.

This quantity represents:

- Whether or not an on/off component is enabled - use 0 for disabled or 1 for enabled
- The desired allocated_quantity for a quantity-based component
- The desired unit_balance for a metered component
- The desired metric quantity for an events-based component | | `price_point_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/renewal-preview-component-price-point-id) | Optional | Either the component price point's Chargify id or its handle prefixed with `handle:` | # Example (as JSON) ```json { "component_id": "String7", "quantity": 174, "price_point_id": "String1" } ``` ##### Renewal Preview Line Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-line-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `transaction_type` | [`Line Item Transaction Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/line-item-transaction-type) | Optional | A handle for the line item transaction type | | `kind` | [`Line Item Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/line-item-kind) | Optional | A handle for the line item kind | | `amount_in_cents` | `Long` | Optional | - | | `memo` | `String` | Optional | - | | `discount_amount_in_cents` | `Long` | Optional | - | | `taxable_amount_in_cents` | `Long` | Optional | - | | `product_id` | `Number` | Optional | - | | `product_name` | `String` | Optional | - | | `component_id` | `Number` | Optional | - | | `component_handle` | `String` | Optional | - | | `component_name` | `String` | Optional | - | | `product_handle` | `String` | Optional | - | | `period_range_start` | `String` | Optional | - | | `period_range_end` | `String` | Optional | - | # Example (as JSON) ```json { "transaction_type": "charge", "kind": "prepaid_usage_component", "amount_in_cents": 154, "memo": "memo0", "discount_amount_in_cents": 214 } ``` ##### Renewal Preview Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `components` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-component) | Optional | (Optional) Array of component definitions to preview. Providing any component definitions here will override the actual components on the subscription (and their quantities), and the billing preview will contain only these components (in addition to any product base fees). | # Example (as JSON) ```json { "components": [ { "component_id": "String5", "quantity": 210, "price_point_id": "String3" }, { "component_id": "String5", "quantity": 210, "price_point_id": "String3" }, { "component_id": "String5", "quantity": 210, "price_point_id": "String3" } ] } ``` ##### Renewal Preview Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `renewal_preview` | [`Renewal Preview`](https://developers.maxio.com/http/advanced-billing-api/models/structures/renewal-preview) | Required | - | # Example (as JSON) ```json { "renewal_preview": { "next_assessment_at": "2016-03-13T12:52:32.123Z", "subtotal_in_cents": 132, "total_tax_in_cents": 0, "total_discount_in_cents": 250, "total_in_cents": 20 } } ``` ##### Replay Webhooks Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/replay-webhooks-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `ids` | `array` | Required | - | # Example (as JSON) ```json { "ids": [ 15 ] } ``` ##### Replay Webhooks Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/replay-webhooks-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `status` | `String` | Optional | - | # Example (as JSON) ```json { "status": "status4" } ``` ##### Resent Invitation Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/resent-invitation # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `last_sent_at` | `String` | Optional | - | | `last_accepted_at` | `String` | Optional | - | | `send_invite_link_text` | `String` | Optional | - | | `uninvited_count` | `Number` | Optional | - | | `last_invite_sent_at` | `DateTime` | Optional | - | | `last_invite_accepted_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "last_invite_sent_at": "2024-01-01T00:30:00-04:00", "last_invite_accepted_at": "2024-01-01T00:35:00-04:00", "last_sent_at": "last_sent_at8", "last_accepted_at": "last_accepted_at8", "send_invite_link_text": "send_invite_link_text6", "uninvited_count": 6 } ``` ##### Resume Options Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/resume-options # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `require_resume` | `Boolean` | Optional | Chargify will only attempt to resume the subscription's billing period. If not resumable, the subscription will be left in its current state. | | `forgive_balance` | `Boolean` | Optional | Indicates whether or not Chargify should clear the subscription's existing balance before attempting to resume the subscription. If subscription cannot be resumed, the balance will remain as it was before the attempt to resume was made. | # Example (as JSON) ```json { "require_resume": false, "forgive_balance": false } ``` ##### Revoked Invitation Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/revoked-invitation # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `last_sent_at` | `String` | Optional | - | | `last_accepted_at` | `String` | Optional | - | | `uninvited_count` | `Number` | Optional | - | # Example (as JSON) ```json { "last_sent_at": "last_sent_at2", "last_accepted_at": "last_accepted_at2", "uninvited_count": 226 } ``` ##### Sale Rep Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `full_name` | `String` | Optional | - | | `subscriptions_count` | `Number` | Optional | - | | `test_mode` | `Boolean` | Optional | - | | `subscriptions` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep-subscription) | Optional | - | # Example (as JSON) ```json { "id": 18, "full_name": "full_name0", "subscriptions_count": 162, "test_mode": false, "subscriptions": [ { "id": 202, "site_name": "site_name8", "subscription_url": "subscription_url2", "customer_name": "customer_name8", "created_at": "created_at4" }, { "id": 202, "site_name": "site_name8", "subscription_url": "subscription_url2", "customer_name": "customer_name8", "created_at": "created_at4" } ] } ``` ##### Sale Rep Item Mrr Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep-item-mrr # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `mrr` | `String` | Optional | - | | `usage` | `String` | Optional | - | | `recurring` | `String` | Optional | - | # Example (as JSON) ```json { "mrr": "mrr2", "usage": "usage0", "recurring": "recurring4" } ``` ##### Sale Rep Settings Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep-settings # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customer_name` | `String` | Optional | - | | `subscription_id` | `Number` | Optional | - | | `site_link` | `String` | Optional | - | | `site_name` | `String` | Optional | - | | `subscription_mrr` | `String` | Optional | - | | `sales_rep_id` | `Number` | Optional | - | | `sales_rep_name` | `String` | Optional | - | # Example (as JSON) ```json { "customer_name": "customer_name8", "subscription_id": 200, "site_link": "site_link4", "site_name": "site_name8", "subscription_mrr": "subscription_mrr6" } ``` ##### Sale Rep Subscription Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/sale-rep-subscription # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `site_name` | `String` | Optional | - | | `subscription_url` | `String` | Optional | - | | `customer_name` | `String` | Optional | - | | `created_at` | `String` | Optional | - | | `mrr` | `String` | Optional | - | | `usage` | `String` | Optional | - | | `recurring` | `String` | Optional | - | | `last_payment` | `String` | Optional | - | | `churn_date` | `String` | Optional | - | # Example (as JSON) ```json { "id": 18, "site_name": "site_name2", "subscription_url": "subscription_url6", "customer_name": "customer_name2", "created_at": "created_at8" } ``` ##### Scheduled Renewal Component Custom Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-component-custom-price Custom pricing for a component within a scheduled renewal. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `tax_included` | `Boolean` | Optional | Whether or not the price point includes tax | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | Omit for On/Off components. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Required | On/off components only need one price bracket starting at 1. | # Example (as JSON) ```json { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "tax_included": false } ``` ##### Scheduled Renewal Configuration Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | ID of the renewal. | | `site_id` | `Number` | Optional | ID of the site to which the renewal belongs. | | `subscription_id` | `Number` | Optional | The id of the subscription. | | `starts_at` | `DateTime` | Optional | - | | `ends_at` | `DateTime` | Optional | - | | `lock_in_at` | `DateTime` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `status` | `String` | Optional | - | | `scheduled_renewal_configuration_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item) | Optional | - | | `contract` | [`Contract`](https://developers.maxio.com/http/advanced-billing-api/models/structures/contract) | Optional | Contract linked to the scheduled renewal configuration. | # Example (as JSON) ```json { "id": 152, "site_id": 78, "subscription_id": 6, "starts_at": "2016-03-13T12:52:32.123Z", "ends_at": "2016-03-13T12:52:32.123Z" } ``` ##### Scheduled Renewal Configuration Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `subscription_id` | `Number` | Optional | - | | `subscription_renewal_configuration_id` | `Number` | Optional | - | | `item_id` | `Number` | Optional | - | | `item_type` | `String` | Optional | - | | `item_subclass` | `String` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `price_point_type` | `String` | Optional | - | | `quantity` | `Number` | Optional | - | | `decimal_quantity` | `String` | Optional | - | | `created_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "id": 146, "subscription_id": 0, "subscription_renewal_configuration_id": 156, "item_id": 38, "item_type": "item_type4" } ``` ##### Scheduled Renewal Configuration Item Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `renewal_configuration_item` | [`Scheduled Renewal Item Request Body Component \| Scheduled Renewal Item Request Body Product`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-configuration-item-request-renewal-configuration-item) | Required | - | # Example (as JSON) ```json { "renewal_configuration_item": { "item_type": "Component", "item_id": 108, "price_point_id": 122, "quantity": 212, "custom_price": { "tax_included": false, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } } } ``` ##### Scheduled Renewal Configuration Item Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `scheduled_renewal_configuration_item` | [`Scheduled Renewal Configuration Item`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-item) | Optional | - | # Example (as JSON) ```json { "scheduled_renewal_configuration_item": { "id": 98, "subscription_id": 208, "subscription_renewal_configuration_id": 108, "item_id": 246, "item_type": "item_type2" } } ``` ##### Scheduled Renewal Configuration Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `renewal_configuration` | [`Scheduled Renewal Configuration Request Body`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-request-body) | Required | - | # Example (as JSON) ```json { "renewal_configuration": { "starts_at": "2016-03-13T12:52:32.123Z", "ends_at": "2016-03-13T12:52:32.123Z", "lock_in_at": "2016-03-13T12:52:32.123Z", "contract_id": 244, "create_new_contract": false } } ``` ##### Scheduled Renewal Configuration Request Body Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-request-body # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `starts_at` | `DateTime` | Optional | (Optional) Start of the renewal term. | | `ends_at` | `DateTime` | Optional | (Optional) End of the renewal term. | | `lock_in_at` | `DateTime` | Optional | (Optional) Lock-in date for the renewal. | | `contract_id` | `Number` | Optional | (Optional) Existing contract to associate with the scheduled renewal. Contracts must be enabled for your site. | | `create_new_contract` | `Boolean` | Optional | (Optional) Set to true to create a new contract when contracts are enabled. Contracts must be enabled for your site. | # Example (as JSON) ```json { "starts_at": "2016-03-13T12:52:32.123Z", "ends_at": "2016-03-13T12:52:32.123Z", "lock_in_at": "2016-03-13T12:52:32.123Z", "contract_id": 110, "create_new_contract": false } ``` ##### Scheduled Renewal Configuration Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `scheduled_renewal_configuration` | [`Scheduled Renewal Configuration`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration) | Optional | - | # Example (as JSON) ```json { "scheduled_renewal_configuration": { "id": 134, "site_id": 60, "subscription_id": 244, "starts_at": "2016-03-13T12:52:32.123Z", "ends_at": "2016-03-13T12:52:32.123Z" } } ``` ##### Scheduled Renewal Configurations Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configurations-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `scheduled_renewal_configurations` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-configuration) | Optional | - | # Example (as JSON) ```json { "scheduled_renewal_configurations": [ { "id": 122, "site_id": 48, "subscription_id": 232, "starts_at": "2016-03-13T12:52:32.123Z", "ends_at": "2016-03-13T12:52:32.123Z" }, { "id": 122, "site_id": 48, "subscription_id": 232, "starts_at": "2016-03-13T12:52:32.123Z", "ends_at": "2016-03-13T12:52:32.123Z" }, { "id": 122, "site_id": 48, "subscription_id": 232, "starts_at": "2016-03-13T12:52:32.123Z", "ends_at": "2016-03-13T12:52:32.123Z" } ] } ``` ##### Scheduled Renewal Item Request Body Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-item-request-body-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `item_type` | `String` | Required, Constant | Item type to add. Either Product or Component.

**Value**: `Component` | | `item_id` | `Number` | Required | Product or component identifier. | | `price_point_id` | `Number` | Optional | Price point identifier. | | `quantity` | `Number` | Optional | (Optional) Quantity for the item. | | `custom_price` | [`Scheduled Renewal Component Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-component-custom-price) | Optional | Custom pricing for a component within a scheduled renewal. | # Example (as JSON) ```json { "item_type": "Component", "item_id": 108, "price_point_id": 122, "quantity": 212, "custom_price": { "tax_included": false, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } } ``` ##### Scheduled Renewal Item Request Body Product Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-item-request-body-product # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `item_type` | `String` | Required, Constant | Item type to add. Either Product or Component.

**Value**: `Product` | | `item_id` | `Number` | Required | Product or component identifier. | | `price_point_id` | `Number` | Optional | Price point identifier. | | `quantity` | `Number` | Optional | (Optional) Quantity for the item. | | `custom_price` | [`Scheduled Renewal Product Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-product-price-point) | Optional | Custom pricing for a product within a scheduled renewal. | # Example (as JSON) ```json { "item_type": "Product", "item_id": 32, "price_point_id": 18, "quantity": 96, "custom_price": { "name": "name4", "handle": "handle0", "price_in_cents": "String3", "interval": "String3", "interval_unit": "day", "tax_included": false, "initial_charge_in_cents": 30, "expiration_interval": 52 } } ``` ##### Scheduled Renewal Lock in Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-lock-in-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `lock_in_at` | `Date` | Required | Date to lock in the renewal. | # Example (as JSON) ```json { "lock_in_at": "2016-03-13" } ``` ##### Scheduled Renewal Product Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-product-price-point Custom pricing for a product within a scheduled renewal. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Optional | (Optional) | | `handle` | `String` | Optional | (Optional) | | `price_in_cents` | [`String \| Long`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-product-price-point-price-in-cents) | Required | Required if using `custom_price` attribute. | | `interval` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-product-price-point-interval) | Required | Required if using `custom_price` attribute. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Required | Required if using `custom_price` attribute. | | `tax_included` | `Boolean` | Optional | (Optional) | | `initial_charge_in_cents` | `Long` | Optional | The product price point initial charge, in integer cents. | | `expiration_interval` | `Number` | Optional | The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | A string representing the expiration interval unit for this product price point, either month, day or never | # Example (as JSON) ```json { "name": "name4", "handle": "handle0", "price_in_cents": "String3", "interval": "String9", "interval_unit": "day", "tax_included": false, "initial_charge_in_cents": 86, "expiration_interval": 108 } ``` ##### Scheduled Renewal Update Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-update-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `renewal_configuration_item` | [`Scheduled Renewal Item Request Body Component \| Scheduled Renewal Item Request Body Product`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-update-request-renewal-configuration-item) | Required | - | # Example (as JSON) ```json { "renewal_configuration_item": { "item_type": "Component", "item_id": 108, "price_point_id": 122, "quantity": 212, "custom_price": { "tax_included": false, "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } } } ``` ##### Segment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/segment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `component_id` | `Number` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `event_based_billing_metric_id` | `Number` | Optional | - | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `segment_property_1_value` | [`String \| Decimal \| Number \| Boolean`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-1-value) | Optional | - | | `segment_property_2_value` | [`String \| Decimal \| Number \| Boolean`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-2-value) | Optional | - | | `segment_property_3_value` | [`String \| Decimal \| Number \| Boolean`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-3-value) | Optional | - | | `segment_property_4_value` | [`String \| Decimal \| Number \| Boolean`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-4-value) | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/segment-price) | Optional | **Constraints**: *Minimum Items*: `1` | # Example (as JSON) ```json { "id": 6, "component_id": 116, "price_point_id": 140, "event_based_billing_metric_id": 200, "pricing_scheme": "stairstep" } ``` ##### Segment Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/segment-price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `component_id` | `Number` | Optional | - | | `starting_quantity` | `Number` | Optional | - | | `ending_quantity` | `Number` | Optional | - | | `unit_price` | `String` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `formatted_unit_price` | `String` | Optional | - | | `segment_id` | `Number` | Optional | - | # Example (as JSON) ```json { "id": 220, "component_id": 74, "starting_quantity": 118, "ending_quantity": 92, "unit_price": "unit_price0" } ``` ##### Segment Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/segment-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `segment` | [`Segment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/segment) | Optional | - | # Example (as JSON) ```json { "segment": { "id": 118, "component_id": 228, "price_point_id": 4, "event_based_billing_metric_id": 56, "pricing_scheme": "stairstep" } } ``` ##### Send Invoice Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/send-invoice-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `recipient_emails` | `array` | Optional | **Constraints**: *Maximum Items*: `5` | | `cc_recipient_emails` | `array` | Optional | **Constraints**: *Maximum Items*: `5` | | `bcc_recipient_emails` | `array` | Optional | **Constraints**: *Maximum Items*: `5` | | `attachment_urls` | `array` | Optional | Array of URLs to files to attach to the invoice email. Max 10 files, 10MB each.

**Constraints**: *Maximum Items*: `10` | # Example (as JSON) ```json { "recipient_emails": [ "recipient_emails3", "recipient_emails4" ], "cc_recipient_emails": [ "cc_recipient_emails6", "cc_recipient_emails5" ], "bcc_recipient_emails": [ "bcc_recipient_emails6" ], "attachment_urls": [ "attachment_urls0", "attachment_urls1" ] } ``` ##### Send Email Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/send-email # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `can_execute` | `Boolean` | Required | - | | `url` | `String` | Required | - | # Example (as JSON) ```json { "can_execute": false, "url": "url2" } ``` ##### Service Credit Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `amount_in_cents` | `Long` | Optional | The amount in cents of the entry | | `ending_balance_in_cents` | `Long` | Optional | The new balance for the credit account | | `entry_type` | [`Service Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/service-credit-type) | Optional | The type of entry | | `memo` | `String` | Optional | The memo attached to the entry | # Example (as JSON) ```json { "id": 216, "amount_in_cents": 210, "ending_balance_in_cents": 86, "entry_type": "Credit", "memo": "memo2" } ``` ##### Service Credit Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `service_credit` | [`Service Credit`](https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit) | Required | - | # Example (as JSON) ```json { "service_credit": { "id": 38, "amount_in_cents": 124, "ending_balance_in_cents": 164, "entry_type": "Credit", "memo": "memo0" } } ``` ##### Service Credit 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/service-credit-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `amount_in_cents` | `Long` | Optional | The amount in cents of the entry | | `ending_balance_in_cents` | `Long` | Optional | The new balance for the credit account | | `entry_type` | [`Service Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/service-credit-type) | Optional | The type of entry | | `memo` | `String` | Optional | The memo attached to the entry | | `invoice_uid` | `String` | Optional | The invoice uid associated with the entry. Only present for debit entries. | | `remaining_balance_in_cents` | `Long` | Optional | The remaining balance for the entry | | `created_at` | `DateTime` | Optional | The date and time the entry was created | # Example (as JSON) ```json { "id": 174, "amount_in_cents": 4, "ending_balance_in_cents": 44, "entry_type": "Credit", "memo": "memo8" } ``` ##### Signup Proforma Preview Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/signup-proforma-preview # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `current_proforma_invoice` | [`Proforma Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) | Optional | - | | `next_proforma_invoice` | [`Proforma Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice) | Optional | - | # Example (as JSON) ```json { "current_proforma_invoice": { "uid": "uid6", "site_id": 72, "customer_id": 184, "subscription_id": 0, "number": 132 }, "next_proforma_invoice": { "uid": "uid8", "site_id": 212, "customer_id": 68, "subscription_id": 140, "number": 16 } } ``` ##### Signup Proforma Preview Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/signup-proforma-preview-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `proforma_invoice_preview` | [`Signup Proforma Preview`](https://developers.maxio.com/http/advanced-billing-api/models/structures/signup-proforma-preview) | Required | - | # Example (as JSON) ```json { "proforma_invoice_preview": { "current_proforma_invoice": { "uid": "uid6", "site_id": 72, "customer_id": 184, "subscription_id": 0, "number": 132 }, "next_proforma_invoice": { "uid": "uid8", "site_id": 212, "customer_id": 68, "subscription_id": 140, "number": 16 } } } ``` ##### Single Error Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/single-error-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `error` | `String` | Required | - | # Example (as JSON) ```json { "error": "error0" } ``` ##### Single String Error Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/single-string-error-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `String` | Optional | - | # Example (as JSON) ```json { "errors": "errors8" } ``` ##### Site Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/site # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `name` | `String` | Optional | - | | `subdomain` | `String` | Optional | - | | `currency` | `String` | Optional | - | | `seller_id` | `Number` | Optional | - | | `non_primary_currencies` | `array` | Optional | - | | `relationship_invoicing_enabled` | `Boolean` | Optional | - | | `schedule_subscription_cancellation_enabled` | `Boolean` | Optional | - | | `customer_hierarchy_enabled` | `Boolean` | Optional | - | | `whopays_enabled` | `Boolean` | Optional | - | | `whopays_default_payer` | `String` | Optional | - | | `allocation_settings` | [`Allocation Settings`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-settings) | Optional | - | | `default_payment_collection_method` | `String` | Optional | - | | `organization_address` | [`Organization Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/organization-address) | Optional | - | | `tax_configuration` | [`Tax Configuration`](https://developers.maxio.com/http/advanced-billing-api/models/structures/tax-configuration) | Optional | - | | `net_terms` | [`Net Terms`](https://developers.maxio.com/http/advanced-billing-api/models/structures/net-terms) | Optional | - | | `multi_frequency_enabled` | `Boolean` | Optional | Whether the site has the multi-frequency billing feature enabled. Only present when relationship invoicing is active. | | `auto_renewals_enabled` | `Boolean` | Optional | Whether the auto-renewals feature is enabled for this site. | | `portal_enabled` | `Boolean` | Optional | Whether the Billing Portal is enabled for this site. | | `test` | `Boolean` | Optional | - | # Example (as JSON) ```json { "id": 34, "name": "name0", "subdomain": "subdomain4", "currency": "currency0", "seller_id": 198 } ``` ##### Site Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/site-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `site` | [`Site`](https://developers.maxio.com/http/advanced-billing-api/models/structures/site) | Required | - | # Example (as JSON) ```json { "site": { "id": 64, "name": "name4", "subdomain": "subdomain0", "currency": "currency4", "seller_id": 228 } } ``` ##### Site Statistics Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/site-statistics # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `total_subscriptions` | `Number` | Optional | - | | `subscriptions_today` | `Number` | Optional | - | | `total_revenue` | `String` | Optional | - | | `revenue_today` | `String` | Optional | - | | `revenue_this_month` | `String` | Optional | - | | `revenue_this_year` | `String` | Optional | - | | `total_canceled_subscriptions` | `Number` | Optional | - | | `total_active_subscriptions` | `Number` | Optional | - | | `total_past_due_subscriptions` | `Number` | Optional | - | | `total_unpaid_subscriptions` | `Number` | Optional | - | | `total_dunning_subscriptions` | `Number` | Optional | - | # Example (as JSON) ```json { "total_subscriptions": 204, "subscriptions_today": 134, "total_revenue": "total_revenue6", "revenue_today": "revenue_today4", "revenue_this_month": "revenue_this_month4" } ``` ##### Site Summary Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/site-summary # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `seller_name` | `String` | Optional | - | | `site_name` | `String` | Optional | - | | `site_id` | `Number` | Optional | - | | `site_currency` | `String` | Optional | - | | `stats` | [`Site Statistics`](https://developers.maxio.com/http/advanced-billing-api/models/structures/site-statistics) | Optional | - | # Example (as JSON) ```json { "seller_name": "seller_name0", "site_name": "site_name4", "site_id": 218, "site_currency": "site_currency6", "stats": { "total_subscriptions": 110, "subscriptions_today": 228, "total_revenue": "total_revenue6", "revenue_today": "revenue_today4", "revenue_this_month": "revenue_this_month4" } } ``` ##### Subscription Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | The subscription unique id within Chargify. | | `state` | [`Subscription State`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state) | Optional | The state of a subscription.

* **Live States**
* `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
* `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
* `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
* **Problem States**
* `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
* `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
* `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`.
* **End of Life States**
* `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription.
While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
* `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
* `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
* `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
* `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
* `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details.

See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. | | `balance_in_cents` | `Long` | Optional | Gives the current outstanding subscription balance in the number of cents. | | `total_revenue_in_cents` | `Long` | Optional | Gives the total revenue from the subscription in the number of cents. | | `product_price_in_cents` | `Long` | Optional | (Added Nov 5 2013) The recurring amount of the product (and version), currently subscribed. NOTE: this may differ from the current price of the product, if you’ve changed the price of the product but haven’t moved this subscription to a newer version. | | `product_version_number` | `Number` | Optional | The version of the product for the subscription. Note that this is a deprecated field kept for backwards-compatibility. | | `current_period_ends_at` | `DateTime` | Optional | Timestamp relating to the end of the current (recurring) period (i.e., when the next regularly scheduled attempted charge will occur) | | `next_assessment_at` | `DateTime` | Optional | Timestamp that indicates when capture of payment will be tried or retried. This value will usually track the current_period_ends_at, but will diverge if a renewal payment fails and must be retried. In that case, the current_period_ends_at will advance to the end of the next period (time doesn’t stop because a payment was missed) but the next_assessment_at will be scheduled for the auto-retry time (e.g., 24 hours in the future, in some cases). | | `trial_started_at` | `DateTime` | Optional | Timestamp for when the trial period (if any) began | | `trial_ended_at` | `DateTime` | Optional | Timestamp for when the trial period (if any) ended | | `activated_at` | `DateTime` | Optional | Timestamp for when the subscription began (i.e., when it came out of trial, or when it began in the case of no trial) | | `expires_at` | `DateTime` | Optional | Timestamp giving the expiration date of this subscription (if any) | | `created_at` | `DateTime` | Optional | The creation date for this subscription | | `updated_at` | `DateTime` | Optional | The date of last update for this subscription | | `cancellation_message` | `String` | Optional | Seller-provided reason for, or note about, the cancellation. | | `cancellation_method` | [`Cancellation Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/cancellation-method) | Optional | The process used to cancel the subscription, if the subscription has been canceled. It is nil if the subscription's state is not canceled. | | `cancel_at_end_of_period` | `Boolean` | Optional | Whether or not the subscription will (or has) canceled at the end of the period. | | `canceled_at` | `DateTime` | Optional | The timestamp of the most recent cancellation | | `current_period_started_at` | `DateTime` | Optional | Timestamp relating to the start of the current (recurring) period | | `previous_state` | [`Subscription State`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state) | Optional | Only valid for webhook payloads The previous state for webhooks that have indicated a change in state. For normal API calls, this will always be the same as the state (current state). | | `signup_payment_id` | `Number` | Optional | The ID of the transaction that generated the revenue | | `signup_revenue` | `String` | Optional | The revenue, formatted as a string of decimal separated dollars and cents, from the subscription signup ($50.00 would be formatted as 50.00) | | `delayed_cancel_at` | `DateTime` | Optional | Timestamp for when the subscription is currently set to cancel. | | `coupon_code` | `String` | Optional | (deprecated) The coupon code of the single coupon currently applied to the subscription. See coupon_codes instead as subscriptions can now have more than one coupon. | | `snap_day` | `String` | Optional | A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. | | `payment_collection_method` | [`Collection Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | | `customer` | [`Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer) | Optional | - | | `product` | [`Product`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product) | Optional | - | | `credit_card` | [`Credit Card Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-card-payment-profile) | Optional | - | | `group` | [`Nested Subscription Group`](https://developers.maxio.com/http/advanced-billing-api/models/structures/nested-subscription-group) | Optional | - | | `bank_account` | [`Bank Account Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-payment-profile) | Optional | - | | `payment_type` | `String` | Optional | The payment profile type for the active profile on file. | | `referral_code` | `String` | Optional | The subscription's unique code that can be given to referrals. | | `next_product_id` | `Number` | Optional | If a delayed product change is scheduled, the ID of the product that the subscription will be changed to at the next renewal. | | `next_product_handle` | `String` | Optional | If a delayed product change is scheduled, the handle of the product that the subscription will be changed to at the next renewal. | | `coupon_use_count` | `Number` | Optional | (deprecated) How many times the subscription's single coupon has been used. This field has no replacement for multiple coupons. | | `coupon_uses_allowed` | `Number` | Optional | (deprecated) How many times the subscription's single coupon may be used. This field has no replacement for multiple coupons. | | `reason_code` | `String` | Optional | The churn reason code associated to a canceled subscription. | | `automatically_resume_at` | `DateTime` | Optional | The date the subscription is scheduled to automatically resume from the on_hold state. | | `coupon_codes` | `array` | Optional | An array for all the coupons attached to the subscription. | | `offer_id` | `Number` | Optional | The ID of the offer associated with the subscription. | | `payer_id` | `Number` | Optional | On Relationship Invoicing, the ID of the individual paying for the subscription. Defaults to the Customer ID unless the 'Customer Hierarchies & WhoPays' feature is enabled. | | `current_billing_amount_in_cents` | `Long` | Optional | The balance in cents plus the estimated renewal amount in cents. Returned ONLY for the readSubscription operation as it's a compute intensive operation. | | `product_price_point_id` | `Number` | Optional | The product price point currently subscribed to. | | `product_price_point_type` | [`Price Point Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type) | Optional | Price point type. We expose the following types:

1. **default**: a price point that is marked as a default price for a certain product.
2. **custom**: a custom price point.
3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. | | `next_product_price_point_id` | `Number` | Optional | If a delayed product change is scheduled, the ID of the product price point that the subscription will be changed to at the next renewal. | | `net_terms` | `Number` | Optional | On Relationship Invoicing, the number of days before a renewal invoice is due. | | `stored_credential_transaction_id` | `Number` | Optional | For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. | | `reference` | `String` | Optional | The reference value (provided by your app) for the subscription itself. | | `on_hold_at` | `DateTime` | Optional | The timestamp of the most recent on hold action. | | `prepaid_dunning` | `Boolean` | Optional | Boolean representing whether the subscription is prepaid and currently in dunning. Only returned for Relationship Invoicing sites with the feature enabled. | | `coupons` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-included-coupon) | Optional | Additional coupon data. To use this data you also have to include the following param in the request: `include[]=coupons`.
Only in Read Subscription Endpoint. | | `dunning_communication_delay_enabled` | `Boolean` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute. | | `dunning_communication_delay_time_zone` | `String` | Optional | Time zone for the Dunning Communication Delay feature. | | `receives_invoice_emails` | `Boolean` | Optional | - | | `locale` | `String` | Optional | - | | `currency` | `String` | Optional | - | | `scheduled_cancellation_at` | `DateTime` | Optional | - | | `credit_balance_in_cents` | `Long` | Optional | - | | `prepayment_balance_in_cents` | `Long` | Optional | - | | `prepaid_configuration` | [`Prepaid Configuration`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-configuration) | Optional | - | | `self_service_page_token` | `String` | Optional | Returned only for list/read Subscription operation when `include[]=self_service_page_token` parameter is provided. | # Example (as JSON) ```json { "credit_card": { "id": 10088716, "first_name": "Test", "last_name": "Subscription", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 1, "expiration_year": 2022, "customer_id": 14543792, "current_vault": "bogus", "vault_token": "1", "billing_address": "123 Montana Way", "billing_city": "Billings", "billing_state": "MT", "billing_zip": "59101", "billing_country": "US", "customer_vault_token": null, "billing_address_2": "", "payment_type": "credit_card", "site_gateway_setting_id": 1, "gateway_handle": null }, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "id": 96, "state": "soft_failure", "balance_in_cents": 212, "total_revenue_in_cents": 136, "product_price_in_cents": 70 } ``` ##### Subscription Add Coupon Error 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-add-coupon-error-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `codes` | `array` | Optional | - | | `coupon_code` | `array` | Optional | - | | `coupon_codes` | `array` | Optional | - | | `subscription` | `array` | Optional | - | # Example (as JSON) ```json { "codes": [ "codes0", "codes1" ], "coupon_code": [ "coupon_code4" ], "coupon_codes": [ "coupon_codes6", "coupon_codes7", "coupon_codes8" ], "subscription": [ "subscription0", "subscription9" ] } ``` ##### Subscription Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `name` | `String` | Optional | - | | `kind` | [`Component Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/component-kind) | Optional | A handle for the component type | | `unit_name` | `String` | Optional | - | | `enabled` | `Boolean` | Optional | (for on/off components) indicates if the component is enabled for the subscription. | | `unit_balance` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-component-unit-balance) | Optional | - | | `currency` | `String` | Optional | - | | `allocated_quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-component-allocated-quantity) | Optional | For Quantity-based components: The current allocation for the component on the given subscription. For On/Off components: Use 1 for on. Use 0 for off. | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | - | | `component_id` | `Number` | Optional | - | | `component_handle` | `String` | Optional | - | | `subscription_id` | `Number` | Optional | - | | `recurring` | `Boolean` | Optional | - | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `downgrade_credit` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `archived_at` | `DateTime` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `price_point_handle` | `String` | Optional | - | | `price_point_type` | [`Price Point Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type) | Optional | - | | `price_point_name` | `String` | Optional | - | | `product_family_id` | `Number` | Optional | - | | `product_family_handle` | `String` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `use_site_exchange_rate` | `Boolean` | Optional | - | | `description` | `String` | Optional | - | | `allow_fractional_quantities` | `Boolean` | Optional | - | | `subscription` | [`Subscription Component Subscription`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-subscription) | Optional | (Optional) Object that will be returned if the `include=subscription` query param is provided. | | `historic_usages` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/historic-usage) | Optional | - | | `display_on_hosted_page` | `Boolean` | Optional | - | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | # Example (as JSON) ```json { "id": 20, "name": "name8", "kind": "quantity_based_component", "unit_name": "unit_name0", "enabled": false } ``` ##### Subscription Component Allocation Error Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-allocation-error-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `kind` | `String` | Optional | - | | `message` | `String` | Optional | - | # Example (as JSON) ```json { "kind": "kind0", "message": "message8" } ``` ##### Subscription Component Allocation Error 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-allocation-error-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-allocation-error-item) | Optional | - | # Example (as JSON) ```json { "errors": [ { "kind": "kind8", "message": "message0" }, { "kind": "kind8", "message": "message0" }, { "kind": "kind8", "message": "message0" } ] } ``` ##### Subscription Component Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component` | [`Subscription Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component) | Optional | - | # Example (as JSON) ```json { "component": { "id": 80, "name": "name8", "kind": "quantity_based_component", "unit_name": "unit_name0", "enabled": false } } ``` ##### Subscription Component Subscription Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-subscription (Optional) Object that will be returned if the `include=subscription` query param is provided. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `state` | [`Subscription State`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state) | Optional | The state of a subscription.

* **Live States**
* `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
* `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
* `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
* **Problem States**
* `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
* `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
* `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`.
* **End of Life States**
* `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription.
While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
* `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
* `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
* `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
* `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
* `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details.

See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. | | `updated_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "state": "paused", "updated_at": "2016-03-13T12:52:32.123Z" } ``` ##### Subscription Custom Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-custom-price (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription. A subscription can have up to 30 custom price points. Exceeding this limit will result in an API error. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Optional | (Optional) | | `handle` | `String` | Optional | (Optional) | | `price_in_cents` | [`String \| Long`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-price-in-cents) | Required | Required if using `custom_price` attribute. | | `interval` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-interval) | Required | Required if using `custom_price` attribute. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Required | Required if using `custom_price` attribute. | | `trial_price_in_cents` | [`String \| Long`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-trial-price-in-cents) | Optional | (Optional) | | `trial_interval` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-trial-interval) | Optional | (Optional) | | `trial_interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | (Optional) | | `trial_type` | [`Trial Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/trial-type) | Optional | Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | | `initial_charge_in_cents` | [`String \| Long`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-initial-charge-in-cents) | Optional | (Optional) | | `initial_charge_after_trial` | `Boolean` | Optional | (Optional) | | `expiration_interval` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-expiration-interval) | Optional | (Optional) | | `expiration_interval_unit` | [`Expiration Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) | Optional | (Optional) | | `tax_included` | `Boolean` | Optional | (Optional) | # Example (as JSON) ```json { "name": "name4", "handle": "handle0", "price_in_cents": "String3", "interval": "String3", "interval_unit": "day", "trial_price_in_cents": "String3", "trial_interval": "String5", "trial_interval_unit": "day" } ``` ##### Subscription Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-filter Nested filter used for List Subscription Components For Site Filter # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `states` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state-filter) | Optional | Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`.

**Constraints**: *Minimum Items*: `1` | | `date_field` | [`Subscription List Date Field`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-list-date-field) | Optional | The type of filter you'd like to apply to your search. To use this filter you also have to include the following param in the request `include=subscription`. | | `start_date` | `Date` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | | `end_date` | `Date` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | | `start_datetime` | `DateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. To use this filter you also have to include the following param in the request `include=subscription`. | | `end_datetime` | `DateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. To use this filter you also have to include the following param in the request `include=subscription`. | # Example (as JSON) ```json { "states": [ "active", "canceled" ], "start_date": "2024-01-17", "end_date": "2024-01-31", "start_datetime": "2024-01-17T10:15:30+01:00", "end_datetime": "2024-01-17T17:20:06Z", "date_field": "updated_at" } ``` ##### Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `customer_id` | `Number` | Optional | - | | `payment_profile` | [`Subscription Group Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-payment-profile) | Optional | - | | `payment_collection_method` | [`Collection Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | | `subscription_ids` | `array` | Optional | - | | `created_at` | `DateTime` | Optional | - | # Example (as JSON) ```json { "uid": "uid4", "customer_id": 36, "payment_profile": { "id": 44, "first_name": "first_name4", "last_name": "last_name2", "masked_card_number": "masked_card_number2" }, "payment_collection_method": "prepaid", "subscription_ids": [ 146, 147, 148 ] } ``` ##### Subscription Group Balances Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-balances # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepayments` | [`Account Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) | Optional | - | | `service_credits` | [`Account Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) | Optional | - | | `open_invoices` | [`Account Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) | Optional | - | | `pending_discounts` | [`Account Balance`](https://developers.maxio.com/http/advanced-billing-api/models/structures/account-balance) | Optional | - | # Example (as JSON) ```json { "prepayments": { "balance_in_cents": 192, "automatic_balance_in_cents": 178, "remittance_balance_in_cents": 146 }, "service_credits": { "balance_in_cents": 84, "automatic_balance_in_cents": 70, "remittance_balance_in_cents": 38 }, "open_invoices": { "balance_in_cents": 40, "automatic_balance_in_cents": 202, "remittance_balance_in_cents": 170 }, "pending_discounts": { "balance_in_cents": 88, "automatic_balance_in_cents": 154, "remittance_balance_in_cents": 134 } } ``` ##### Subscription Group Bank Account Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-bank-account # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `bank_name` | `String` | Optional | (Required when creating a subscription with ACH or GoCardless) The name of the bank where the customer’s account resides | | `bank_account_number` | `String` | Optional | (Required when creating a subscription with ACH. Required when creating a subscription with GoCardless and bank_iban is blank) The customerʼs bank account number | | `bank_routing_number` | `String` | Optional | (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless.) The routing number of the bank. It becomes bank_code while passing via GoCardless API. | | `bank_iban` | `String` | Optional | (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided. | | `bank_branch_code` | `String` | Optional | (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided. | | `bank_account_type` | [`Bank Account Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-type) | Optional | Defaults to checking | | `bank_account_holder_type` | [`Bank Account Holder Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-holder-type) | Optional | Defaults to personal | | `payment_type` | [`Payment Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type) | Optional | - | | `billing_address` | `String` | Optional | - | | `billing_city` | `String` | Optional | - | | `billing_state` | `String` | Optional | - | | `billing_zip` | `String` | Optional | - | | `billing_country` | `String` | Optional | - | | `chargify_token` | `String` | Optional | - | | `current_vault` | [`Bank Account Vault`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-vault) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | | `gateway_handle` | `String` | Optional | - | # Example (as JSON) ```json { "bank_name": "bank_name2", "bank_account_number": "bank_account_number4", "bank_routing_number": "bank_routing_number8", "bank_iban": "bank_iban6", "bank_branch_code": "bank_branch_code6" } ``` ##### Subscription Group Component Custom Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-component-custom-price Used in place of `price_point_id` to define a custom price point unique to the subscription. You still need to provide `component_id`. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/price) | Optional | - | | `overage_pricing` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-custom-price) | Optional | - | # Example (as JSON) ```json { "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "overage_pricing": [ { "tax_included": false, "pricing_scheme": "stairstep", "interval": 230, "interval_unit": "day", "list_price_point_id": 10, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } ] } ``` ##### Subscription Group Create Error Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-create-error-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Subscription Group Members Array Error \| Subscription Group Single Error \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-create-error-response-1-errors) | Required | - | # Example (as JSON) ```json { "errors": { "members": [ "members6" ] } } ``` ##### Subscription Group Credit Card Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-credit-card # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `chargify_token` | `String` | Optional | - | | `vault_token` | `String` | Optional | - | | `current_vault` | [`Credit Card Vault`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-card-vault) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | | `gateway_handle` | `String` | Optional | - | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `billing_address` | `String` | Optional | - | | `billing_address_2` | `String` | Optional | - | | `billing_city` | `String` | Optional | - | | `billing_state` | `String` | Optional | - | | `billing_zip` | `String` | Optional | - | | `billing_country` | `String` | Optional | - | | `full_number` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-credit-card-full-number) | Optional | - | | `expiration_month` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-credit-card-expiration-month) | Optional | - | | `expiration_year` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-credit-card-expiration-year) | Optional | - | | `last_four` | `String` | Optional | - | | `card_type` | [`Card Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/card-type) | Optional | The type of card used. | | `customer_vault_token` | `String` | Optional | - | | `cvv` | `String` | Optional | - | | `payment_type` | `String` | Optional | - | # Example (as JSON) ```json { "chargify_token": "tok_592nf92ng0sjd4300p", "full_number": 4111111111111111, "vault_token": "vault_token6", "current_vault": "braintree_blue", "gateway_handle": "gateway_handle6", "first_name": "first_name4" } ``` ##### Subscription Group Customer Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-customer # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `organization` | `String` | Optional | - | | `email` | `String` | Optional | - | | `reference` | `String` | Optional | - | # Example (as JSON) ```json { "first_name": "first_name4", "last_name": "last_name2", "organization": "organization2", "email": "email2", "reference": "reference0" } ``` ##### Subscription Group Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `reference` | `String` | Optional | - | | `product_id` | `Number` | Optional | - | | `product_handle` | `String` | Optional | - | | `product_price_point_id` | `Number` | Optional | - | | `product_price_point_handle` | `String` | Optional | - | | `currency` | `String` | Optional | - | | `coupon_code` | `String` | Optional | - | | `total_revenue_in_cents` | `Long` | Optional | - | | `balance_in_cents` | `Long` | Optional | - | # Example (as JSON) ```json { "id": 16, "reference": "reference8", "product_id": 214, "product_handle": "product_handle4", "product_price_point_id": 138 } ``` ##### Subscription Group Members Array Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-members-array-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `members` | `array` | Required | - | # Example (as JSON) ```json { "members": [ "members6" ] } ``` ##### Subscription Group Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `masked_card_number` | `String` | Optional | - | # Example (as JSON) ```json { "id": 22, "first_name": "first_name4", "last_name": "last_name2", "masked_card_number": "masked_card_number2" } ``` ##### Subscription Group Prepayment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-prepayment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `amount` | `Number` | Required | - | | `details` | `String` | Required | - | | `memo` | `String` | Required | - | | `method` | [`Subscription Group Prepayment Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-group-prepayment-method) | Required | - | # Example (as JSON) ```json { "amount": 96, "details": "details2", "memo": "memo6", "method": "money_order" } ``` ##### Subscription Group Prepayment Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-prepayment-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepayment` | [`Subscription Group Prepayment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-prepayment) | Required | - | # Example (as JSON) ```json { "prepayment": { "amount": 136, "details": "details8", "memo": "memo2", "method": "paypal_account" } } ``` ##### Subscription Group Prepayment Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-prepayment-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `amount_in_cents` | `Long` | Optional | The amount in cents of the entry. | | `ending_balance_in_cents` | `Long` | Optional | The ending balance in cents of the account. | | `entry_type` | [`Service Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/service-credit-type) | Optional | The type of entry | | `memo` | `String` | Optional | A memo attached to the entry. | # Example (as JSON) ```json { "id": 110, "amount_in_cents": 196, "ending_balance_in_cents": 236, "entry_type": "Credit", "memo": "memo2" } ``` ##### Subscription Group Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_group` | [`Subscription Group`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group) | Required | - | # Example (as JSON) ```json { "subscription_group": { "uid": "uid8", "customer_id": 220, "payment_profile": { "id": 44, "first_name": "first_name4", "last_name": "last_name2", "masked_card_number": "masked_card_number2" }, "payment_collection_method": "prepaid", "subscription_ids": [ 74, 75 ] } } ``` ##### Subscription Group Signup Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile_id` | `Number` | Optional | - | | `payer_id` | `Number` | Optional | - | | `payer_reference` | `String` | Optional | - | | `payment_collection_method` | [`Collection Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | | `payer_attributes` | [`Payer Attributes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payer-attributes) | Optional | - | | `credit_card_attributes` | [`Subscription Group Credit Card`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-credit-card) | Optional | - | | `bank_account_attributes` | [`Subscription Group Bank Account`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-bank-account) | Optional | - | | `subscriptions` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-item) | Required | - | # Example (as JSON) ```json { "subscriptions": [ { "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" }, "product_handle": "product_handle8", "product_id": 144, "product_price_point_id": 68, "product_price_point_handle": "product_price_point_handle4", "offer_id": 40 } ], "payment_profile_id": 42, "payer_id": 64, "payer_reference": "payer_reference8", "payment_collection_method": "automatic", "payer_attributes": { "first_name": "first_name2", "last_name": "last_name0", "email": "email4", "cc_emails": "cc_emails2", "organization": "organization6" } } ``` ##### Subscription Group Signup Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-component-id) | Optional | Required if passing any component to `components` attribute. | | `allocated_quantity` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-allocated-quantity) | Optional | - | | `unit_balance` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-unit-balance) | Optional | - | | `price_point_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-price-point-id) | Optional | - | | `custom_price` | [`Subscription Group Component Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-component-custom-price) | Optional | Used in place of `price_point_id` to define a custom price point unique to the subscription. You still need to provide `component_id`. | # Example (as JSON) ```json { "component_id": "String1", "allocated_quantity": "String5", "unit_balance": "String9", "price_point_id": "String5", "custom_price": { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ], "overage_pricing": [ { "tax_included": false, "pricing_scheme": "stairstep", "interval": 230, "interval_unit": "day", "list_price_point_id": 10, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] }, { "tax_included": false, "pricing_scheme": "stairstep", "interval": 230, "interval_unit": "day", "list_price_point_id": 10, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] }, { "tax_included": false, "pricing_scheme": "stairstep", "interval": 230, "interval_unit": "day", "list_price_point_id": 10, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } ] } } ``` ##### Subscription Group Signup Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptions` | [`map`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-subscription-error) | Optional | Object that as key have subscription position in request subscriptions array and as value subscription errors object. | | `payer_reference` | `String` | Optional | - | | `payer` | [`Payer Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payer-error) | Optional | - | | `subscription_group` | `array` | Optional | - | | `payment_profile_id` | `String` | Optional | - | | `payer_id` | `String` | Optional | - | # Example (as JSON) ```json { "subscriptions": { "key0": { "product": [ "product9" ], "product_price_point_id": [ "product_price_point_id7" ], "payment_profile": [ "payment_profile2" ], "payment_profile.chargify_token": [ "payment_profile.chargify_token6" ], "base": [ "base5", "base6" ] }, "key1": { "product": [ "product9" ], "product_price_point_id": [ "product_price_point_id7" ], "payment_profile": [ "payment_profile2" ], "payment_profile.chargify_token": [ "payment_profile.chargify_token6" ], "base": [ "base5", "base6" ] } }, "payer_reference": "payer_reference0", "payer": { "last_name": [ "last_name5", "last_name6" ], "first_name": [ "first_name8" ], "email": [ "email0", "email9" ] }, "subscription_group": [ "subscription_group1", "subscription_group2" ], "payment_profile_id": "payment_profile_id2" } ``` ##### Subscription Group Signup Error Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-error-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Subscription Group Signup Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-error) | Required | - | # Example (as JSON) ```json { "errors": { "subscriptions": { "0": { "payment_profile.chargify_token": [ "Chargify token not found" ], "product": [ "Product must be among the Products for this Site" ], "product_price_point_id": [ "Product price point must belong to product." ], "base": [ "No payment method was on file for the $30.00 balance'" ], "payment_profile.expiration_month": [ "Credit card expiration month: cannot be blank." ], "payment_profile.expiration_year": [ "Credit card expiration year: cannot be blank." ], "payment_profile.full_number": [ "Credit card number: cannot be blank." ] } } } } ``` ##### Subscription Group Signup Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-event-data # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_group` | [`Subscription Group Signup Failure Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-failure-data) | Required | - | | `customer` | [`Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer) | Required | - | # Example (as JSON) ```json { "subscription_group": { "payer_id": 150, "payer_reference": "payer_reference6", "payment_profile_id": 128, "payment_collection_method": "payment_collection_method8", "payer_attributes": { "first_name": "first_name2", "last_name": "last_name0", "email": "email4", "cc_emails": "cc_emails2", "organization": "organization6" } }, "customer": { "first_name": "first_name0", "last_name": "last_name8", "email": "email6", "cc_emails": "cc_emails0", "organization": "organization6" } } ``` ##### Subscription Group Signup Failure Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-failure-data # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payer_id` | `Number` | Optional | - | | `payer_reference` | `String` | Optional | - | | `payment_profile_id` | `Number` | Optional | - | | `payment_collection_method` | `String` | Optional | - | | `payer_attributes` | [`Payer Attributes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payer-attributes) | Optional | - | | `credit_card_attributes` | [`Subscription Group Credit Card`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-credit-card) | Optional | - | | `bank_account_attributes` | [`Subscription Group Bank Account`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-bank-account) | Optional | - | | `subscriptions` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-item) | Optional | - | # Example (as JSON) ```json { "payer_id": 16, "payer_reference": "payer_reference8", "payment_profile_id": 6, "payment_collection_method": "payment_collection_method0", "payer_attributes": { "first_name": "first_name2", "last_name": "last_name0", "email": "email4", "cc_emails": "cc_emails2", "organization": "organization6" } } ``` ##### Subscription Group Signup Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-item # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product_handle` | `String` | Optional | The API Handle of the product for which you are creating a subscription. Required, unless a `product_id` is given instead. | | `product_id` | `Number` | Optional | The Product ID of the product for which you are creating a subscription. You can pass either `product_id` or `product_handle`. | | `product_price_point_id` | `Number` | Optional | The ID of the particular price point on the product. | | `product_price_point_handle` | `String` | Optional | The user-friendly API handle of a product's particular price point. | | `offer_id` | `Number` | Optional | Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify ID of the offer or its handle prefixed with `handle:`. | | `reference` | `String` | Optional | The reference value (provided by your app) for the subscription itself. | | `primary` | `Boolean` | Optional | One of the subscriptions must be marked as primary in the group. | | `currency` | `String` | Optional | (Optional) If Multi-Currency is enabled and the currency is configured in Chargify, pass it at signup to create a subscription on a non-default currency. Note that you cannot update the currency of an existing subscription. | | `coupon_codes` | `array` | Optional | An array for all the coupons attached to the subscription. | | `components` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-component) | Optional | - | | `custom_price` | [`Subscription Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-custom-price) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription. A subscription can have up to 30 custom price points. Exceeding this limit will result in an API error. | | `calendar_billing` | [`Calendar Billing`](https://developers.maxio.com/http/advanced-billing-api/models/structures/calendar-billing) | Optional | (Optional). Cannot be used when also specifying next_billing_at. | | `metafields` | `map` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | # Example (as JSON) ```json { "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" }, "product_handle": "product_handle2", "product_id": 34, "product_price_point_id": 214, "product_price_point_handle": "product_price_point_handle4", "offer_id": 150 } ``` ##### Subscription Group Signup Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_group` | [`Subscription Group Signup`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup) | Required | - | # Example (as JSON) ```json { "subscription_group": { "subscriptions": [ { "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" }, "product_handle": "product_handle8", "product_id": 144, "product_price_point_id": 68, "product_price_point_handle": "product_price_point_handle4", "offer_id": 40 } ], "payment_profile_id": 128, "payer_id": 150, "payer_reference": "payer_reference6", "payment_collection_method": "prepaid", "payer_attributes": { "first_name": "first_name2", "last_name": "last_name0", "email": "email4", "cc_emails": "cc_emails2", "organization": "organization6" } } } ``` ##### Subscription Group Signup Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Optional | - | | `scheme` | `Number` | Optional | - | | `customer_id` | `Number` | Optional | - | | `payment_profile_id` | `Number` | Optional | - | | `subscription_ids` | `array` | Optional | - | | `primary_subscription_id` | `Number` | Optional | - | | `next_assessment_at` | `DateTime` | Optional | - | | `state` | [`Subscription State`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state) | Optional | The state of a subscription.

* **Live States**
* `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
* `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
* `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
* **Problem States**
* `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
* `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
* `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`.
* **End of Life States**
* `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription.
While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
* `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
* `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
* `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
* `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
* `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details.

See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. | | `cancel_at_end_of_period` | `Boolean` | Optional | - | | `subscriptions` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-item) | Optional | - | | `payment_collection_method` | [`Collection Method`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | # Example (as JSON) ```json { "uid": "uid8", "scheme": 28, "customer_id": 48, "payment_profile_id": 44, "subscription_ids": [ 158, 159, 160 ] } ``` ##### Subscription Group Single Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-single-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_group` | `String` | Required | - | # Example (as JSON) ```json { "subscription_group": "subscription_group2" } ``` ##### Subscription Group Subscription Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-subscription-error Object which contains subscription errors. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product` | `array` | Optional | - | | `product_price_point_id` | `array` | Optional | - | | `payment_profile` | `array` | Optional | - | | `payment_profile.chargify_token` | `array` | Optional | - | | `base` | `array` | Optional | - | | `payment_profile.expiration_month` | `array` | Optional | - | | `payment_profile.expiration_year` | `array` | Optional | - | | `payment_profile.full_number` | `array` | Optional | - | # Example (as JSON) ```json { "product": [ "product7", "product6" ], "product_price_point_id": [ "product_price_point_id9", "product_price_point_id0" ], "payment_profile": [ "payment_profile4", "payment_profile5" ], "payment_profile.chargify_token": [ "payment_profile.chargify_token8", "payment_profile.chargify_token9" ], "base": [ "base7", "base8", "base9" ] } ``` ##### Subscription Group Update Error Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-update-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `members` | `array` | Optional | - | # Example (as JSON) ```json { "members": [ "members4", "members5", "members6" ] } ``` ##### Subscription Group Update Error Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-update-error-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Subscription Group Update Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-update-error) | Optional | - | # Example (as JSON) ```json { "errors": { "members": [ "members2", "members1" ] } } ``` ##### Subscription Included Coupon Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-included-coupon # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `code` | `String` | Optional | - | | `use_count` | `Number` | Optional | - | | `uses_allowed` | `Number` | Optional | - | | `expires_at` | `String` | Optional | - | | `recurring` | `Boolean` | Optional | - | | `amount_in_cents` | `Long` | Optional | **Constraints**: `>= 0` | | `percentage` | `String` | Optional | - | # Example (as JSON) ```json { "code": "\"ABCD_10\"", "use_count": 2, "uses_allowed": 10, "expires_at": "\"2023-07-13T05:18:58-04:00\"", "amount_in_cents": 1000, "percentage": "\"15.0\"", "recurring": false } ``` ##### Subscription Migration Preview Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prorated_adjustment_in_cents` | `Long` | Optional | The amount of the prorated adjustment that would be issued for the current subscription. | | `charge_in_cents` | `Long` | Optional | The amount of the charge that would be created for the new product. | | `payment_due_in_cents` | `Long` | Optional | The amount of the payment due in the case of an upgrade. | | `credit_applied_in_cents` | `Long` | Optional | Represents a credit in cents that is applied to your subscription as part of a migration process for a specific product, which reduces the amount owed for the subscription. | # Example (as JSON) ```json { "prorated_adjustment_in_cents": 134, "charge_in_cents": 16, "payment_due_in_cents": 188, "credit_applied_in_cents": 148 } ``` ##### Subscription Migration Preview Options Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview-options # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Optional | The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `product_price_point_id` | `Number` | Optional | The ID of the specified product's price point. This can be passed to migrate to a non-default price point. | | `include_trial` | `Boolean` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.

**Default**: `false` | | `include_initial_charge` | `Boolean` | Optional | If `true` is sent initial charges will be assessed.

**Default**: `false` | | `include_coupons` | `Boolean` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.

**Default**: `true` | | `preserve_period` | `Boolean` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.

**Default**: `false` | | `product_handle` | `String` | Optional | The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `product_price_point_handle` | `String` | Optional | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | | `proration` | [`Proration`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proration) | Optional | - | | `proration_date` | `DateTime` | Optional | The date that the proration is calculated from for the preview | # Example (as JSON) ```json { "include_trial": false, "include_initial_charge": false, "include_coupons": true, "preserve_period": false, "product_id": 242, "product_price_point_id": 166 } ``` ##### Subscription Migration Preview Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `migration` | [`Subscription Migration Preview Options`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview-options) | Required | - | # Example (as JSON) ```json { "migration": { "include_trial": false, "include_initial_charge": false, "include_coupons": true, "preserve_period": false, "product_id": 158, "product_price_point_id": 82 } } ``` ##### Subscription Migration Preview Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `migration` | [`Subscription Migration Preview`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-migration-preview) | Required | - | # Example (as JSON) ```json { "migration": { "prorated_adjustment_in_cents": 196, "charge_in_cents": 78, "payment_due_in_cents": 250, "credit_applied_in_cents": 210 } } ``` ##### Subscription MRR Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-mrr # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_id` | `Number` | Required | - | | `mrr_amount_in_cents` | `Long` | Required | - | | `breakouts` | [`Subscription MRR Breakout`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-mrr-breakout) | Optional | - | # Example (as JSON) ```json { "subscription_id": 4, "mrr_amount_in_cents": 22, "breakouts": { "plan_amount_in_cents": 254, "usage_amount_in_cents": 106 } } ``` ##### Subscription MRR Breakout Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-mrr-breakout # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `plan_amount_in_cents` | `Long` | Required | - | | `usage_amount_in_cents` | `Long` | Required | - | # Example (as JSON) ```json { "plan_amount_in_cents": 208, "usage_amount_in_cents": 60 } ``` ##### Subscription MRR Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-mrr-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptions_mrr` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-mrr) | Required | **Constraints**: *Minimum Items*: `1`, *Unique Items Required* | # Example (as JSON) ```json { "subscriptions_mrr": [ { "subscription_id": 0, "mrr_amount_in_cents": 0, "breakouts": { "plan_amount_in_cents": 0, "usage_amount_in_cents": 0 } } ] } ``` ##### Subscription Note Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-note # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `body` | `String` | Optional | - | | `subscription_id` | `Number` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `updated_at` | `DateTime` | Optional | - | | `sticky` | `Boolean` | Optional | - | # Example (as JSON) ```json { "id": 36, "body": "body4", "subscription_id": 146, "created_at": "2016-03-13T12:52:32.123Z", "updated_at": "2016-03-13T12:52:32.123Z" } ``` ##### Subscription Note Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-note-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `note` | [`Subscription Note`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-note) | Required | - | # Example (as JSON) ```json { "note": { "id": 28, "body": "body0", "subscription_id": 138, "created_at": "2016-03-13T12:52:32.123Z", "updated_at": "2016-03-13T12:52:32.123Z" } } ``` ##### Subscription Preview Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-preview # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `current_billing_manifest` | [`Billing Manifest`](https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-manifest) | Optional | - | | `next_billing_manifest` | [`Billing Manifest`](https://developers.maxio.com/http/advanced-billing-api/models/structures/billing-manifest) | Optional | - | # Example (as JSON) ```json { "current_billing_manifest": { "line_items": [ { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 } ], "total_in_cents": 38, "total_discount_in_cents": 24, "total_tax_in_cents": 18, "subtotal_in_cents": 150 }, "next_billing_manifest": { "line_items": [ { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 }, { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 }, { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 } ], "total_in_cents": 62, "total_discount_in_cents": 208, "total_tax_in_cents": 42, "subtotal_in_cents": 174 } } ``` ##### Subscription Preview Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-preview-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_preview` | [`Subscription Preview`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-preview) | Required | - | # Example (as JSON) ```json { "subscription_preview": { "current_billing_manifest": { "line_items": [ { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 } ], "total_in_cents": 38, "total_discount_in_cents": 24, "total_tax_in_cents": 18, "subtotal_in_cents": 150 }, "next_billing_manifest": { "line_items": [ { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 }, { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 }, { "transaction_type": "credit", "kind": "component", "amount_in_cents": 24, "memo": "memo2", "discount_amount_in_cents": 172 } ], "total_in_cents": 62, "total_discount_in_cents": 208, "total_tax_in_cents": 42, "subtotal_in_cents": 174 } } } ``` ##### Subscription Product Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-product-change Event data for both `subscription_product_change` and `subscription_product_change_scheduled`. The price point and `effective_at` fields are only populated for scheduled changes. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `previous_product_id` | `Number` | Required | - | | `new_product_id` | `Number` | Required | - | | `previous_product_price_point_id` | `Number` | Optional | - | | `new_product_price_point_id` | `Number` | Optional | - | | `effective_at` | `DateTime` | Optional | When the scheduled product change takes effect (the subscription's next renewal). Only sent for `subscription_product_change_scheduled`. | # Example (as JSON) ```json { "previous_product_id": 126, "new_product_id": 12, "previous_product_price_point_id": 250, "new_product_price_point_id": 244, "effective_at": "2016-03-13T12:52:32.123Z" } ``` ##### Subscription Product Migration Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-product-migration # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `product_id` | `Number` | Optional | The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `product_price_point_id` | `Number` | Optional | The ID of the specified product's price point. This can be passed to migrate to a non-default price point. | | `include_trial` | `Boolean` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.

**Default**: `false` | | `include_initial_charge` | `Boolean` | Optional | If `true` is sent initial charges will be assessed.

**Default**: `false` | | `include_coupons` | `Boolean` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.

**Default**: `true` | | `preserve_period` | `Boolean` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.

**Default**: `false` | | `product_handle` | `String` | Optional | The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | | `product_price_point_handle` | `String` | Optional | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | | `proration` | [`Proration`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proration) | Optional | - | # Example (as JSON) ```json { "include_trial": false, "include_initial_charge": false, "include_coupons": true, "preserve_period": false, "product_id": 8, "product_price_point_id": 172 } ``` ##### Subscription Product Migration Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-product-migration-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `migration` | [`Subscription Product Migration`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-product-migration) | Required | - | # Example (as JSON) ```json { "migration": { "include_trial": false, "include_initial_charge": false, "include_coupons": true, "preserve_period": false, "product_id": 158, "product_price_point_id": 82 } } ``` ##### Subscription Remove Coupon Errors 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-remove-coupon-errors-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription` | `array` | Required | - | # Example (as JSON) ```json { "subscription": [ "subscription2", "subscription3" ] } ``` ##### Subscription Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription` | [`Subscription`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription) | Optional | - | # Example (as JSON) ```json { "subscription": { "id": 8, "state": "paused", "balance_in_cents": 124, "total_revenue_in_cents": 48, "product_price_in_cents": 238 } } ``` ##### Subscription State Change Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-state-change # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `previous_subscription_state` | `String` | Required | **Constraints**: *Minimum Length*: `1` | | `new_subscription_state` | `String` | Required | **Constraints**: *Minimum Length*: `1` | # Example (as JSON) ```json { "previous_subscription_state": "previous_subscription_state2", "new_subscription_state": "new_subscription_state6" } ``` ##### Subscriptions Mrr Error Response 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/subscriptions-mrr-error-response-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Attribute Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/attribute-error) | Required | - | # Example (as JSON) ```json { "errors": { "attribute": [ "supplied value is invalid, expected ISO 8601 format" ] } } ``` ##### Tax Configuration Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/tax-configuration # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `kind` | [`Tax Configuration Kind`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/tax-configuration-kind) | Optional | **Default**: `custom` | | `destination_address` | [`Tax Destination Address`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/tax-destination-address) | Optional | - | | `fully_configured` | `Boolean` | Optional | Returns `true` when Chargify has been properly configured to charge tax using the specified tax system. More details about taxes: https://maxio.zendesk.com/hc/en-us/articles/24287012608909-Taxes-Overview

**Default**: `false` | # Example (as JSON) ```json { "kind": "custom", "fully_configured": false, "destination_address": "shipping_only" } ``` ##### Tokenized Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/tokenized-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Required | - | | `vault_token` | `String` | Optional | - | | `gateway_handle` | `String` | Optional | - | | `customer_vault_token` | `String` | Optional | - | # Example (as JSON) ```json { "id": 72, "vault_token": "vault_token2", "gateway_handle": "gateway_handle8", "customer_vault_token": "customer_vault_token8" } ``` ##### Too Many Management Link Requests Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/too-many-management-link-requests # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `error` | `String` | Required | - | | `new_link_available_at` | `DateTime` | Required | - | # Example (as JSON) ```json { "error": "error2", "new_link_available_at": "2016-03-13T12:52:32.123Z" } ``` ##### Too Many Management Link Requests Error 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/too-many-management-link-requests-error-1 # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Too Many Management Link Requests`](https://developers.maxio.com/http/advanced-billing-api/models/structures/too-many-management-link-requests) | Required | - | # Example (as JSON) ```json { "errors": { "error": "error4", "new_link_available_at": "2016-03-13T12:52:32.123Z" } } ``` ##### Update Allocation Expiration Date Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-allocation-expiration-date # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `allocation` | [`Allocation Expiration Date`](https://developers.maxio.com/http/advanced-billing-api/models/structures/allocation-expiration-date) | Optional | - | # Example (as JSON) ```json { "allocation": { "expires_at": "2016-03-13T12:52:32.123Z" } } ``` ##### Update Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `handle` | `String` | Optional | - | | `name` | `String` | Optional | The name of the Component, suitable for display on statements. e.g., Text Messages. | | `description` | `String` | Optional | The description of the component. | | `accounting_code` | `String` | Optional | - | | `taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | | `tax_code` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `item_category` | [`Item Category`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/item-category) | Optional | One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other | | `display_on_hosted_page` | `Boolean` | Optional | - | | `upgrade_charge` | [`Credit Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `unspsc_code` | `String` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | # Example (as JSON) ```json { "item_category": "Business Software", "handle": "handle6", "name": "name0", "description": "description0", "accounting_code": "accounting_code6", "taxable": false } ``` ##### Update Component Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-price-point # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `name` | `String` | Optional | - | | `handle` | `String` | Optional | - | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `use_site_exchange_rate` | `Boolean` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. | | `tax_included` | `Boolean` | Optional | Whether or not the price point includes tax | | `interval` | `Number` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `interval_unit` | [`Interval Unit`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-price) | Optional | - | # Example (as JSON) ```json { "name": "name2", "handle": "handle8", "pricing_scheme": "per_unit", "use_site_exchange_rate": false, "tax_included": false } ``` ##### Update Component Price Point Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-price-point-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point` | [`Update Component Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-price-point) | Optional | - | # Example (as JSON) ```json { "price_point": { "name": "name0", "handle": "handle6", "pricing_scheme": "per_unit", "use_site_exchange_rate": false, "tax_included": false } } ``` ##### Update Component Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component` | [`Update Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-component) | Required | - | # Example (as JSON) ```json { "component": { "item_category": "Business Software", "handle": "handle4", "name": "name8", "description": "description2", "accounting_code": "accounting_code4", "taxable": false } } ``` ##### Update Coupon Currency Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-coupon-currency # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency` | `String` | Required | ISO code for the site defined currency. | | `price` | `Number` | Required | Price for the given currency. | # Example (as JSON) ```json { "currency": "currency4", "price": 146 } ``` ##### Update Currency Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-currency-price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Required | ID of the currency price record being updated | | `price` | `Decimal` | Required | New price for the given currency | # Example (as JSON) ```json { "id": 146, "price": 71.86 } ``` ##### Update Currency Prices Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-currency-prices-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `currency_prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-currency-price) | Required | - | # Example (as JSON) ```json { "currency_prices": [ { "id": 50, "price": 233.74 } ] } ``` ##### Update Customer Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-customer # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Optional | - | | `last_name` | `String` | Optional | - | | `email` | `String` | Optional | - | | `cc_emails` | `String` | Optional | - | | `organization` | `String` | Optional | - | | `reference` | `String` | Optional | - | | `address` | `String` | Optional | - | | `address_2` | `String` | Optional | - | | `city` | `String` | Optional | - | | `state` | `String` | Optional | - | | `zip` | `String` | Optional | - | | `country` | `String` | Optional | - | | `phone` | `String` | Optional | - | | `locale` | `String` | Optional | Set a specific language on a customer record. | | `vat_number` | `String` | Optional | - | | `tax_exempt` | `Boolean` | Optional | - | | `surcharging` | `Boolean` | Optional | Whether surcharging is enabled for the customer. Only applied on sites where surcharging control is enabled. | | `tax_exempt_reason` | `String` | Optional | - | | `parent_id` | `Number` | Optional | - | | `verified` | `Boolean` | Optional | Is the customer verified to use ACH as a payment method. Available only on the Authorize.Net gateway. | | `salesforce_id` | `String` | Optional | The Salesforce ID of the customer | | `branding_theme_id` | `Number` | Optional | The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. | # Example (as JSON) ```json { "first_name": "first_name2", "last_name": "last_name0", "email": "email4", "cc_emails": "cc_emails8", "organization": "organization6" } ``` ##### Update Customer Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-customer-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `customer` | [`Update Customer`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-customer) | Required | - | # Example (as JSON) ```json { "customer": { "first_name": "first_name0", "last_name": "last_name8", "email": "email6", "cc_emails": "cc_emails0", "organization": "organization6" } } ``` ##### Update Feature Catalog Item Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-feature-catalog-item-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `feature` | [`Feature 3`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-3) | Required | - | # Example (as JSON) ```json { "feature": { "propagate_to_subscriptions": false, "value": "value6", "periodicity_interval": 68, "periodicity_unit": "week" } } ``` ##### Update Feature Template Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-feature-template-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `feature` | [`Feature 1`](https://developers.maxio.com/http/advanced-billing-api/models/structures/feature-1) | Required | `key` cannot be changed once set. `kind` cannot be changed once any feature catalog item has been created from this template. | # Example (as JSON) ```json { "feature": { "name": "name4", "description": "description4", "unit": "unit2", "value_type": "boolean", "default_value": "default_value4" } } ``` ##### Update Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-invoice Attributes of a draft ad hoc invoice which can be updated. Only the submitted attributes are changed. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `line_items` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-invoice-item) | Optional | Line item changes to apply. Line items without a `uid` are added, line items with a `uid` are updated, and line items with a `uid` and `_destroy` set to `true` are removed. Existing line items not referenced in the array remain unchanged. | | `issue_date` | `Date` | Optional | New issue date for the invoice (format YYYY-MM-DD). This date is interpreted and validated in your site's time zone. It must be today or a date in the past — future dates are not accepted. The due date is recalculated from the issue date and net terms. | | `net_terms` | `Number` | Optional | Number of days after the issue date on which the invoice is due. The due date is recalculated when net terms or the issue date change. | | `payment_instructions` | `String` | Optional | Custom payment instructions displayed on the invoice. | | `memo` | `String` | Optional | A custom memo displayed on the invoice. | | `seller_address` | [`Create Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-address) | Optional | Replaces the seller address on the invoice | | `billing_address` | [`Create Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-address) | Optional | Replaces the billing address on the invoice | | `shipping_address` | [`Create Invoice Address`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-address) | Optional | Replaces the shipping address on the invoice | | `coupons` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-invoice-coupon) | Optional | When present, replaces all discounts currently applied to the invoice. Send an empty array to remove all discounts. | # Example (as JSON) ```json { "issue_date": "2024-01-01", "line_items": [ { "title": "title4", "quantity": 56.68, "unit_price": 39.9, "taxable": false, "tax_code": "tax_code6" } ], "net_terms": 6, "payment_instructions": "payment_instructions0", "memo": "memo6" } ``` ##### Update Invoice Item Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-invoice-item A line item change for a draft ad hoc invoice. Supports the same attributes as line items on invoice creation, plus `uid` and `_destroy` for updating or removing existing line items. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `title` | `String` | Optional | - | | `quantity` | [`Decimal \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-quantity) | Optional | The quantity can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. | | `unit_price` | [`Decimal \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-unit-price) | Optional | The unit_price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. | | `taxable` | `Boolean` | Optional | Set to true to automatically calculate taxes. Site must be configured to use and calculate taxes. If using AvaTax, a tax_code parameter must also be sent. | | `tax_code` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | | `period_range_start` | `String` | Optional | YYYY-MM-DD | | `period_range_end` | `String` | Optional | YYYY-MM-DD | | `product_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-product-id) | Optional | Product handle or product id. | | `component_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-component-id) | Optional | Component handle or component id. | | `price_point_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-price-point-id) | Optional | Price point handle or id. For component. | | `product_price_point_id` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-product-price-point-id) | Optional | - | | `description` | `String` | Optional | **Constraints**: *Maximum Length*: `255` | | `uid` | `String` | Optional | Unique identifier of an existing line item on the invoice. When provided, the matching line item is updated with the submitted attributes. When omitted, a new line item is added to the invoice. | | `_destroy` | `Boolean` | Optional | Set to `true` together with `uid` to remove the matching line item from the invoice. Line items not referenced in the request remain unchanged. | # Example (as JSON) ```json { "title": "title6", "quantity": 80.0, "unit_price": 63.22, "taxable": false, "tax_code": "tax_code8" } ``` ##### Update Invoice Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-invoice-request Request payload for updating a draft ad hoc invoice. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `invoice` | [`Update Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-invoice) | Required | Attributes of a draft ad hoc invoice which can be updated. Only the submitted attributes are changed. | # Example (as JSON) ```json { "invoice": { "issue_date": "2024-01-01", "line_items": [ { "title": "title4", "quantity": 56.68, "unit_price": 39.9, "taxable": false, "tax_code": "tax_code6" }, { "title": "title4", "quantity": 56.68, "unit_price": 39.9, "taxable": false, "tax_code": "tax_code6" }, { "title": "title4", "quantity": 56.68, "unit_price": 39.9, "taxable": false, "tax_code": "tax_code6" } ], "net_terms": 144, "payment_instructions": "payment_instructions6", "memo": "memo0" } } ``` ##### Update Metadata Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metadata # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `current_name` | `String` | Optional | - | | `name` | `String` | Optional | - | | `value` | `String` | Optional | - | # Example (as JSON) ```json { "current_name": "current_name4", "name": "name0", "value": "value2" } ``` ##### Update Metadata Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metadata-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `metadata` | [`Update Metadata`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metadata) | Optional | - | # Example (as JSON) ```json { "metadata": { "current_name": "current_name0", "name": "name6", "value": "value8" } } ``` ##### Update Metafield Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metafield # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `current_name` | `String` | Optional | - | | `name` | `String` | Optional | - | | `scope` | [`Metafield Scope`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metafield-scope) | Optional | Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. | | `input_type` | [`Metafield Input`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/metafield-input) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | | `enum` | `array` | Optional | Only applicable when input_type is radio or dropdown. | # Example (as JSON) ```json { "current_name": "current_name0", "name": "name6", "scope": { "csv": "0", "invoices": "0", "statements": "0", "portal": "0", "public_show": "0" }, "input_type": "balance_tracker", "enum": [ "enum2" ] } ``` ##### Update Metafields Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metafields-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `metafields` | [`Update Metafield \| array`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-metafields-request-metafields) | Optional | - | # Example (as JSON) ```json { "metafields": { "current_name": "current_name0", "name": "name6", "scope": { "csv": "0", "invoices": "0", "statements": "0", "portal": "0", "public_show": "0" }, "input_type": "balance_tracker", "enum": [ "enum2" ] } } ``` ##### Update Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-payment-profile # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `first_name` | `String` | Optional | The first name of the card holder. | | `last_name` | `String` | Optional | The last name of the card holder. | | `full_number` | `String` | Optional | The full credit card number | | `card_type` | [`Card Type`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/card-type) | Optional | The type of card used. | | `expiration_month` | `String` | Optional | (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, e.g., 5 | | `expiration_year` | `String` | Optional | (Optional when performing an Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, e.g., 2012 | | `current_vault` | [`All Vaults`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/all-vaults) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | | `billing_address` | `String` | Optional | The credit card or bank account billing street address (e.g., 123 Main St.). This value is merely passed through to the payment gateway. | | `billing_city` | `String` | Optional | The credit card or bank account billing address city (e.g., “Boston”). This value is merely passed through to the payment gateway. | | `billing_state` | `String` | Optional | The credit card or bank account billing address state (e.g., MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | | `billing_zip` | `String` | Optional | The credit card or bank account billing address zip code (e.g., 12345). This value is merely passed through to the payment gateway. | | `billing_country` | `String` | Optional | The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | | `billing_address_2` | `String` | Optional | Second line of the customer’s billing address, e.g., Apt. 100 | # Example (as JSON) ```json { "full_number": "5424000000000015", "first_name": "first_name2", "last_name": "last_name0", "card_type": "carnet", "expiration_month": "expiration_month2" } ``` ##### Update Payment Profile Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-payment-profile-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `payment_profile` | [`Update Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-payment-profile) | Required | - | # Example (as JSON) ```json { "payment_profile": { "full_number": "5424000000000015", "first_name": "first_name4", "last_name": "last_name2", "card_type": "bogus", "expiration_month": "expiration_month0" } } ``` ##### Update Price Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-price # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Number` | Optional | - | | `ending_quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-price-ending-quantity) | Optional | - | | `unit_price` | [`Decimal \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-price-unit-price) | Optional | The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 | | `_destroy` | `Boolean` | Optional | - | | `starting_quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-price-starting-quantity) | Optional | - | # Example (as JSON) ```json { "id": 18, "ending_quantity": 216, "unit_price": 166.62, "_destroy": false, "starting_quantity": 242 } ``` ##### Update Product Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-product-price-point # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `handle` | `String` | Optional | - | | `price_in_cents` | `Long` | Optional | - | # Example (as JSON) ```json { "handle": "handle6", "price_in_cents": 220 } ``` ##### Update Product Price Point Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-product-price-point-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `price_point` | [`Update Product Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-product-price-point) | Required | - | # Example (as JSON) ```json { "price_point": { "handle": "handle6", "price_in_cents": 196 } } ``` ##### Update Reason Code Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-reason-code # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `code` | `String` | Optional | The unique identifier for the ReasonCode | | `description` | `String` | Optional | The friendly summary of what the code signifies | | `position` | `Number` | Optional | The order that code appears in lists | # Example (as JSON) ```json { "code": "code0", "description": "description8", "position": 118 } ``` ##### Update Reason Code Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-reason-code-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `reason_code` | [`Update Reason Code`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-reason-code) | Required | - | # Example (as JSON) ```json { "reason_code": { "code": "code4", "description": "description6", "position": 14 } } ``` ##### Update Segment Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-segment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `pricing_scheme` | [`Pricing Scheme`](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `prices` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-or-update-segment-price) | Optional | - | # Example (as JSON) ```json { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" } ] } ``` ##### Update Segment Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-segment-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `segment` | [`Update Segment`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-segment) | Required | - | # Example (as JSON) ```json { "segment": { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" }, { "starting_quantity": 64, "ending_quantity": 38, "unit_price": "String3" } ] } } ``` ##### Update Subscription Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `credit_card_attributes` | [`Credit Card Attributes`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-card-attributes) | Optional | - | | `product_handle` | `String` | Optional | Set to the handle of a different product to change the subscription's product. | | `product_id` | `Number` | Optional | Set to the id of a different product to change the subscription's product. | | `product_change_delayed` | `Boolean` | Optional | - | | `next_product_id` | `String` | Optional | Set to an empty string to cancel a delayed product change. | | `next_product_price_point_id` | `String` | Optional | - | | `snap_day` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-subscription-snap-day) | Optional | A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. | | `initial_billing_at` | `DateTime` | Optional | (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed, etc. When the `initial_billing_at` date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. You can omit the initial_billing_at date to activate the subscription immediately. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time formats. | | `defer_signup` | `Boolean` | Optional | (Optional) Set this attribute to true to move the subscription from Awaiting Signup, to Awaiting Signup Date. Use this when you want to update a subscription that has an unknown initial billing date. When the first billing date is known, update a subscription to set the `initial_billing_at` date. The subscription moves to the awaiting signup with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `false` | | `next_billing_at` | `DateTime` | Optional | - | | `branding_theme_id` | `Number` | Optional | The ID of the Branding Theme to assign to this subscription. When set, this subscription-level Branding Theme is used instead of the customer's default Branding Theme for subscription-related documents and communications that use subscription theming. Pass null or an empty value to clear the subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. Not returned in the response. | | `expires_at` | `DateTime` | Optional | Timestamp giving the expiration date of this subscription (if any). You may manually change the expiration date at any point during a subscription period. | | `payment_collection_method` | `String` | Optional | - | | `receives_invoice_emails` | `Boolean` | Optional | - | | `net_terms` | [`String \| Number`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-subscription-net-terms) | Optional | - | | `stored_credential_transaction_id` | `Number` | Optional | - | | `reference` | `String` | Optional | - | | `custom_price` | [`Subscription Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-custom-price) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription. A subscription can have up to 30 custom price points. Exceeding this limit will result in an API error. | | `components` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-component) | Optional | (Optional) An array of component ids and custom prices to be added to the subscription. | | `dunning_communication_delay_enabled` | `Boolean` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute. | | `dunning_communication_delay_time_zone` | `String` | Optional | Time zone for the Dunning Communication Delay feature. | | `product_price_point_id` | `Number` | Optional | Set to change the current product's price point. | | `product_price_point_handle` | `String` | Optional | Set to change the current product's price point. | # Example (as JSON) ```json { "defer_signup": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "credit_card_attributes": { "full_number": "full_number2", "expiration_month": "expiration_month6", "expiration_year": "expiration_year2" }, "product_handle": "product_handle2", "product_id": 114, "product_change_delayed": false, "next_product_id": "next_product_id8" } ``` ##### Update Subscription Component Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-component # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `component_id` | `Number` | Optional | - | | `custom_price` | [`Component Custom Price`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-custom-price) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | # Example (as JSON) ```json { "component_id": 244, "custom_price": { "tax_included": false, "pricing_scheme": "stairstep", "interval": 66, "interval_unit": "day", "list_price_point_id": 174, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 }, { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } ] } } ``` ##### Update Subscription Group Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-group # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `member_ids` | `array` | Optional | - | # Example (as JSON) ```json { "member_ids": [ 52, 53, 54 ] } ``` ##### Update Subscription Group Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-group-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription_group` | [`Update Subscription Group`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-group) | Required | - | # Example (as JSON) ```json { "subscription_group": { "member_ids": [ 164, 165 ] } } ``` ##### Update Subscription Note Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-note Updatable fields for Subscription Note # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `body` | `String` | Required | - | | `sticky` | `Boolean` | Required | - | # Example (as JSON) ```json { "body": "body8", "sticky": false } ``` ##### Update Subscription Note Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-note-request Updatable fields for Subscription Note # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `note` | [`Update Subscription Note`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-note) | Required | Updatable fields for Subscription Note | # Example (as JSON) ```json { "note": { "body": "body0", "sticky": false } } ``` ##### Update Subscription Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription` | [`Update Subscription`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-subscription) | Required | - | # Example (as JSON) ```json { "subscription": { "defer_signup": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "credit_card_attributes": { "full_number": "full_number2", "expiration_month": "expiration_month6", "expiration_year": "expiration_year2" }, "product_handle": "product_handle6", "product_id": 206, "product_change_delayed": false, "next_product_id": "next_product_id6" } } ``` ##### Upsert Prepaid Configuration Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/upsert-prepaid-configuration # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `initial_funding_amount_in_cents` | `Long` | Optional | - | | `replenish_to_amount_in_cents` | `Long` | Optional | - | | `auto_replenish` | `Boolean` | Optional | - | | `replenish_threshold_amount_in_cents` | `Long` | Optional | - | # Example (as JSON) ```json { "initial_funding_amount_in_cents": 40, "replenish_to_amount_in_cents": 42, "auto_replenish": false, "replenish_threshold_amount_in_cents": 242 } ``` ##### Upsert Prepaid Configuration Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/upsert-prepaid-configuration-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `prepaid_configuration` | [`Upsert Prepaid Configuration`](https://developers.maxio.com/http/advanced-billing-api/models/structures/upsert-prepaid-configuration) | Required | - | # Example (as JSON) ```json { "prepaid_configuration": { "initial_funding_amount_in_cents": 74, "replenish_to_amount_in_cents": 76, "auto_replenish": false, "replenish_threshold_amount_in_cents": 20 } } ``` ##### Usage Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/usage # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `id` | `Long` | Optional | **Constraints**: `>= 0` | | `memo` | `String` | Optional | - | | `created_at` | `DateTime` | Optional | - | | `price_point_id` | `Number` | Optional | - | | `quantity` | [`Number \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/usage-quantity) | Optional | - | | `overage_quantity` | `Number` | Optional | - | | `component_id` | `Number` | Optional | - | | `component_handle` | `String` | Optional | - | | `subscription_id` | `Number` | Optional | - | # Example (as JSON) ```json { "id": 252, "memo": "memo8", "created_at": "2016-03-13T12:52:32.123Z", "price_point_id": 126, "quantity": 130 } ``` ##### Usage Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/usage-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `usage` | [`Usage`](https://developers.maxio.com/http/advanced-billing-api/models/structures/usage) | Required | - | # Example (as JSON) ```json { "usage": { "id": 150, "memo": "memo2", "created_at": "2016-03-13T12:52:32.123Z", "price_point_id": 28, "quantity": 28 } } ``` ##### Void Invoice Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `reason` | `String` | Required | **Constraints**: *Minimum Length*: `1` | # Example (as JSON) ```json { "reason": "reason2" } ``` ##### Void Invoice Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-event-data Example schema for an `void_invoice` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `credit_note_attributes` | [`Credit Note`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note) | Required | - | | `memo` | `String` | Required | The memo provided during invoice voiding. | | `applied_amount` | `String` | Required | The amount of the void. | | `transaction_time` | `DateTime` | Required | The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | | `is_advance_invoice` | `Boolean` | Required | If true, the invoice is an advance invoice. | | `reason` | `String` | Required | The reason for the void. | # Example (as JSON) ```json { "credit_note_attributes": { "uid": "uid2", "site_id": 72, "customer_id": 184, "subscription_id": 0, "number": "number0" }, "memo": "memo6", "applied_amount": "applied_amount6", "transaction_time": "2016-03-13T12:52:32.123Z", "is_advance_invoice": false, "reason": "reason8" } ``` ##### Void Invoice Request Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `void` | [`Void Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice) | Required | - | # Example (as JSON) ```json { "void": { "reason": "reason6" } } ``` ##### Void Remainder Event Data Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/void-remainder-event-data Example schema for an `void_remainder` event # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `credit_note_attributes` | [`Credit Note`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-note) | Required | - | | `memo` | `String` | Required | The memo provided during invoice remainder voiding. | | `applied_amount` | `String` | Required | The amount of the void. | | `transaction_time` | `DateTime` | Required | The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | # Example (as JSON) ```json { "credit_note_attributes": { "uid": "uid2", "site_id": 72, "customer_id": 184, "subscription_id": 0, "number": "number0" }, "memo": "memo6", "applied_amount": "applied_amount4", "transaction_time": "2016-03-13T12:52:32.123Z" } ``` ##### Webhook Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/webhook # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `event` | `String` | Optional | A string describing which event type produced the given webhook | | `id` | `Long` | Optional | The unique identifier for the webhook (unique across all of Chargify). This is not changed on a retry/replay of the same webhook, so it may be used to avoid duplicate action for the same event. | | `created_at` | `DateTime` | Optional | Timestamp indicating when the webhook was created | | `last_error` | `String` | Optional | Text describing the status code and/or error from the last failed attempt to send the Webhook. When a webhook is retried and accepted, this field will be cleared. | | `last_error_at` | `DateTime` | Optional | Timestamp indicating when the last non-acceptance occurred. If a webhook is later resent and accepted, this field will be cleared. | | `accepted_at` | `DateTime` | Optional | Timestamp indicating when the webhook was accepted by the merchant endpoint. When a webhook is explicitly replayed by the merchant, this value will be cleared until it is accepted again. | | `last_sent_at` | `DateTime` | Optional | Timestamp indicating when the most recent attempt was made to send the webhook | | `last_sent_url` | `String` | Optional | The url that the endpoint was last sent to. | | `successful` | `Boolean` | Optional | “A boolean flag describing whether the webhook was accepted by the webhook endpoint for the most recent attempt. (Acceptance is defined by receiving a “200 OK” HTTP response within a reasonable timeframe, e.g., 15 seconds.)” | | `body` | `String` | Optional | The data sent within the webhook post | | `signature` | `String` | Optional | The calculated webhook signature | | `signature_hmac_sha_256` | `String` | Optional | The calculated HMAC-SHA-256 webhook signature | # Example (as JSON) ```json { "event": "event6", "id": 154, "created_at": "2016-03-13T12:52:32.123Z", "last_error": "last_error8", "last_error_at": "2016-03-13T12:52:32.123Z" } ``` ##### Webhook Response Source: https://developers.maxio.com/http/advanced-billing-api/models/structures/webhook-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `webhook` | [`Webhook`](https://developers.maxio.com/http/advanced-billing-api/models/structures/webhook) | Optional | - | # Example (as JSON) ```json { "webhook": { "event": "event2", "id": 18, "created_at": "2016-03-13T12:52:32.123Z", "last_error": "last_error4", "last_error_at": "2016-03-13T12:52:32.123Z" } } ``` #### Enumerations * [All Vaults](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/all-vaults) * [Allocation Preview Direction](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/allocation-preview-direction) * [Allocation Preview Line Item Kind](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/allocation-preview-line-item-kind) * [Apple Pay Vault](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/apple-pay-vault) * [Auto Invite](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/auto-invite) * [Bank Account Holder Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-holder-type) * [Bank Account Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-type) * [Bank Account Vault](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-vault) * [Basic Date Field](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field) * [Billing Manifest Line Item Kind](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/billing-manifest-line-item-kind) * [Cancellation Method](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/cancellation-method) * [Card Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/card-type) * [Chargeback Status](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/chargeback-status) * [Cleanup Scope](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/cleanup-scope) * [Collection Method](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method) * [Collection Method 1](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method-1) * [Component Kind](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/component-kind) * [Compounding Strategy](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/compounding-strategy) * [Create Invoice Status](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/create-invoice-status) * [Create Prepayment Method](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/create-prepayment-method) * [Create Signup Proforma Preview Include](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/create-signup-proforma-preview-include) * [Credit Card Vault](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-card-vault) * [Credit Note Date Field](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-note-date-field) * [Credit Note Status](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-note-status) * [Credit Scheme](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-scheme) * [Credit Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type) * [Currency Price Role](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/currency-price-role) * [Custom Field Owner](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/custom-field-owner) * [Debit Note Role](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/debit-note-role) * [Debit Note Status](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/debit-note-status) * [Direction](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction) * [Discount Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/discount-type) * [Downgrade Credit Credit Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/downgrade-credit-credit-type) * [Entitlement Periodicity Unit](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/entitlement-periodicity-unit) * [Event Key](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/event-key) * [Expiration Interval Unit](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit) * [Failed Payment Action](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/failed-payment-action) * [Feature Kind](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-kind) * [Feature Owner Price Point Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-owner-price-point-type) * [Feature Value Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-value-type) * [First Charge Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/first-charge-type) * [Group Target Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/group-target-type) * [Group Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/group-type) * [Group Status](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/group-status) * [Include Not Null](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-not-null) * [Include Null or Not Null](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-null-or-not-null) * [Include Option](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-option) * [Interval Unit](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit) * [Invoice Consolidation Level](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-consolidation-level) * [Invoice Date Field](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-date-field) * [Invoice Discount Source Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-discount-source-type) * [Invoice Discount Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-discount-type) * [Invoice Event Payment Method](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-payment-method) * [Invoice Event Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type) * [Invoice Payment Method Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-payment-method-type) * [Invoice Payment Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-payment-type) * [Invoice Role](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-role) * [Invoice Sort Field](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-sort-field) * [Invoice Status](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-status) * [Item Category](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/item-category) * [Kind](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/kind) * [Line Item Kind](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/line-item-kind) * [Line Item Transaction Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/line-item-transaction-type) * [List Components Price Points Include](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-components-price-points-include) * [List Events Date Field](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-events-date-field) * [List Prepayment Date Field](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-prepayment-date-field) * [List Products Include](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-products-include) * [List Products Price Points Include](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-products-price-points-include) * [List Subscription Components Include](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-subscription-components-include) * [List Subscription Components Sort](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-subscription-components-sort) * [Metafield Input](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/metafield-input) * [Payment Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type) * [Pay Pal Vault](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pay-pal-vault) * [Prepayment Method](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/prepayment-method) * [Price Point Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type) * [Pricing Scheme](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme) * [Proforma Invoice Discount Source Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-discount-source-type) * [Proforma Invoice Role](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-role) * [Proforma Invoice Status](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-status) * [Proforma Invoice Tax Source Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-tax-source-type) * [Q Scope](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/q-scope) * [Reactivation Charge](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/reactivation-charge) * [Recurring Scheme](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/recurring-scheme) * [Resource Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type) * [Restriction Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/restriction-type) * [Resumption Charge](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resumption-charge) * [Service Credit Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/service-credit-type) * [Sort By](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sort-by) * [Sort Direction](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sort-direction) * [Sorting Direction](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction) * [Status](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/status) * [Status 1](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/status-1) * [Subscription Date Field](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-date-field) * [Subscription Group Include](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-group-include) * [Subscription Group Prepayment Method](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-group-prepayment-method) * [Subscription Groups List Include](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-groups-list-include) * [Subscription Include](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-include) * [Subscription List Date Field](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-list-date-field) * [Subscription List Include](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-list-include) * [Subscription Purge Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-purge-type) * [Subscription Sort](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-sort) * [Subscription State](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state) * [Subscription State Filter](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state-filter) * [Tax Configuration Kind](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/tax-configuration-kind) * [Tax Destination Address](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/tax-destination-address) * [Trial Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/trial-type) * [Upgrade Charge Credit Type](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/upgrade-charge-credit-type) * [Webhook Order](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/webhook-order) * [Webhook Status](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/webhook-status) * [Webhook Subscription](https://developers.maxio.com/http/advanced-billing-api/models/enumerations/webhook-subscription) ##### All Vaults Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/all-vaults The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. # Fields | Name | | --- | | `adyen` | | `authorizenet` | | `beanstream` | | `blue_snap` | | `bogus` | | `braintree1` | | `braintree_blue` | | `checkout` | | `cybersource` | | `elavon` | | `eway` | | `eway_rapid` | | `eway_rapid_std` | | `firstdata` | | `forte` | | `gocardless` | | `litle` | | `maxio_payments` | | `maxp` | | `moduslink` | | `moneris` | | `nmi` | | `orbital` | | `payment_express` | | `paymill` | | `paypal` | | `paypal_complete` | | `pin` | | `square` | | `stripe` | | `stripe_connect` | | `trust_commerce` | | `unipaas` | | `wirecard` | ##### Allocation Preview Direction Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/allocation-preview-direction # Fields | Name | | --- | | `upgrade` | | `downgrade` | ##### Allocation Preview Line Item Kind Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/allocation-preview-line-item-kind A handle for the line item kind for allocation preview # Fields | Name | | --- | | `quantity_based_component` | | `on_off_component` | | `coupon` | | `tax` | ##### Apple Pay Vault Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/apple-pay-vault The vault that stores the payment profile with the provided vault_token. # Fields | Name | | --- | | `braintree_blue` | ##### Auto Invite Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/auto-invite # Fields | Name | Description | | --- | --- | | `0` | Do not send the invitation email. | | `1` | Automatically send the invitation email. | ##### Bank Account Holder Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-holder-type Defaults to personal # Fields | Name | | --- | | `personal` | | `business` | ##### Bank Account Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-type Defaults to checking # Fields | Name | | --- | | `checking` | | `savings` | ##### Bank Account Vault Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/bank-account-vault The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. # Fields | Name | | --- | | `authorizenet` | | `blue_snap` | | `bogus` | | `forte` | | `gocardless` | | `maxio_payments` | | `maxp` | | `stripe_connect` | ##### Basic Date Field Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/basic-date-field Allows to filter by `created_at` or `updated_at`. # Fields | Name | | --- | | `updated_at` | | `created_at` | # Example ``` updated_at ``` ##### Billing Manifest Line Item Kind Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/billing-manifest-line-item-kind A handle for the billing manifest line item kind # Fields | Name | | --- | | `baseline` | | `initial` | | `trial` | | `coupon` | | `component` | | `tax` | ##### Cancellation Method Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/cancellation-method The process used to cancel the subscription, if the subscription has been canceled. It is nil if the subscription's state is not canceled. # Fields | Name | | --- | | `merchant_ui` | | `merchant_api` | | `dunning` | | `billing_portal` | | `unknown` | | `imported` | ##### Card Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/card-type The type of card used. # Fields | Name | | --- | | `visa` | | `master` | | `elo` | | `cabal` | | `alelo` | | `discover` | | `american_express` | | `naranja` | | `diners_club` | | `jcb` | | `dankort` | | `maestro` | | `maestro_no_luhn` | | `forbrugsforeningen` | | `sodexo` | | `alia` | | `vr` | | `unionpay` | | `carnet` | | `cartes_bancaires` | | `olimpica` | | `creditel` | | `confiable` | | `synchrony` | | `routex` | | `mada` | | `bp_plus` | | `passcard` | | `edenred` | | `anda` | | `tarjeta-d` | | `hipercard` | | `bogus` | | `switch` | | `solo` | | `laser` | ##### Chargeback Status Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/chargeback-status The current chargeback status. # Fields | Name | | --- | | `open` | | `lost` | | `won` | | `closed` | ##### Cleanup Scope Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/cleanup-scope all: Will clear all products, customers, and related subscriptions from the site. customers: Will clear only customers and related subscriptions (leaving the products untouched) for the site. Revenue will also be reset to 0. # Fields | Name | | --- | | `all` | | `customers` | ##### Collection Method Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. # Fields | Name | | --- | | `automatic` | | `remittance` | | `prepaid` | | `invoice` | ##### Collection Method 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/collection-method-1 # Fields | Name | | --- | | `automatic` | | `remittance` | | `prepaid` | ##### Component Kind Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/component-kind A handle for the component type # Fields | Name | | --- | | `metered_component` | | `quantity_based_component` | | `on_off_component` | | `prepaid_usage_component` | | `event_based_component` | ##### Compounding Strategy Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/compounding-strategy Applicable only to stackable coupons. For `compound`, Percentage-based discounts will be calculated against the remaining price, after prior discounts have been calculated. For `full-price`, Percentage-based discounts will always be calculated against the original item price, before other discounts are applied. # Fields | Name | | --- | | `compound` | | `full-price` | ##### Create Invoice Status Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/create-invoice-status # Fields | Name | | --- | | `draft` | | `open` | # Example ``` draft ``` ##### Create Prepayment Method Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/create-prepayment-method When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions. # Fields | Name | | --- | | `check` | | `cash` | | `money_order` | | `ach` | | `paypal_account` | | `credit_card` | | `credit_card_on_file` | | `other` | ##### Create Signup Proforma Preview Include Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/create-signup-proforma-preview-include # Fields | Name | | --- | | `next_proforma_invoice` | # Example ``` next_proforma_invoice ``` ##### Credit Card Vault Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-card-vault The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. # Fields | Name | | --- | | `adyen` | | `authorizenet` | | `beanstream` | | `blue_snap` | | `bogus` | | `braintree1` | | `braintree_blue` | | `checkout` | | `cybersource` | | `elavon` | | `eway` | | `eway_rapid` | | `eway_rapid_std` | | `firstdata` | | `forte` | | `litle` | | `maxio_payments` | | `maxp` | | `moduslink` | | `moneris` | | `nmi` | | `orbital` | | `payment_express` | | `paymill` | | `paypal` | | `paypal_complete` | | `pin` | | `square` | | `stripe` | | `stripe_connect` | | `trust_commerce` | | `unipaas` | | `wirecard` | ##### Credit Note Date Field Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-note-date-field # Fields | Name | | --- | | `issue_date` | | `applied_date` | | `created_at` | | `updated_at` | # Example ``` issue_date ``` ##### Credit Note Status Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-note-status Current status of the credit note. # Fields | Name | | --- | | `open` | | `applied` | ##### Credit Scheme Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-scheme # Fields | Name | | --- | | `none` | | `credit` | | `refund` | ##### Credit Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/credit-type The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. # Fields | Name | | --- | | `full` | | `prorated` | | `none` | ##### Currency Price Role Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/currency-price-role Role for the price. # Fields | Name | | --- | | `baseline` | | `trial` | | `initial` | ##### Custom Field Owner Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/custom-field-owner # Fields | Name | | --- | | `Customer` | | `Subscription` | ##### Debit Note Role Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/debit-note-role The role of the debit note. # Fields | Name | | --- | | `chargeback` | | `refund` | ##### Debit Note Status Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/debit-note-status Current status of the debit note. # Fields | Name | | --- | | `open` | | `applied` | | `banished` | | `paid` | ##### Direction Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/direction # Fields | Name | | --- | | `asc` | | `desc` | ##### Discount Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/discount-type # Fields | Name | | --- | | `amount` | | `percent` | ##### Downgrade Credit Credit Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/downgrade-credit-credit-type The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Values are: `full` - A full price credit is added for the amount owed. `prorated` - A prorated credit is added for the amount owed. `none` - No charge is added. # Fields | Name | | --- | | `full` | | `prorated` | | `none` | ##### Entitlement Periodicity Unit Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/entitlement-periodicity-unit The recurring window over which a `usage_limit` feature's allowance resets. # Fields | Name | | --- | | `hour` | | `day` | | `week` | | `month` | | `year` | ##### Event Key Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/event-key # Fields | Name | | --- | | `payment_success` | | `payment_failure` | | `signup_success` | | `signup_failure` | | `delayed_signup_creation_success` | | `delayed_signup_creation_failure` | | `billing_date_change` | | `expiration_date_change` | | `renewal_success` | | `renewal_failure` | | `subscription_state_change` | | `subscription_product_change` | | `subscription_product_change_scheduled` | | `pending_cancellation_change` | | `expiring_card` | | `customer_update` | | `customer_create` | | `customer_delete` | | `component_allocation_change` | | `metered_usage` | | `prepaid_usage` | | `upgrade_downgrade_success` | | `upgrade_downgrade_failure` | | `statement_closed` | | `statement_settled` | | `subscription_card_update` | | `subscription_group_card_update` | | `subscription_bank_account_update` | | `refund_success` | | `refund_failure` | | `upcoming_renewal_notice` | | `trial_end_notice` | | `dunning_step_reached` | | `invoice_issued` | | `invoice_pending` | | `prepaid_subscription_balance_changed` | | `subscription_group_signup_success` | | `subscription_group_signup_failure` | | `direct_debit_payment_paid_out` | | `direct_debit_payment_rejected` | | `direct_debit_payment_pending` | | `pending_payment_created` | | `pending_payment_failed` | | `pending_payment_completed` | | `proforma_invoice_issued` | | `subscription_prepayment_account_balance_changed` | | `subscription_service_credit_account_balance_changed` | | `custom_field_value_change` | | `item_price_point_changed` | | `renewal_success_recreated` | | `renewal_failure_recreated` | | `payment_success_recreated` | | `payment_failure_recreated` | | `subscription_deletion` | | `subscription_group_bank_account_update` | | `subscription_paypal_account_update` | | `subscription_group_paypal_account_update` | | `subscription_customer_change` | | `account_transaction_changed` | | `go_cardless_payment_paid_out` | | `go_cardless_payment_rejected` | | `go_cardless_payment_pending` | | `stripe_direct_debit_payment_paid_out` | | `stripe_direct_debit_payment_rejected` | | `stripe_direct_debit_payment_pending` | | `maxio_payments_direct_debit_payment_paid_out` | | `maxio_payments_direct_debit_payment_rejected` | | `maxio_payments_direct_debit_payment_pending` | | `invoice_in_collections_canceled` | | `subscription_added_to_group` | | `subscription_removed_from_group` | | `chargeback_opened` | | `chargeback_lost` | | `chargeback_accepted` | | `chargeback_closed` | | `chargeback_won` | | `payment_collection_method_changed` | | `component_billing_date_changed` | | `chjs_tokenization_failure` | | `chjs_tokenization_success` | | `subscription_term_renewal_scheduled` | | `subscription_term_renewal_pending` | | `subscription_term_renewal_activated` | | `subscription_term_renewal_removed` | ##### Expiration Interval Unit Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/expiration-interval-unit # Fields | Name | | --- | | `day` | | `month` | | `never` | ##### Failed Payment Action Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/failed-payment-action Action taken when payment for an invoice fails: - `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option. - `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history. - `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings). # Fields | Name | | --- | | `leave_open_invoice` | | `rollback_to_pending` | | `initiate_dunning` | ##### Feature Kind Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-kind The behavior of a feature: - `access_right`: a boolean entitlement — a subscriber either has access or does not. - `usage_limit`: a quantified allowance measured over a recurring period (for example, "10,000 API calls per month"). - `service_right`: a free-form value (text, boolean, or number) that isn't a simple access flag or a metered limit. # Fields | Name | | --- | | `access_right` | | `usage_limit` | | `service_right` | ##### Feature Owner Price Point Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-owner-price-point-type Identifies which kind of price point a feature catalog item override applies to: `ProductPricePoint` for a product price point, `PricePoint` for a component price point. Only relevant when `price_point_id` is set. # Fields | Name | | --- | | `ProductPricePoint` | | `PricePoint` | ##### Feature Value Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/feature-value-type The data type of a feature's value. For `access_right` features this is always `boolean`, and for `usage_limit` features this is always `numeric`. For `service_right` features, you choose the value type explicitly. # Fields | Name | | --- | | `text` | | `boolean` | | `numeric` | ##### First Charge Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/first-charge-type # Fields | Name | | --- | | `prorated` | | `immediate` | | `delayed` | ##### Group Target Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/group-target-type The type of object indicated by the id attribute. # Fields | Name | | --- | | `customer` | | `subscription` | | `self` | | `parent` | | `eldest` | ##### Group Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/group-type # Fields | Name | | --- | | `single_customer` | | `multiple_customers` | ##### Group Status Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/group-status # Fields | Name | | --- | | `ungrouped` | | `grouped` | ##### Include Not Null Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-not-null Passed as a parameter to list methods to return only non null values. # Fields | Name | | --- | | `not_null` | # Example ``` not_null ``` ##### Include Null or Not Null Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-null-or-not-null Allows to filter by `not_null` or `null`. # Fields | Name | | --- | | `not_null` | | `null` | # Example ``` not_null ``` ##### Include Option Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/include-option # Fields | Name | | --- | | `0` | | `1` | ##### Interval Unit Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/interval-unit # Fields | Name | | --- | | `day` | | `month` | ##### Invoice Consolidation Level Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-consolidation-level Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: * "none": A normal invoice with no consolidation. * "child": An invoice segment which has been combined into a consolidated invoice. * "parent": A consolidated invoice, whose contents are composed of invoice segments. "Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments. See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). # Fields | Name | | --- | | `none` | | `child` | | `parent` | ##### Invoice Date Field Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-date-field # Fields | Name | | --- | | `created_at` | | `due_date` | | `issue_date` | | `updated_at` | | `paid_date` | # Example ``` issue_date ``` ##### Invoice Discount Source Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-discount-source-type # Fields | Name | | --- | | `Coupon` | | `Referral` | | `Ad Hoc Coupon` | ##### Invoice Discount Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-discount-type # Fields | Name | | --- | | `percentage` | | `flat_amount` | | `rollover` | ##### Invoice Event Payment Method Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-payment-method # Fields | Name | | --- | | `apple_pay` | | `bank_account` | | `credit_card` | | `external` | | `paypal_account` | ##### Invoice Event Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-event-type Invoice Event Type # Fields | Name | | --- | | `issue_invoice` | | `apply_credit_note` | | `create_credit_note` | | `apply_payment` | | `apply_debit_note` | | `create_debit_note` | | `refund_invoice` | | `void_invoice` | | `void_remainder` | | `backport_invoice` | | `change_invoice_status` | | `change_invoice_collection_method` | | `remove_payment` | | `failed_payment` | | `change_chargeback_status` | ##### Invoice Payment Method Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-payment-method-type The type of payment method used. Defaults to other. # Fields | Name | | --- | | `credit_card` | | `check` | | `cash` | | `money_order` | | `ach` | | `other` | ##### Invoice Payment Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-payment-type The type of payment to be applied to an Invoice. Defaults to external. # Fields | Name | | --- | | `external` | | `prepayment` | | `service_credit` | | `payment` | ##### Invoice Role Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-role # Fields | Name | | --- | | `unset` | | `signup` | | `renewal` | | `usage` | | `reactivation` | | `proration` | | `migration` | | `adhoc` | | `backport` | | `backport-balance-reconciliation` | ##### Invoice Sort Field Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-sort-field # Fields | Name | | --- | | `status` | | `total_amount` | | `due_amount` | | `created_at` | | `updated_at` | | `issue_date` | | `due_date` | | `number` | # Example ``` total_amount ``` ##### Invoice Status Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/invoice-status The current status of the invoice. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. # Fields | Name | | --- | | `draft` | | `open` | | `paid` | | `pending` | | `voided` | | `canceled` | | `processing` | ##### Item Category Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/item-category One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other # Fields | Name | | --- | | `Business Software` | | `Consumer Software` | | `Digital Services` | | `Physical Goods` | | `Other` | # Example ``` Business Software ``` ##### Kind Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/kind # Fields | Name | | --- | | `access_right` | | `usage_limit` | | `service_right` | | `all` | ##### Line Item Kind Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/line-item-kind A handle for the line item kind # Fields | Name | | --- | | `baseline` | | `initial` | | `trial` | | `quantity_based_component` | | `prepaid_usage_component` | | `on_off_component` | | `metered_component` | | `event_based_component` | | `coupon` | | `tax` | ##### Line Item Transaction Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/line-item-transaction-type A handle for the line item transaction type # Fields | Name | | --- | | `charge` | | `credit` | | `adjustment` | | `payment` | | `refund` | | `info_transaction` | | `payment_authorization` | ##### List Components Price Points Include Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-components-price-points-include # Fields | Name | | --- | | `currency_prices` | # Example ``` currency_prices ``` ##### List Events Date Field Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-events-date-field # Fields | Name | | --- | | `created_at` | # Example ``` created_at ``` ##### List Prepayment Date Field Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-prepayment-date-field # Fields | Name | | --- | | `created_at` | | `application_at` | # Example ``` created_at ``` ##### List Products Include Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-products-include # Fields | Name | | --- | | `prepaid_product_price_point` | # Example ``` prepaid_product_price_point ``` ##### List Products Price Points Include Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-products-price-points-include # Fields | Name | | --- | | `currency_prices` | # Example ``` currency_prices ``` ##### List Subscription Components Include Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-subscription-components-include # Fields | Name | | --- | | `subscription` | | `historic_usages` | # Example ``` subscription ``` ##### List Subscription Components Sort Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/list-subscription-components-sort # Fields | Name | | --- | | `id` | | `updated_at` | # Example ``` updated_at ``` ##### Metafield Input Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/metafield-input Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. # Fields | Name | | --- | | `balance_tracker` | | `text` | | `radio` | | `dropdown` | ##### Payment Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/payment-type # Fields | Name | | --- | | `credit_card` | | `bank_account` | | `paypal_account` | | `apple_pay` | ##### Pay Pal Vault Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pay-pal-vault The vault that stores the payment profile with the provided vault_token. # Fields | Name | | --- | | `braintree_blue` | | `paypal` | | `moduslink` | | `paypal_complete` | ##### Prepayment Method Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/prepayment-method # Fields | Name | | --- | | `check` | | `cash` | | `money_order` | | `ach` | | `paypal_account` | | `credit_card` | | `other` | ##### Price Point Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/price-point-type Price point type. We expose the following types: 1. **default**: a price point that is marked as a default price for a certain product. 2. **custom**: a custom price point. 3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. # Fields | Name | | --- | | `catalog` | | `default` | | `custom` | ##### Pricing Scheme Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/pricing-scheme The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. # Fields | Name | | --- | | `stairstep` | | `volume` | | `per_unit` | | `tiered` | ##### Proforma Invoice Discount Source Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-discount-source-type # Fields | Name | | --- | | `Coupon` | | `Referral` | ##### Proforma Invoice Role Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-role 'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic. # Fields | Name | | --- | | `unset` | | `proforma` | | `proforma_adhoc` | | `proforma_automatic` | ##### Proforma Invoice Status Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-status # Fields | Name | | --- | | `draft` | | `voided` | | `archived` | ##### Proforma Invoice Tax Source Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/proforma-invoice-tax-source-type # Fields | Name | | --- | | `Tax` | | `Avalara` | ##### Q Scope Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/q-scope # Fields | Name | | --- | | `full_name` | | `first_name` | | `last_name` | | `organization` | | `customer_reference` | | `subscription_reference` | ##### Reactivation Charge Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/reactivation-charge You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal. # Fields | Name | | --- | | `prorated` | | `immediate` | | `delayed` | ##### Recurring Scheme Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/recurring-scheme # Fields | Name | | --- | | `do_not_recur` | | `recur_indefinitely` | | `recur_with_duration` | ##### Resource Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resource-type # Fields | Name | | --- | | `subscriptions` | | `customers` | ##### Restriction Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/restriction-type # Fields | Name | | --- | | `Component` | | `Product` | ##### Resumption Charge Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/resumption-charge (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled # Fields | Name | | --- | | `prorated` | | `immediate` | | `delayed` | ##### Service Credit Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/service-credit-type The type of entry # Fields | Name | | --- | | `Credit` | | `Debit` | ##### Sort By Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sort-by # Fields | Name | | --- | | `name` | | `updated_at` | | `kind` | | `value_type` | ##### Sort Direction Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sort-direction # Fields | Name | | --- | | `asc` | | `desc` | ##### Sorting Direction Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/sorting-direction Used for sorting results. # Fields | Name | | --- | | `asc` | | `desc` | ##### Status Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/status # Fields | Name | | --- | | `draft` | | `scheduled` | | `pending` | | `canceled` | | `active` | | `fulfilled` | ##### Status 1 Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/status-1 # Fields | Name | | --- | | `active` | | `archived` | | `all` | ##### Subscription Date Field Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-date-field # Fields | Name | | --- | | `current_period_ends_at` | | `current_period_starts_at` | | `created_at` | | `activated_at` | | `canceled_at` | | `expires_at` | | `trial_started_at` | | `trial_ended_at` | | `updated_at` | ##### Subscription Group Include Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-group-include # Fields | Name | | --- | | `current_billing_amount_in_cents` | ##### Subscription Group Prepayment Method Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-group-prepayment-method # Fields | Name | | --- | | `check` | | `cash` | | `money_order` | | `ach` | | `paypal_account` | | `other` | ##### Subscription Groups List Include Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-groups-list-include # Fields | Name | | --- | | `account_balances` | ##### Subscription Include Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-include # Fields | Name | | --- | | `coupons` | | `self_service_page_token` | ##### Subscription List Date Field Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-list-date-field # Fields | Name | | --- | | `updated_at` | # Example ``` updated_at ``` ##### Subscription List Include Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-list-include # Fields | Name | | --- | | `self_service_page_token` | | `current_account_balance_in_cents` | | `current_billing_amount` | | `coupons` | ##### Subscription Purge Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-purge-type # Fields | Name | | --- | | `customer` | | `payment_profile` | ##### Subscription Sort Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-sort # Fields | Name | | --- | | `signup_date` | | `period_start` | | `period_end` | | `next_assessment` | | `updated_at` | | `created_at` | | `total_payments` | | `id` | | `open_balance` | | `expires_at` | ##### Subscription State Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state The state of a subscription. * **Live States** * `active` - A normal, active subscription. It is not in a trial and is paid and up to date. * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed. * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed. * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state. * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears. * **Problem States** * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers. * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed. * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`. * **End of Life States** * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription. While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance. * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period. * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.) * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time. * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state. * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details. See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. # Fields | Name | | --- | | `pending` | | `failed_to_create` | | `trialing` | | `assessing` | | `active` | | `soft_failure` | | `past_due` | | `suspended` | | `canceled` | | `expired` | | `paused` | | `unpaid` | | `trial_ended` | | `on_hold` | | `awaiting_signup` | ##### Subscription State Filter Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/subscription-state-filter Allowed values for filtering by the current state of the subscription. # Fields | Name | | --- | | `active` | | `canceled` | | `expired` | | `expired_cards` | | `expired_cards_(live_subscriptions)` | | `expired_cards_(all_subscriptions)` | | `on_hold` | | `awaiting_signup` | | `awaiting_signup_date` | | `past_due` | | `pending_cancellation` | | `pending_renewal` | | `prepaid_dunning` | | `suspended` | | `trial_ended` | | `trialing` | | `unpaid` | ##### Tax Configuration Kind Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/tax-configuration-kind # Fields | Name | | --- | | `custom` | | `managed avalara` | | `linked avalara` | | `digital river` | ##### Tax Destination Address Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/tax-destination-address # Fields | Name | | --- | | `shipping_then_billing` | | `billing_then_shipping` | | `shipping_only` | | `billing_only` | ##### Trial Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/trial-type Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. # Fields | Name | | --- | | `no_obligation` | | `payment_expected` | ##### Upgrade Charge Credit Type Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/upgrade-charge-credit-type The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Values are: `full` - A charge is added for the full price of the component. `prorated` - A charge is added for the prorated price of the component change. `none` - No charge is added. # Fields | Name | | --- | | `full` | | `prorated` | | `none` | ##### Webhook Order Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/webhook-order # Fields | Name | | --- | | `newest_first` | | `oldest_first` | ##### Webhook Status Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/webhook-status # Fields | Name | | --- | | `successful` | | `failed` | | `pending` | | `paused` | ##### Webhook Subscription Source: https://developers.maxio.com/http/advanced-billing-api/models/enumerations/webhook-subscription # Fields | Name | | --- | | `billing_date_change` | | `component_allocation_change` | | `chjs_tokenization_failure` | | `chjs_tokenization_success` | | `customer_create` | | `customer_update` | | `dunning_step_reached` | | `expiring_card` | | `expiration_date_change` | | `invoice_issued` | | `invoice_pending` | | `metered_usage` | | `payment_failure` | | `payment_success` | | `direct_debit_payment_pending` | | `direct_debit_payment_paid_out` | | `direct_debit_payment_rejected` | | `prepaid_subscription_balance_changed` | | `prepaid_usage` | | `refund_failure` | | `refund_success` | | `renewal_failure` | | `renewal_success` | | `signup_failure` | | `signup_success` | | `statement_closed` | | `statement_settled` | | `subscription_card_update` | | `subscription_group_card_update` | | `subscription_product_change` | | `subscription_product_change_scheduled` | | `subscription_state_change` | | `trial_end_notice` | | `upcoming_renewal_notice` | | `upgrade_downgrade_failure` | | `upgrade_downgrade_success` | | `pending_cancellation_change` | | `subscription_prepayment_account_balance_changed` | | `subscription_service_credit_account_balance_changed` | #### Exceptions * [Component Allocation Error](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/component-allocation-error) * [Component Price Point Error](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/component-price-point-error) * [Customer Error Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/customer-error-response) * [Error Array Map Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response) * [Error List Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response) * [Error String Map Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-string-map-response) * [Event Based Billing List Segments Errors](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-list-segments-errors) * [Event Based Billing Segment](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-segment) * [Event Based Billing Segment Errors](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-segment-errors) * [Product Price Point Error Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/product-price-point-error-response) * [Proforma Bad Request Error Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/proforma-bad-request-error-response) * [Refund Prepayment Base Errors Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/refund-prepayment-base-errors-response) * [Single Error Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response) * [Single String Error Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-string-error-response) * [Subscription Add Coupon Error](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-add-coupon-error) * [Subscription Component Allocation Error](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-component-allocation-error) * [Subscription Group Create Error Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-group-create-error-response) * [Subscription Group Signup Error Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-group-signup-error-response) * [Subscription Group Update Error Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-group-update-error-response) * [Subscription Remove Coupon Errors](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-remove-coupon-errors) * [Subscription Response Error](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-response-error) * [Subscriptions Mrr Error Response](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscriptions-mrr-error-response) * [Too Many Management Link Requests Error](https://developers.maxio.com/http/advanced-billing-api/models/exceptions/too-many-management-link-requests-error) ##### Component Allocation Error Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/component-allocation-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-allocation-error-item) | Optional | - | ##### Component Price Point Error Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/component-price-point-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-price-point-error-item) | Optional | - | ##### Customer Error Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/customer-error-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Customer Error \| array`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/customer-error-response-errors) | Optional | - | ##### Error Array Map Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-array-map-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `map` | Optional | - | ##### Error List Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-list-response Error which contains list of messages. # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `array` | Required | - | ##### Error String Map Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/error-string-map-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `map` | Optional | - | ##### Event Based Billing List Segments Errors Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-list-segments-errors # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Errors`](https://developers.maxio.com/http/advanced-billing-api/models/structures/errors) | Optional | - | ##### Event Based Billing Segment Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-segment # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Event Based Billing Segment Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/event-based-billing-segment-error) | Required | - | ##### Event Based Billing Segment Errors Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/event-based-billing-segment-errors # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `map` | Optional | The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key. | ##### Product Price Point Error Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/product-price-point-error-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Product Price Point Errors`](https://developers.maxio.com/http/advanced-billing-api/models/structures/product-price-point-errors) | Required | - | ##### Proforma Bad Request Error Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/proforma-bad-request-error-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Proforma Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-error) | Optional | - | ##### Refund Prepayment Base Errors Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/refund-prepayment-base-errors-response Errors returned on creating a refund prepayment when bad request # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Refund Prepayment Base Refund Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-prepayment-base-refund-error) | Optional | - | ##### Single Error Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-error-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `error` | `String` | Required | - | ##### Single String Error Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/single-string-error-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | `String` | Optional | - | ##### Subscription Add Coupon Error Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-add-coupon-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `codes` | `array` | Optional | - | | `coupon_code` | `array` | Optional | - | | `coupon_codes` | `array` | Optional | - | | `subscription` | `array` | Optional | - | ##### Subscription Component Allocation Error Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-component-allocation-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-component-allocation-error-item) | Optional | - | ##### Subscription Group Create Error Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-group-create-error-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Subscription Group Members Array Error \| Subscription Group Single Error \| String`](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-create-error-response-errors) | Required | - | ##### Subscription Group Signup Error Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-group-signup-error-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Subscription Group Signup Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-error) | Required | - | ##### Subscription Group Update Error Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-group-update-error-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Subscription Group Update Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-update-error) | Optional | - | ##### Subscription Remove Coupon Errors Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-remove-coupon-errors # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription` | `array` | Required | - | ##### Subscription Response Error Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscription-response-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `subscription` | [`Subscription`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription) | Optional | - | ##### Subscriptions Mrr Error Response Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/subscriptions-mrr-error-response # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Attribute Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/attribute-error) | Required | - | ##### Too Many Management Link Requests Error Source: https://developers.maxio.com/http/advanced-billing-api/models/exceptions/too-many-management-link-requests-error # Fields | Name | Type | Tags | Description | | --- | --- | --- | --- | | `errors` | [`Too Many Management Link Requests`](https://developers.maxio.com/http/advanced-billing-api/models/structures/too-many-management-link-requests) | Required | - | #### OneOf/AnyOf Definitions * [Clone Component Price Point Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/clone-component-price-point-component-id) * [Clone Component Price Point Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/clone-component-price-point-price-point-id) * [Update Component Price Point Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-component-price-point-component-id) * [Update Component Price Point Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-component-price-point-price-point-id) * [Read Component Price Point Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-component-price-point-component-id) * [Read Component Price Point Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-component-price-point-price-point-id) * [Archive Component Price Point Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-component-price-point-component-id) * [Archive Component Price Point Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-component-price-point-price-point-id) * [Create Product Price Point Product Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-product-price-point-product-id) * [List Product Price Points Product Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-product-price-points-product-id) * [Update Product Price Point Product Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-product-price-point-product-id) * [Update Product Price Point Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-product-price-point-price-point-id) * [Read Product Price Point Product Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-product-price-point-product-id) * [Read Product Price Point Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-product-price-point-price-point-id) * [Archive Product Price Point Product Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-product-price-point-product-id) * [Archive Product Price Point Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-product-price-point-price-point-id) * [List Subscriptions Product](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-subscriptions-product) * [Create Usage Subscription Id or Reference](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-usage-subscription-id-or-reference) * [Create Usage Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-usage-component-id) * [List Usages Subscription Id or Reference](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-usages-subscription-id-or-reference) * [List Usages Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-usages-component-id) * [Invoice-Event](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/invoice-event) * [Aggregated Entitlement Value](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/aggregated-entitlement-value) * [Allocation Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-quantity) * [Allocation Previous Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-previous-quantity) * [Allocation Preview Item Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-preview-item-quantity) * [Allocation Preview Item Previous Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-preview-item-previous-quantity) * [Invoice-Event-Payment](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/invoice-event-payment) * [Calendar Billing Snap Day](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/calendar-billing-snap-day) * [Component Allocation Change Allocated Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/component-allocation-change-allocated-quantity) * [Component Price Point Assignment Price Point](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/component-price-point-assignment-price-point) * [Coupon Payload Percentage](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/coupon-payload-percentage) * [Create Allocation Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-allocation-price-point-id) * [Create Component Price Point Request Price Point](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-component-price-point-request-price-point) * [Create Component Price Points Request Price Points](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-component-price-points-request-price-points) * [Create Invoice Coupon Percentage](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-coupon-percentage) * [Create Invoice Coupon Amount](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-coupon-amount) * [Create Invoice Coupon Product Family Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-coupon-product-family-id) * [Create Invoice Item Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-quantity) * [Create Invoice Item Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-unit-price) * [Create Invoice Item Product Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-product-id) * [Create Invoice Item Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-component-id) * [Create Invoice Item Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-price-point-id) * [Create Invoice Item Product Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-product-price-point-id) * [Create Invoice Payment Amount](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-payment-amount) * [Create Metafields Request Metafields](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-metafields-request-metafields) * [Create Multi Invoice Payment Amount](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-multi-invoice-payment-amount) * [Create or Update Segment Price Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-or-update-segment-price-unit-price) * [Create Payment Profile Expiration Month](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-payment-profile-expiration-month) * [Create Payment Profile Expiration Year](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-payment-profile-expiration-year) * [Create Segment Segment Property 1 Value](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-1-value) * [Create Segment Segment Property 2 Value](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-2-value) * [Create Segment Segment Property 3 Value](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-3-value) * [Create Segment Segment Property 4 Value](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-4-value) * [Create Subscription Offer Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-offer-id) * [Create Subscription Component Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-component-id) * [Create Subscription Component Unit Balance](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-unit-balance) * [Create Subscription Component Allocated Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-allocated-quantity) * [Create Subscription Component Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-price-point-id) * [Customer Error Response Errors](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/customer-error-response-errors) * [Customer Error Response 1 Errors](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/customer-error-response-1-errors) * [Deduct Service Credit Amount](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/deduct-service-credit-amount) * [EBB Component Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/ebb-component-unit-price) * [Event Event Specific Data](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/event-event-specific-data) * [Get One Time Token Request Payment Profile](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/get-one-time-token-request-payment-profile) * [Issue Service Credit Amount](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/issue-service-credit-amount) * [Metafield Enum](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/metafield-enum) * [Metered Component Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/metered-component-unit-price) * [Metered Usage New Unit Balance](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/metered-usage-new-unit-balance) * [On Off Component Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/on-off-component-unit-price) * [Payment Profile Attributes Expiration Month](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/payment-profile-attributes-expiration-month) * [Payment Profile Attributes Expiration Year](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/payment-profile-attributes-expiration-year) * [Payment-Profile](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/payment-profile) * [Prepaid Usage New Unit Balance](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/prepaid-usage-new-unit-balance) * [Prepaid Usage New Overage Unit Balance](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/prepaid-usage-new-overage-unit-balance) * [Prepaid Usage Component Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/prepaid-usage-component-unit-price) * [Price Starting Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/price-starting-quantity) * [Price Ending Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/price-ending-quantity) * [Price Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/price-unit-price) * [Quantity Based Component Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/quantity-based-component-unit-price) * [Reactivate Subscription Request Resume](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/reactivate-subscription-request-resume) * [Refund Consolidated Invoice Segment Uids](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/refund-consolidated-invoice-segment-uids) * [Refund Invoice Request Refund](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/refund-invoice-request-refund) * [Refund Prepayment Amount](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/refund-prepayment-amount) * [Renewal Preview Component Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/renewal-preview-component-component-id) * [Renewal Preview Component Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/renewal-preview-component-price-point-id) * [Scheduled Renewal Configuration Item Request Renewal Configuration Item](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-configuration-item-request-renewal-configuration-item) * [Scheduled Renewal Product Price Point Price in Cents](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-product-price-point-price-in-cents) * [Scheduled Renewal Product Price Point Interval](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-product-price-point-interval) * [Scheduled Renewal Update Request Renewal Configuration Item](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-update-request-renewal-configuration-item) * [Segment Segment Property 1 Value](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-1-value) * [Segment Segment Property 2 Value](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-2-value) * [Segment Segment Property 3 Value](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-3-value) * [Segment Segment Property 4 Value](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-4-value) * [Subscription Component Unit Balance](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-component-unit-balance) * [Subscription Component Allocated Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-component-allocated-quantity) * [Subscription Custom Price Price in Cents](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-price-in-cents) * [Subscription Custom Price Interval](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-interval) * [Subscription Custom Price Trial Price in Cents](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-trial-price-in-cents) * [Subscription Custom Price Trial Interval](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-trial-interval) * [Subscription Custom Price Initial Charge in Cents](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-initial-charge-in-cents) * [Subscription Custom Price Expiration Interval](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-expiration-interval) * [Subscription Group Create Error Response Errors](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-create-error-response-errors) * [Subscription Group Create Error Response 1 Errors](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-create-error-response-1-errors) * [Subscription Group Credit Card Full Number](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-credit-card-full-number) * [Subscription Group Credit Card Expiration Month](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-credit-card-expiration-month) * [Subscription Group Credit Card Expiration Year](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-credit-card-expiration-year) * [Subscription Group Signup Component Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-component-id) * [Subscription Group Signup Component Allocated Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-allocated-quantity) * [Subscription Group Signup Component Unit Balance](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-unit-balance) * [Subscription Group Signup Component Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-price-point-id) * [Update Invoice Item Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-quantity) * [Update Invoice Item Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-unit-price) * [Update Invoice Item Product Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-product-id) * [Update Invoice Item Component Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-component-id) * [Update Invoice Item Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-price-point-id) * [Update Invoice Item Product Price Point Id](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-product-price-point-id) * [Update Metafields Request Metafields](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-metafields-request-metafields) * [Update Price Ending Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-price-ending-quantity) * [Update Price Unit Price](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-price-unit-price) * [Update Price Starting Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-price-starting-quantity) * [Update Subscription Snap Day](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-subscription-snap-day) * [Update Subscription Net Terms](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-subscription-net-terms) * [Usage Quantity](https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/usage-quantity) ##### Clone Component Price Point Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/clone-component-price-point-component-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Clone Component Price Point Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/clone-component-price-point-price-point-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Update Component Price Point Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-component-price-point-component-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Update Component Price Point Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-component-price-point-price-point-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Read Component Price Point Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-component-price-point-component-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Read Component Price Point Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-component-price-point-price-point-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Archive Component Price Point Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-component-price-point-component-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Archive Component Price Point Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-component-price-point-price-point-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Product Price Point Product Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-product-price-point-product-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### List Product Price Points Product Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-product-price-points-product-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Update Product Price Point Product Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-product-price-point-product-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Update Product Price Point Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-product-price-point-price-point-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Read Product Price Point Product Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-product-price-point-product-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Read Product Price Point Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/read-product-price-point-price-point-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Archive Product Price Point Product Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-product-price-point-product-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Archive Product Price Point Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/archive-product-price-point-price-point-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### List Subscriptions Product Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-subscriptions-product # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Usage Subscription Id or Reference Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-usage-subscription-id-or-reference # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Usage Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-usage-component-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### List Usages Subscription Id or Reference Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-usages-subscription-id-or-reference # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### List Usages Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/list-usages-component-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Invoice-Event Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/invoice-event # Data Type `Apply Credit Note Event | Apply Debit Note Event | Apply Payment Event | Backport Invoice Event | Change Chargeback Status Event | Change Invoice Collection Method Event | Change Invoice Status Event | Create Credit Note Event | Create Debit Note Event | Failed Payment Event | Issue Invoice Event | Refund Invoice Event | Remove Payment Event | Void Invoice Event | Void Remainder Event` # Cases | Type | | --- | | [`Apply Credit Note Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-credit-note-event) | | [`Apply Debit Note Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-debit-note-event) | | [`Apply Payment Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/apply-payment-event) | | [`Backport Invoice Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/backport-invoice-event) | | [`Change Chargeback Status Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-chargeback-status-event) | | [`Change Invoice Collection Method Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-collection-method-event) | | [`Change Invoice Status Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/change-invoice-status-event) | | [`Create Credit Note Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-credit-note-event) | | [`Create Debit Note Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-debit-note-event) | | [`Failed Payment Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/failed-payment-event) | | [`Issue Invoice Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/issue-invoice-event) | | [`Refund Invoice Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice-event) | | [`Remove Payment Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/remove-payment-event) | | [`Void Invoice Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-invoice-event) | | [`Void Remainder Event`](https://developers.maxio.com/http/advanced-billing-api/models/structures/void-remainder-event) | # Apply Credit Note Event ## Initialization Code ### Example ```bash { "id": 214, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "apply_credit_note", "event_data": { "uid": "uid6", "credit_note_number": "credit_note_number0", "credit_note_uid": "credit_note_uid0", "original_amount": "original_amount0", "applied_amount": "applied_amount2" } } ``` # Apply Debit Note Event ## Initialization Code ### Example ```bash { "id": 164, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "apply_debit_note", "event_data": { "debit_note_number": "debit_note_number6", "debit_note_uid": "debit_note_uid2", "original_amount": "original_amount0", "applied_amount": "applied_amount2" } } ``` # Apply Payment Event ## Initialization Code ### Example ```bash { "id": 234, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "apply_payment", "event_data": { "consolidation_level": "child", "memo": "memo0", "original_amount": "original_amount0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z", "payment_method": { "type": "apple_pay" } } } ``` # Backport Invoice Event ## Initialization Code ### Example ```bash { "id": 78, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "backport_invoice", "event_data": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" } } ``` # Change Chargeback Status Event ## Initialization Code ### Example ```bash { "id": 214, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "change_chargeback_status", "event_data": { "chargeback_status": "won" } } ``` # Change Invoice Collection Method Event ## Initialization Code ### Example ```bash { "id": 246, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "change_invoice_collection_method", "event_data": { "from_collection_method": "from_collection_method4", "to_collection_method": "to_collection_method8" } } ``` # Change Invoice Status Event ## Initialization Code ### Example ```bash { "id": 92, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "change_invoice_status", "event_data": { "from_status": "open", "to_status": "pending" } } ``` # Create Credit Note Event ## Initialization Code ### Example ```bash { "id": 28, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "create_credit_note", "event_data": {} } ``` # Create Debit Note Event ## Initialization Code ### Example ```bash { "id": 98, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "create_debit_note", "event_data": {} } ``` # Failed Payment Event ## Initialization Code ### Example ```bash { "id": 120, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "failed_payment", "event_data": { "amount_in_cents": 220, "applied_amount": 194, "payment_method": "cash", "transaction_id": 78 } } ``` # Issue Invoice Event ## Initialization Code ### Example ```bash { "id": 130, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "issue_invoice", "event_data": { "consolidation_level": "child", "from_status": "open", "to_status": "pending", "due_amount": "due_amount8", "total_amount": "total_amount2" } } ``` # Refund Invoice Event ## Initialization Code ### Example ```bash { "id": 54, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "refund_invoice", "event_data": { "apply_credit": false, "credit_note_attributes": {}, "payment_id": 204, "refund_amount": "refund_amount8", "refund_id": 248, "transaction_time": "2016-03-13T12:52:32.123Z" } } ``` # Remove Payment Event ## Initialization Code ### Example ```bash { "id": 236, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "remove_payment", "event_data": { "transaction_id": 78, "memo": "memo0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z", "payment_method": { "type": "apple_pay" }, "prepayment": false } } ``` # Void Invoice Event ## Initialization Code ### Example ```bash { "id": 16, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "void_invoice", "event_data": { "credit_note_attributes": {}, "memo": "memo0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z", "is_advance_invoice": false, "reason": "reason2" } } ``` # Void Remainder Event ## Initialization Code ### Example ```bash { "id": 128, "timestamp": "2016-03-13T12:52:32.123Z", "invoice": { "issue_date": "2024-01-01", "due_date": "2024-01-01", "paid_date": "2024-01-01", "public_url_expires_on": "2024-01-21" }, "event_type": "void_remainder", "event_data": { "credit_note_attributes": {}, "memo": "memo0", "applied_amount": "applied_amount2", "transaction_time": "2016-03-13T12:52:32.123Z" } } ``` ##### Aggregated Entitlement Value Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/aggregated-entitlement-value # Data Type `Boolean | Decimal | String` # Cases | Type | | --- | | `Boolean` | | `Decimal` | | `String` | # Boolean ## Initialization Code ### Example ```bash false ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Allocation Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Allocation Previous Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-previous-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Allocation Preview Item Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-preview-item-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Allocation Preview Item Previous Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/allocation-preview-item-previous-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Invoice-Event-Payment Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/invoice-event-payment A nested data structure detailing the method of payment # Data Type `Payment Method Apple Pay | Payment Method Bank Account | Payment Method Credit Card | Payment Method External | Payment Method Paypal` # Cases | Type | | --- | | [`Payment Method Apple Pay`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-apple-pay) | | [`Payment Method Bank Account`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-bank-account) | | [`Payment Method Credit Card`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-credit-card) | | [`Payment Method External`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-external) | | [`Payment Method Paypal`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-method-paypal) | # Payment Method Apple Pay ## Initialization Code ### Example ```bash { "type": "apple_pay" } ``` # Payment Method Bank Account ## Initialization Code ### Example ```bash { "masked_account_number": "masked_account_number2", "masked_routing_number": "masked_routing_number2", "type": "bank_account" } ``` # Payment Method Credit Card ## Initialization Code ### Example ```bash { "card_brand": "card_brand4", "masked_card_number": "masked_card_number0", "type": "credit_card" } ``` # Payment Method External ## Initialization Code ### Example ```bash { "details": "details4", "kind": "kind2", "memo": "memo8", "type": "external" } ``` # Payment Method Paypal ## Initialization Code ### Example ```bash { "email": "email2", "type": "paypal_account" } ``` ##### Calendar Billing Snap Day Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/calendar-billing-snap-day # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Component Allocation Change Allocated Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/component-allocation-change-allocated-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Component Price Point Assignment Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/component-price-point-assignment-price-point # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Coupon Payload Percentage Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/coupon-payload-percentage # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Create Allocation Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-allocation-price-point-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Create Component Price Point Request Price Point Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-component-price-point-request-price-point # Data Type `Create Component Price Point | Create Prepaid Usage Component Price Point` # Cases | Type | | --- | | [`Create Component Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-point) | | [`Create Prepaid Usage Component Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepaid-usage-component-price-point) | # Create Component Price Point ## Initialization Code ### Example ```bash { "name": "name0", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "unit_price": 23.26 } ], "use_site_exchange_rate": true } ``` # Create Prepaid Usage Component Price Point ## Initialization Code ### Example ```bash { "name": "name0", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "unit_price": 23.26 } ], "overage_pricing": { "pricing_scheme": "stairstep" }, "use_site_exchange_rate": true } ``` ##### Create Component Price Points Request Price Points Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-component-price-points-request-price-points # Data Type `Create Component Price Point | Create Prepaid Usage Component Price Point` # Cases | Type | | --- | | [`Create Component Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-component-price-point) | | [`Create Prepaid Usage Component Price Point`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-prepaid-usage-component-price-point) | # Create Component Price Point ## Initialization Code ### Example ```bash { "name": "name0", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "unit_price": 23.26 } ], "use_site_exchange_rate": true } ``` # Create Prepaid Usage Component Price Point ## Initialization Code ### Example ```bash { "name": "name0", "pricing_scheme": "per_unit", "prices": [ { "starting_quantity": 242, "unit_price": 23.26 } ], "overage_pricing": { "pricing_scheme": "stairstep" }, "use_site_exchange_rate": true } ``` ##### Create Invoice Coupon Percentage Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-coupon-percentage # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Create Invoice Coupon Amount Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-coupon-amount # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Create Invoice Coupon Product Family Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-coupon-product-family-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Create Invoice Item Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-quantity # Data Type `Decimal | String` # Cases | Type | | --- | | `Decimal` | | `String` | # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Invoice Item Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-unit-price # Data Type `Decimal | String` # Cases | Type | | --- | | `Decimal` | | `String` | # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Invoice Item Product Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-product-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Create Invoice Item Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-component-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Create Invoice Item Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-price-point-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Create Invoice Item Product Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-item-product-price-point-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Create Invoice Payment Amount Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-invoice-payment-amount # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Create Metafields Request Metafields Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-metafields-request-metafields # Data Type `Create Metafield | array` # Cases | Type | | --- | | [`Create Metafield`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metafield) | | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/create-metafield) | # Create Metafield ## Initialization Code ### Example ```bash { "name": "my_field", "scope": { "csv": "0", "invoices": "0", "statements": "0", "portal": "0", "public_show": "0", "public_edit": "0" }, "input_type": "text", "enum": [ "string" ] } ``` # array ## Initialization Code ### Example ```bash [ {} ] ``` ##### Create Multi Invoice Payment Amount Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-multi-invoice-payment-amount # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Create or Update Segment Price Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-or-update-segment-price-unit-price # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Create Payment Profile Expiration Month Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-payment-profile-expiration-month # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Payment Profile Expiration Year Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-payment-profile-expiration-year # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Segment Segment Property 1 Value Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-1-value # Data Type `String | Decimal | Number | Boolean` # Cases | Type | | --- | | `String` | | `Decimal` | | `Number` | | `Boolean` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # Number ## Initialization Code ### Example ```bash 0 ``` # Boolean ## Initialization Code ### Example ```bash false ``` ##### Create Segment Segment Property 2 Value Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-2-value # Data Type `String | Decimal | Number | Boolean` # Cases | Type | | --- | | `String` | | `Decimal` | | `Number` | | `Boolean` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # Number ## Initialization Code ### Example ```bash 0 ``` # Boolean ## Initialization Code ### Example ```bash false ``` ##### Create Segment Segment Property 3 Value Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-3-value # Data Type `String | Decimal | Number | Boolean` # Cases | Type | | --- | | `String` | | `Decimal` | | `Number` | | `Boolean` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # Number ## Initialization Code ### Example ```bash 0 ``` # Boolean ## Initialization Code ### Example ```bash false ``` ##### Create Segment Segment Property 4 Value Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-segment-segment-property-4-value # Data Type `String | Decimal | Number | Boolean` # Cases | Type | | --- | | `String` | | `Decimal` | | `Number` | | `Boolean` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # Number ## Initialization Code ### Example ```bash 0 ``` # Boolean ## Initialization Code ### Example ```bash false ``` ##### Create Subscription Offer Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-offer-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Create Subscription Component Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-component-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Subscription Component Unit Balance Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-unit-balance # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Subscription Component Allocated Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-allocated-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Create Subscription Component Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/create-subscription-component-price-point-id # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Customer Error Response Errors Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/customer-error-response-errors # Data Type `Customer Error | array` # Cases | Type | | --- | | [`Customer Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-error) | | `array` | # Customer Error ## Initialization Code ### Example ```bash {} ``` # array ## Initialization Code ### Example ```bash [ "String1" ] ``` ##### Customer Error Response 1 Errors Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/customer-error-response-1-errors # Data Type `Customer Error | array` # Cases | Type | | --- | | [`Customer Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/customer-error) | | `array` | # Customer Error ## Initialization Code ### Example ```bash {} ``` # array ## Initialization Code ### Example ```bash [ "String1" ] ``` ##### Deduct Service Credit Amount Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/deduct-service-credit-amount # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### EBB Component Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/ebb-component-unit-price # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Event Event Specific Data Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/event-event-specific-data # Data Type `Subscription Product Change | Subscription State Change | Payment Related Events | Refund Success | Component Allocation Change | Metered Usage | Prepaid Usage | Dunning Step Reached | Invoice Issued | Pending Cancellation Change | Prepaid Subscription Balance Changed | Proforma Invoice Issued | Subscription Group Signup Event Data | Credit Account Balance Changed | Prepayment Account Balance Changed | Payment Collection Method Changed | Item Price Point Changed | Custom Field Value Change | Chjs Tokenization Success | Chjs Tokenization Failure` # Cases | Type | | --- | | [`Subscription Product Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-product-change) | | [`Subscription State Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-state-change) | | [`Payment Related Events`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-related-events) | | [`Refund Success`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-success) | | [`Component Allocation Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/component-allocation-change) | | [`Metered Usage`](https://developers.maxio.com/http/advanced-billing-api/models/structures/metered-usage) | | [`Prepaid Usage`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-usage) | | [`Dunning Step Reached`](https://developers.maxio.com/http/advanced-billing-api/models/structures/dunning-step-reached) | | [`Invoice Issued`](https://developers.maxio.com/http/advanced-billing-api/models/structures/invoice-issued) | | [`Pending Cancellation Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/pending-cancellation-change) | | [`Prepaid Subscription Balance Changed`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepaid-subscription-balance-changed) | | [`Proforma Invoice Issued`](https://developers.maxio.com/http/advanced-billing-api/models/structures/proforma-invoice-issued) | | [`Subscription Group Signup Event Data`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-signup-event-data) | | [`Credit Account Balance Changed`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-account-balance-changed) | | [`Prepayment Account Balance Changed`](https://developers.maxio.com/http/advanced-billing-api/models/structures/prepayment-account-balance-changed) | | [`Payment Collection Method Changed`](https://developers.maxio.com/http/advanced-billing-api/models/structures/payment-collection-method-changed) | | [`Item Price Point Changed`](https://developers.maxio.com/http/advanced-billing-api/models/structures/item-price-point-changed) | | [`Custom Field Value Change`](https://developers.maxio.com/http/advanced-billing-api/models/structures/custom-field-value-change) | | [`Chjs Tokenization Success`](https://developers.maxio.com/http/advanced-billing-api/models/structures/chjs-tokenization-success) | | [`Chjs Tokenization Failure`](https://developers.maxio.com/http/advanced-billing-api/models/structures/chjs-tokenization-failure) | # Subscription Product Change ## Initialization Code ### Example ```bash { "previous_product_id": 126, "new_product_id": 12 } ``` # Subscription State Change ## Initialization Code ### Example ```bash { "previous_subscription_state": "previous_subscription_state2", "new_subscription_state": "new_subscription_state6" } ``` # Payment Related Events ## Initialization Code ### Example ```bash { "product_id": 42, "account_transaction_id": 58 } ``` # Refund Success ## Initialization Code ### Example ```bash { "refund_id": 12, "gateway_transaction_id": 182, "product_id": 168 } ``` # Component Allocation Change ## Initialization Code ### Example ```bash { "previous_allocation": 94, "new_allocation": 102, "component_id": 88, "component_handle": "component_handle8", "memo": "memo2", "allocation_id": 158 } ``` # Metered Usage ## Initialization Code ### Example ```bash { "previous_unit_balance": "previous_unit_balance6", "new_unit_balance": 2, "usage_quantity": 42, "component_id": 4, "component_handle": "component_handle8", "memo": "memo2" } ``` # Prepaid Usage ## Initialization Code ### Example ```bash { "previous_unit_balance": "previous_unit_balance0", "previous_overage_unit_balance": "previous_overage_unit_balance4", "new_unit_balance": 174, "new_overage_unit_balance": 146, "usage_quantity": 214, "overage_usage_quantity": 106, "component_id": 176, "component_handle": "component_handle4", "memo": "memo8", "allocation_details": [ {} ] } ``` # Dunning Step Reached ## Initialization Code ### Example ```bash { "dunner": { "state": "state8", "subscription_id": 194, "revenue_at_risk_in_cents": 98, "created_at": "2016-03-13T12:52:32.123Z", "attempts": 42, "last_attempted_at": "2016-03-13T12:52:32.123Z" }, "current_step": { "day_threshold": 198, "action": "action4", "send_email": false, "send_bcc_email": false, "send_sms": false }, "next_step": { "day_threshold": 30, "action": "action4", "send_email": false, "send_bcc_email": false, "send_sms": false } } ``` # Invoice Issued ## Initialization Code ### Example ```bash { "uid": "uid4", "number": "number8", "role": "role2", "due_date": "2016-03-13", "issue_date": "issue_date0", "paid_date": "paid_date6", "due_amount": "due_amount6", "paid_amount": "paid_amount4", "tax_amount": "tax_amount2", "refund_amount": "refund_amount0", "total_amount": "total_amount0", "status_amount": "status_amount4", "product_name": "product_name0", "consolidation_level": "consolidation_level4", "line_items": [ {} ] } ``` # Pending Cancellation Change ## Initialization Code ### Example ```bash { "cancellation_state": "cancellation_state8", "cancels_at": "2016-03-13T12:52:32.123Z" } ``` # Prepaid Subscription Balance Changed ## Initialization Code ### Example ```bash { "reason": "reason8", "current_account_balance_in_cents": 250, "prepayment_account_balance_in_cents": 44, "current_usage_amount_in_cents": 242 } ``` # Proforma Invoice Issued ## Initialization Code ### Example ```bash { "uid": "uid0", "number": "number2", "role": "role6", "delivery_date": "2016-03-13", "created_at": "2016-03-13T12:52:32.123Z", "due_amount": "due_amount2", "paid_amount": "paid_amount8", "tax_amount": "tax_amount6", "total_amount": "total_amount6", "product_name": "product_name6", "line_items": [ {} ] } ``` # Subscription Group Signup Event Data ## Initialization Code ### Example ```bash { "subscription_group": {}, "customer": {} } ``` # Credit Account Balance Changed ## Initialization Code ### Example ```bash { "reason": "reason8", "service_credit_account_balance_in_cents": 10, "service_credit_balance_change_in_cents": 116, "currency_code": "currency_code8", "at_time": "2016-03-13T12:52:32.123Z" } ``` # Prepayment Account Balance Changed ## Initialization Code ### Example ```bash { "reason": "reason4", "prepayment_account_balance_in_cents": 182, "prepayment_balance_change_in_cents": 206, "currency_code": "currency_code4" } ``` # Payment Collection Method Changed ## Initialization Code ### Example ```bash { "previous_value": "previous_value4", "current_value": "current_value2" } ``` # Item Price Point Changed ## Initialization Code ### Example ```bash { "item_id": 66, "item_type": "item_type6", "item_handle": "item_handle4", "item_name": "item_name8", "previous_price_point": {}, "current_price_point": {} } ``` # Custom Field Value Change ## Initialization Code ### Example ```bash { "event_type": "event_type2", "metafield_name": "metafield_name6", "metafield_id": 78, "old_value": "old_value2", "new_value": "new_value8", "resource_type": "resource_type2", "resource_id": 74 } ``` # Chjs Tokenization Success ## Initialization Code ### Example ```bash { "payment_profile": { "id": 44 } } ``` # Chjs Tokenization Failure ## Initialization Code ### Example ```bash { "errors": "errors2" } ``` ##### Get One Time Token Request Payment Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/get-one-time-token-request-payment-profile # Data Type `Get One Time Token Payment Profile | Get One Time Token Bank Account Payment Profile` # Cases | Type | | --- | | [`Get One Time Token Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/get-one-time-token-payment-profile) | | [`Get One Time Token Bank Account Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/get-one-time-token-bank-account-payment-profile) | # Get One Time Token Payment Profile ## Initialization Code ### Example ```bash { "first_name": "first_name2", "last_name": "last_name0", "masked_card_number": "masked_card_number0", "card_type": "routex", "expiration_month": 187.78, "expiration_year": 164.44, "current_vault": "braintree_blue", "vault_token": "vault_token4", "billing_address": "billing_address4", "billing_city": "billing_city0", "billing_country": "billing_country6", "billing_state": "billing_state6", "billing_zip": "billing_zip0", "payment_type": "payment_type2", "disabled": false, "site_gateway_setting_id": 232 } ``` # Get One Time Token Bank Account Payment Profile ## Initialization Code ### Example ```bash { "first_name": "first_name8", "last_name": "last_name6", "current_vault": "maxp", "vault_token": "vault_token0", "billing_address": "billing_address0", "billing_city": "billing_city4", "billing_country": "billing_country2", "billing_state": "billing_state8", "billing_zip": "billing_zip6", "bank_name": "bank_name6", "masked_bank_routing_number": "masked_bank_routing_number6", "masked_bank_account_number": "masked_bank_account_number0", "bank_account_type": "checking", "bank_account_holder_type": "personal", "payment_type": "payment_type2", "disabled": false, "site_gateway_setting_id": 254 } ``` ##### Issue Service Credit Amount Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/issue-service-credit-amount # Data Type `Decimal | String` # Cases | Type | | --- | | `Decimal` | | `String` | # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Metafield Enum Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/metafield-enum # Data Type `String | array` # Cases | Type | | --- | | `String` | | `array` | # String ## Initialization Code ### Example ```bash "String0" ``` # array ## Initialization Code ### Example ```bash [ "String1" ] ``` ##### Metered Component Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/metered-component-unit-price # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Metered Usage New Unit Balance Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/metered-usage-new-unit-balance # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### On Off Component Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/on-off-component-unit-price # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Payment Profile Attributes Expiration Month Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/payment-profile-attributes-expiration-month # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Payment Profile Attributes Expiration Year Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/payment-profile-attributes-expiration-year # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Payment-Profile Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/payment-profile # Data Type `Apple Pay Payment Profile | Bank Account Payment Profile | Credit Card Payment Profile | Paypal Payment Profile` # Cases | Type | | --- | | [`Apple Pay Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/apple-pay-payment-profile) | | [`Bank Account Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/bank-account-payment-profile) | | [`Credit Card Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/credit-card-payment-profile) | | [`Paypal Payment Profile`](https://developers.maxio.com/http/advanced-billing-api/models/structures/paypal-payment-profile) | # Apple Pay Payment Profile ## Initialization Code ### Example ```bash { "payment_type": "apple_pay" } ``` # Bank Account Payment Profile ## Initialization Code ### Example ```bash { "payment_type": "bank_account", "verified": false } ``` # Credit Card Payment Profile ## Initialization Code ### Example ```bash { "id": 10088716, "first_name": "Test", "last_name": "Subscription", "masked_card_number": "XXXX-XXXX-XXXX-1", "card_type": "bogus", "expiration_month": 1, "expiration_year": 2022, "customer_id": 14543792, "current_vault": "bogus", "vault_token": "1", "billing_address": "123 Montana Way", "billing_city": "Billings", "billing_state": "MT", "billing_zip": "59101", "billing_country": "US", "customer_vault_token": "customer_vault_token2", "billing_address_2": "", "payment_type": "credit_card", "site_gateway_setting_id": 1, "gateway_handle": "gateway_handle8" } ``` # Paypal Payment Profile ## Initialization Code ### Example ```bash { "payment_type": "paypal_account" } ``` ##### Prepaid Usage New Unit Balance Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/prepaid-usage-new-unit-balance # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Prepaid Usage New Overage Unit Balance Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/prepaid-usage-new-overage-unit-balance # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Prepaid Usage Component Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/prepaid-usage-component-unit-price # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Price Starting Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/price-starting-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Price Ending Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/price-ending-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Price Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/price-unit-price # Data Type `Decimal | String` # Cases | Type | | --- | | `Decimal` | | `String` | # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Quantity Based Component Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/quantity-based-component-unit-price # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Reactivate Subscription Request Resume Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/reactivate-subscription-request-resume # Data Type `Boolean | Resume Options` # Cases | Type | | --- | | `Boolean` | | [`Resume Options`](https://developers.maxio.com/http/advanced-billing-api/models/structures/resume-options) | # Boolean ## Initialization Code ### Example ```bash false ``` # Resume Options ## Initialization Code ### Example ```bash {} ``` ##### Refund Consolidated Invoice Segment Uids Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/refund-consolidated-invoice-segment-uids # Data Type `array | String` # Cases | Type | | --- | | `array` | | `String` | # array ## Initialization Code ### Example ```bash [ "String1" ] ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Refund Invoice Request Refund Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/refund-invoice-request-refund # Data Type `Refund Invoice | Refund Consolidated Invoice` # Cases | Type | | --- | | [`Refund Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-invoice) | | [`Refund Consolidated Invoice`](https://developers.maxio.com/http/advanced-billing-api/models/structures/refund-consolidated-invoice) | # Refund Invoice ## Initialization Code ### Example ```bash { "amount": "amount8", "memo": "memo0", "payment_id": 0 } ``` # Refund Consolidated Invoice ## Initialization Code ### Example ```bash { "memo": "memo0", "payment_id": 46, "segment_uids": [ "String0", "String1" ] } ``` ##### Refund Prepayment Amount Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/refund-prepayment-amount # Data Type `String | Decimal` # Cases | Type | | --- | | `String` | | `Decimal` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` ##### Renewal Preview Component Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/renewal-preview-component-component-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Renewal Preview Component Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/renewal-preview-component-price-point-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Scheduled Renewal Configuration Item Request Renewal Configuration Item Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-configuration-item-request-renewal-configuration-item # Data Type `Scheduled Renewal Item Request Body Component | Scheduled Renewal Item Request Body Product` # Cases | Type | | --- | | [`Scheduled Renewal Item Request Body Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-item-request-body-component) | | [`Scheduled Renewal Item Request Body Product`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-item-request-body-product) | # Scheduled Renewal Item Request Body Component ## Initialization Code ### Example ```bash { "item_type": "Component", "item_id": 108 } ``` # Scheduled Renewal Item Request Body Product ## Initialization Code ### Example ```bash { "item_type": "Product", "item_id": 32 } ``` ##### Scheduled Renewal Product Price Point Price in Cents Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-product-price-point-price-in-cents # Data Type `String | Long` # Cases | Type | | --- | | `String` | | `Long` | # String ## Initialization Code ### Example ```bash "String0" ``` # Long ## Initialization Code ### Example ```bash 0 ``` ##### Scheduled Renewal Product Price Point Interval Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-product-price-point-interval # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Scheduled Renewal Update Request Renewal Configuration Item Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/scheduled-renewal-update-request-renewal-configuration-item # Data Type `Scheduled Renewal Item Request Body Component | Scheduled Renewal Item Request Body Product` # Cases | Type | | --- | | [`Scheduled Renewal Item Request Body Component`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-item-request-body-component) | | [`Scheduled Renewal Item Request Body Product`](https://developers.maxio.com/http/advanced-billing-api/models/structures/scheduled-renewal-item-request-body-product) | # Scheduled Renewal Item Request Body Component ## Initialization Code ### Example ```bash { "item_type": "Component", "item_id": 108 } ``` # Scheduled Renewal Item Request Body Product ## Initialization Code ### Example ```bash { "item_type": "Product", "item_id": 32 } ``` ##### Segment Segment Property 1 Value Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-1-value # Data Type `String | Decimal | Number | Boolean` # Cases | Type | | --- | | `String` | | `Decimal` | | `Number` | | `Boolean` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # Number ## Initialization Code ### Example ```bash 0 ``` # Boolean ## Initialization Code ### Example ```bash false ``` ##### Segment Segment Property 2 Value Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-2-value # Data Type `String | Decimal | Number | Boolean` # Cases | Type | | --- | | `String` | | `Decimal` | | `Number` | | `Boolean` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # Number ## Initialization Code ### Example ```bash 0 ``` # Boolean ## Initialization Code ### Example ```bash false ``` ##### Segment Segment Property 3 Value Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-3-value # Data Type `String | Decimal | Number | Boolean` # Cases | Type | | --- | | `String` | | `Decimal` | | `Number` | | `Boolean` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # Number ## Initialization Code ### Example ```bash 0 ``` # Boolean ## Initialization Code ### Example ```bash false ``` ##### Segment Segment Property 4 Value Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/segment-segment-property-4-value # Data Type `String | Decimal | Number | Boolean` # Cases | Type | | --- | | `String` | | `Decimal` | | `Number` | | `Boolean` | # String ## Initialization Code ### Example ```bash "String0" ``` # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # Number ## Initialization Code ### Example ```bash 0 ``` # Boolean ## Initialization Code ### Example ```bash false ``` ##### Subscription Component Unit Balance Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-component-unit-balance # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Subscription Component Allocated Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-component-allocated-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Subscription Custom Price Price in Cents Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-price-in-cents # Data Type `String | Long` # Cases | Type | | --- | | `String` | | `Long` | # String ## Initialization Code ### Example ```bash "String0" ``` # Long ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Custom Price Interval Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-interval # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Custom Price Trial Price in Cents Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-trial-price-in-cents # Data Type `String | Long` # Cases | Type | | --- | | `String` | | `Long` | # String ## Initialization Code ### Example ```bash "String0" ``` # Long ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Custom Price Trial Interval Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-trial-interval # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Custom Price Initial Charge in Cents Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-initial-charge-in-cents # Data Type `String | Long` # Cases | Type | | --- | | `String` | | `Long` | # String ## Initialization Code ### Example ```bash "String0" ``` # Long ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Custom Price Expiration Interval Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-custom-price-expiration-interval # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Group Create Error Response Errors Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-create-error-response-errors # Data Type `Subscription Group Members Array Error | Subscription Group Single Error | String` # Cases | Type | | --- | | [`Subscription Group Members Array Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-members-array-error) | | [`Subscription Group Single Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-single-error) | | `String` | # Subscription Group Members Array Error ## Initialization Code ### Example ```bash { "members": [ "members6" ] } ``` # Subscription Group Single Error ## Initialization Code ### Example ```bash { "subscription_group": "subscription_group2" } ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Subscription Group Create Error Response 1 Errors Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-create-error-response-1-errors # Data Type `Subscription Group Members Array Error | Subscription Group Single Error | String` # Cases | Type | | --- | | [`Subscription Group Members Array Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-members-array-error) | | [`Subscription Group Single Error`](https://developers.maxio.com/http/advanced-billing-api/models/structures/subscription-group-single-error) | | `String` | # Subscription Group Members Array Error ## Initialization Code ### Example ```bash { "members": [ "members6" ] } ``` # Subscription Group Single Error ## Initialization Code ### Example ```bash { "subscription_group": "subscription_group2" } ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Subscription Group Credit Card Full Number Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-credit-card-full-number # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Group Credit Card Expiration Month Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-credit-card-expiration-month # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Group Credit Card Expiration Year Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-credit-card-expiration-year # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Group Signup Component Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-component-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Group Signup Component Allocated Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-allocated-quantity # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Group Signup Component Unit Balance Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-unit-balance # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Subscription Group Signup Component Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/subscription-group-signup-component-price-point-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Update Invoice Item Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-quantity # Data Type `Decimal | String` # Cases | Type | | --- | | `Decimal` | | `String` | # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Update Invoice Item Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-unit-price # Data Type `Decimal | String` # Cases | Type | | --- | | `Decimal` | | `String` | # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Update Invoice Item Product Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-product-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Update Invoice Item Component Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-component-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Update Invoice Item Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-price-point-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Update Invoice Item Product Price Point Id Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-invoice-item-product-price-point-id # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Update Metafields Request Metafields Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-metafields-request-metafields # Data Type `Update Metafield | array` # Cases | Type | | --- | | [`Update Metafield`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metafield) | | [`array`](https://developers.maxio.com/http/advanced-billing-api/models/structures/update-metafield) | # Update Metafield ## Initialization Code ### Example ```bash {} ``` # array ## Initialization Code ### Example ```bash [ {} ] ``` ##### Update Price Ending Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-price-ending-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Update Price Unit Price Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-price-unit-price # Data Type `Decimal | String` # Cases | Type | | --- | | `Decimal` | | `String` | # Decimal ## Initialization Code ### Example ```bash 0.0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Update Price Starting Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-price-starting-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ##### Update Subscription Snap Day Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-subscription-snap-day # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Update Subscription Net Terms Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/update-subscription-net-terms # Data Type `String | Number` # Cases | Type | | --- | | `String` | | `Number` | # String ## Initialization Code ### Example ```bash "String0" ``` # Number ## Initialization Code ### Example ```bash 0 ``` ##### Usage Quantity Source: https://developers.maxio.com/http/advanced-billing-api/models/oneof-anyof-definitions/usage-quantity # Data Type `Number | String` # Cases | Type | | --- | | `Number` | | `String` | # Number ## Initialization Code ### Example ```bash 0 ``` # String ## Initialization Code ### Example ```bash "String0" ``` ## Guided Walkthroughs ### Create Product Catalog Source: https://developers.maxio.com/http/guided-walkthroughs/create-product-catalog This is the starter content ### Create Subscription Source: https://developers.maxio.com/http/guided-walkthroughs/create-subscription This is the starter content ### Manage Billing Portal Source: https://developers.maxio.com/http/guided-walkthroughs/manage-billing-portal This is the starter content ## Development Tools ### Using the Developer Portal Source: https://developers.maxio.com/http/development-tools/using-the-developer-portal Maxio Advanced Billing provides an HTTP-based API that conforms to the principles of REST. You can use the Developer Portal to test API requests with your sandbox setup. Maxio also offers Advanced Billing SDKs to support the following community tech stacks: - [Python](https://pypi.org/project/maxio-advanced-billing-sdk/) - [Ruby](https://rubygems.org/gems/maxio-advanced-billing-sdk/) - [PHP](https://packagist.org/packages/maxio/advanced-billing-sdk) - [C#/.NET](https://www.nuget.org/packages/Maxio.AdvancedBillingSdk/) - [Typescript](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/) - [Java](https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk) - [Go](https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk) This page walks you through how to use the developer portal to make API requests and [access the SDKs](https://developers.maxio.com/http/development-tools/using-the-developer-portal#code-language-selection-and-sdk-access). # Make your first Maxio Advanced Billing API request Follow these steps to make a simple request to get a list of Sites in your sandbox. ## Step 1: Set up your sandbox [Sign-up](https://app.chargify.com/signup/maxio-billing-sandbox) for your [test site](https://maxio.zendesk.com/hc/en-us/articles/24250712113165-Testing-Overview). ## Step 2: Get an API key [Configure your Advanced Billing API credentials](https://maxio.zendesk.com/hc/en-us/articles/24294819360525-API-Keys). You'll use the generated API key to authenticate requests. ## Step 3: Configure your first API request Use the cURL command-line tool to make an HTTP [Get Site](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sites/read-site) request. 1. Copy the command below into your terminal. 2. Replace "your-maxio-ab-subdomain" with the subdomain of your Maxio Advanced Billing sandbox. 3. Replace "your-api-key" with the API key you configured in Step 2. This is your `BasicAuthUserName`, and for testing your `BasicAuthPassword` is x. See [Authentication](https://developers.maxio.com/http/getting-started/authentication) for more information. 4. Run the command. ``` curl -X GET \ --url 'https://"your-maxio-ab-subdomain".chargify.com/site.json' \ -H 'Accept: application/json' \ -u '"your-api-key":x' ``` ## Step 4: Validate the response The Maxio API returns JSON responses similar to the one shown. JSON is returned as the primary and recommended format. XML is also provided as a backwards-compatible option for merchants who require it. ```JSON { "site": { "id": 00000, "name": "test-b2b-site", "subdomain": "test-acme-clone", "currency": "USD", "seller_id": 00000, "non_primary_currencies": ["BRL"], "relationship_invoicing_enabled": true, "customer_hierarchy_enabled": false, "whopays_enabled": false, "whopays_default_payer": "self-ungrouped", "default_payment_collection_method": "automatic", "organization_address": { "street": null, "line2": null, "city": null, "state": null, "zip": null, "country": null, "name": "Your Org Name", "phone": null, }, "tax_configuration": { "kind": "custom", "fully_configured": true, "destination_address": "shipping_then_billing", }, "net_terms": { "default_net_terms": 0, "automatic_net_terms": 0, "remittance_net_terms": 0, "net_terms_on_remittance_signups_enabled": false, "custom_net_terms_enabled": false, }, "test": true, }, } ``` # Test endpoints in the Developer Portal Now that you've made a simple request using the command line, you have the configuration information (an API key and subdomain) to test endpoints directly in the Developer Portal. Creating a customer is a good place to start. The following steps show an HTTP formatted API request to create a customer. You can [select a coding language](https://developers.maxio.com/http/development-tools/using-the-developer-portal#code-language-selection-and-sdk-access) to view the examples in the language of your choice. 1. Open the [Create Customer](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/customers/create-customer) reference page in a new window or tab. 2. To configure the subdomain for the API requests, click the **API Configurations** dropdown and edit the **Base URL** with the subdomain for your sandbox site.
![Configure window](static/images/about-the-api/configure.png)
3. To configure [authentication](https://developers.maxio.com/http/getting-started/authentication), click the **Authentication** dropdown and enter the API key for your sandbox site in `BasicAuthUserName`. Enter _X_ in `BasicAuthPassword`.
![BasicAuth dropdown](static/images/about-the-api/basic-auth-dropdown.png)
4. View the customer parameters in the **API Code Playground** section. You can leave the default example parameters or change them. The request is updated with your changes.
![API Code Playground](static/images/about-the-api/code-playground.png)
5. Once the parameters are set, click **TRY IT OUT**. You should get a response in the format documented in the **Responses** section.
![Configure window](static/images/about-the-api/response.png)
> **Note:** > You can expand the Request and Response window for easier viewing: >
> ![Expand option](static/images/about-the-api/expand.png) >
> You can also copy the request to run in your local terminal, or developer environment if you have selected a coding language: >
> ![Copy option](static/images/about-the-api/copy.png) >
>
# Code language selection and SDK access The developer portal allows you to view the documentation examples in the code language of your choice and access an SDK for your selected language. 1. Select a language from the language selector located at the top right of the portal. The documentation examples throughout the portal are updated to reflect the selection.
![Language selector](static/images/about-the-api/dev-portal-lang-selector-ex.png)
2. To view SDK access options, click **Get SDK**.
![Get SDK](static/images/about-the-api/dev-portal-get-sdk.png)
3. To install the SDK you can run the install command, or click the link to the package manager where you can download and install the SDK. For Go, clicking **Get SDK** downloads the SDK package as a .zip file through your browser instead of opening the SDK access options. If you prefer to install the Go SDK from a package manager, use the [ab-golang-sdk package](https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk). # What's next? Now that you've learned the basics, try these detailed walkthroughs to learn key concepts of Advanced Billing and the API: - Managing [sites](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/sites). - Creating [products](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/product-catalog#product) and how they control what you bill customers. - Creating [subscriptions](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/subscription-signup) (i.e., signing up customers). ### Maxio.js (formerly Chargify.js) Source: https://developers.maxio.com/http/development-tools/maxio-js-formerly-chargify-js > **NEW Chargify.js is now Maxio.js** > > The Chargify.js library has been renamed to Maxio.js. This change is fully backwards compatible, so existing integrations continue to work without code changes. The developer documentation is being updated incrementally, so you will continue to see Chargify.js referenced in code examples and screenshots. Maxio.js is a powerful tool that can be used to streamline your existing API-based workflows in Advanced Billing. Maxio.js can be used to easily construct signup and payment profile updates on your existing sites. For complete details on configuration, examples, and release history, see the [product documentation articles](https://docs.maxio.com/hc/en-us/articles/38163190843789-Maxio-js-Overview#maxio-js-overview-0-0). ### Embeddable Components #### Overview Source: https://developers.maxio.com/http/development-tools/embeddable-components/overview # Embeddable Components for Self-Service Subscription Management Embeddable Components (also known as Reusable Components) are self-service, headless components that can be used by developers to set up and customize a subscription journey with in-app experiences. This is done through the delivery of a TypeScript SDK. This set of front-end interface tools is geared to enhance both the developer experience and the subscriber end-user experience. # Why use Embeddable Components Embeddable Components allow merchants and decision-makers to create custom subscriber experiences that meet the specific needs of the end-user, which are helpful for self-servicing subscriptions in a product-led strategy approach. They are configured within your billing portal configuration settings. You can enable or disable functionalities through Advanced Billing or through code customization. Embeddable Components are highly configurable and can be styled using dynamic or static code to match a company's brand or the website's look-and-feel. Embeddable Components are categorized into three distinct functions: - **Billing History**
Allows viewing, sorting and filtering of customer Invoices. - **Subscription Manager**
Enables the end-customer to self-serve and manage the subscription. (including, but not limited to, subscription details, payment profiles, product migrations, coupon application, and so forth). - **Customer Details**
Allows viewing and editing of customer contact details, address, and custom fields. # Technical Details The Embeddable Components module doesn't directly communicate with the Maxio Advanced Billing API. Rather, it leverages the Embeddable Components Backend to handle all frontend requests, perform authentication, and transform the data into a format that can be consumed by the Advanced Billing API. The responses are then mapped back to the Embeddable Components module, in suitable form. ![Technical Details](static/images/embeddable-components/overview/technical-details-under-the-hood.png) ## Communication Between Frontend and the Backend All requests made by the Embeddable Components come from a web browser application provided by the merchant. To authenticate with the Embeddable Components Backend, merchants must provide a JSON Web Token (JWT) signed with the Token Sign in Key that is generated when launching the integration. This generated sign-in key is Base64 encoded. The token should contain a subject claim equal to the Maxio customer reference (which maps the merchant's internal user representation to the customer reference at Maxio). The Embeddable Components Backend verifies the token signature, using the Token Sign in Key. This allows requests to be executed on behalf of a specific user while maintaining security. The token's claim issued at date is validated using the site's maximum token expiration time, which is currently one hour. This can be lowered using the `exp` claim, _but it cannot be longer than one hour_. It's possible to add a _second_ Token Sign in Key to allow for key rotation without downtime. The Embeddable Components Backend would accept both keys to verify the token signature. The Embeddable Components Backend also uses Cross-Origin Resource Sharing (CORS) to filter and match requests. Merchants can configure a set of Origin patterns that specify the sites where they want to embed the components. When a request is received by the backend, it first filters the provided Origin against all the patterns stored in the database. It then proceeds to the next step of JWT authorization for sites that only match the filtered patterns. The domain patterns can either be exact domains (for example, keen.io, sub.keen.io) or patterns that use wildcards ( like *keen.io or *n.io). > The wildcard asterisk (`*`) must be the first character and two segments must be provided. The wildcard > cannot match the entire first segment. For example, `*.com` is not allowed. ## Authentication Endpoint The Authentication Endpoint is a minimal backend component that merchants need to provide for their Embeddable Components. This endpoint is used by the components to fetch the token required to sign requests to the Embeddable Components Backend using the merchant Application backend for the authenticated user. Merchants need to specify the URL of this endpoint in the components' frontend initialization code so that the components know where to fetch the token from. The endpoint should return a JSON object with the `token` field containing the signed token value. For example: ```json { "token": "eyJg…" } ``` The token should be signed using the Base64 decoded Token Sign in Key. The subject of the token should be set to the Maxio Customer Reference of a customer referring to an authenticated user in the merchant's application. The iat (issued at) claim must be included in the token. Token payload: - **sub** (subject) - Required string. Matches the Customer Reference in Advanced Billing. - **iat** (issued at) - Required timestamp. Used for token expiration validation. By default, the token is rejected if it's older than one hour. - **exp** (expiration) - _Optional timestamp._ Used for token expiration validation. For security reasons, you can only decrease the default token expiration to less than one hour. The token is rejected if `exp` is set to a time greater than one hour. For Authentication endpoint examples, see the [Code Samples](https://maxio.zendesk.com/hc/en-us/articles/24294708528653) article. #### Configurations Source: https://developers.maxio.com/http/development-tools/embeddable-components/configurations # Step 1: Enable and Set Up Embeddable Components in Advanced Billing > _For **Early Access**, contact the Maxio Support Team for assistance._ First, identify the domain where you will host the website and generate a sign-in key for authenticated access to the host server. > _The localhost domain will need to be added to develop the integration on a local machine. Once development is done, > remove the localhost domain._ 1. From Advanced Billing, go to **Config > Integrations > Embeddable Components**.
![Enable Components Integration](static/images/embeddable-components/configurations/enable-components-integration.png) 2. Enter a **Domain** and click **Enable Maxio Components**.
This automatically generates a Base64 encoded Token Sign in Key.
![Token Sign in Key](static/images/embeddable-components/configurations/token-sign-in-key.png) 3. Copy and store this token for later access.
Should you lose this key, you will need to generate a new one. 4. Go to **Config** > **Settings** > **Billing Portal** and click **Enabled for this site**.
![Enable Billing Portal Setting](static/images/embeddable-components/configurations/enable-billing-portal-setting.png) 5. Select which **Features** will be available to your Customers. > Some unchecked Advanced Billing configurations are not needed for Embeddable Components. For example, **Remove > Maxio Advanced Billing Logo** does not have influence on your self-hosted application. Others, like **Allow > Plan Changes** will have an impact on your self-hosted application. Ensure the necessary > features > are enabled to meet the needs of your implementation. 6. Click **Save**. # Step 2: Install the Components from Node Packaged Modules (NPM) Package Manager > _Installing node.js also installs npm. Node.js is also required to run the vue.js or react.js examples._ 1. [Access the self-service package](https://www.npmjs.com/package/@maxio-com/self-service).
![self-service npm package](static/images/embeddable-components/configurations/self-service-npm-package-1.png)
The Readme provides installation instructions, points to vue.js and react.js examples, and goes through repository setup and use.
![self-service npm package](static/images/embeddable-components/configurations/self-service-npm-package-2.png) 2. Create a project directory locally on your machine. 3. Open a command window/terminal and navigate to the local project directory you just created. 4. To download and install the dependencies, run the given npm CLI command:
`npm install @maxio-com/self-service`
![npm install terminal](static/images/embeddable-components/configurations/npm-install-terminal.png)
A successful installation creates the **node_modules** directory in your local project folder. In this directory, you will find the `@maxio-com\self-service` directory.
![npm modules directory](static/images/embeddable-components/configurations/node-modules-directory.png) # Step 3: Use the Examples To start using these components right away, use the out-of-the-box Vue or React examples provided. > _The following set-up example uses vue.js on localhost._ ## Setting up the Vue.js Self-Service Example 1. From the **npmjs.com** > **Headless Billing Portal** Readme page > **Installation and usage**, go to #4 Examples and click the **vue-self-service-example** link.
![Vue.js Self-Service Example](static/images/embeddable-components/configurations/vue-js-self-service-example.png)
This takes you to the maxio-com vue.js example GitHub repository. 2. Clone the repository to your local environment:
`git clone https://github.com/maxio-com/vue-self-service-example` 3. Open the cloned repository and install the dependencies:
`pnpm install`
or
`npm install` 4. Run the development server (respectively):
`pnpm run dev`
or
`npm run dev` ## Viewing the Example Application To view the Embeddable Components from an example application, open http://localhost:3000/. ![Embeddable Components localhost](static/images/embeddable-components/configurations/embeddable-components-localhost.png) ## Configuring the Example 1. From your editor, go to **src** > **components**, and open **BillingHistory.vue**. 2. Edit the following options: | **Option** | **Description** | **Example** | | :---------------- | :------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------- | | itemsPerPage | Sets the number of items to list per page. | itemsPerPage: 10, | | paginationVariant | Sets the pagination type:
- simple (infinite scroll)
- pages (page pagination) | paginationVariant: 'simple', | | enableFiltering | Enable (true)/disable (false) billing history filtering. | enableFiltering: true, | | visibleColumns | Set the array for the billing history fields (columns) to show on the table. | visibleColumns: [
"invoice_number",
"issue_date",
"due_date",
"total_amount",
"amount_due",
"status"
] | _Example of Billing History Component options:_
![Example of Billing History Component options](static/images/embeddable-components/configurations/example-of-billing-history-component-options.png) 3. Go back to the example application in your browser, open the **Billing History** page, http://localhost:3000/billing-history, and note the changes you made. 4. Next, open **CustomerDetails.vue** and edit the following options: | **Option** | **Description** | **Example** | | :------------------------ | :------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | customerDataVisibleFields | Set the array that contains the customer data fields visible to the user. | customerDataVisibleFields: [
"address",
"address2",
"city",
"state",
"zip",
"firstName",
"lastName",
"email",
"ccEmails",
"organization",
"vatNumber",
"phoneNumber",
"country"
] | _Example of Customer Details Component options:_
![Example of Customer Details Component options](static/images/embeddable-components/configurations/example-of-customer-details-component-options.png) 5. Finally, open **SubscriptionManager.vue** and edit the following options: | **Option** | **Description** | **Example** | | ---------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | allocationFlow | Set how component allocation flow is presented:
- modal
- page | | | subscription | Subscription settings object:
- details
Set how subscription details are presented. | | | paymentProfileEditFlow | Set which form payment profile edit flow is presented.
- modal
- page | | | paymentProfileRequiredFields | Set the array that contains the _required_ payment profile address fields. | | | addressFields | Set the array that contains the payment profile address fields visible to the user. | addressFields: [
"address",
"address2",
"city",
"state",
"zip",
"country"
] | _Example of Subscription Manager Component options:_
![Example of Customer Details Component options](static/images/embeddable-components/configurations/example-of-subscription-manager-component-options.png) # Step 4: Optional Configurations ## Use as a Standalone Library from CDN To use Embeddable Components as a standalone library from a Content Delivery Network (CDN) do the following. 1. Add this script that points to the library in CDN to your page:
`` 2. Initialize Components. ```javascript const factory = new window.Maxio.Components(options); // Render Billing History to the document.body element let element = factory.create("billing-history"); element.render(document.body); ``` 3. Your local environment should match the domain you configured (add localhost if you want to run it locally).
Example: ```html ``` ## Additional Advanced Billing Configurations ### Custom Fields (Metafields) You can set the level of access for each custom field (or metafield) to be viewable and editable for customers using Embeddable Components. These settings apply to both subscription- and customer-level custom fields. The scopes are named **public_show** and **public_edit**, respectively. Setting 'public_show' to '1' makes the custom field visible in the Embeddable Components application, while setting 'public_edit' to '1' makes it editable. > _Editing and viewing these metafields settings are currently only supported using the API._ ### Individual Component Configuration Apart from the global components update setting, each individual component has an additional property controlling whether it can be updated using a billing portal. This property option is also respected by Embeddable Components. Do the following to enable the Billing Portal for a component. 1. From Advanced Billing, go to **Catalog** > **Products**. 2. Select the **Products family** to which the component belongs. 3. Click the **Components** tab.
![Components tab](static/images/embeddable-components/configurations/components-tab.png) 4. Choose a component. 5. Scroll to the bottom of the component page, and for **Advanced Options** click **Edit**. 6. Enable the **Billing Portal** option.
![Enable Billing Portal option](static/images/embeddable-components/configurations/enable-billing-portal-option.png) #### Version History Source: https://developers.maxio.com/http/development-tools/embeddable-components/version-history The latest version of `Embeddable Components` is available at the following URL: [@maxio-com/self-service](https://www.npmjs.com/package/@maxio-com/self-service) # 2026-06-23 (1.17.2 Latest) - [internal] Updated dependencies # 2026-04-03 (1.16.1) - [internal] Updated dependencies # 2026-02-18 (1.16.0) - [internal] added repository workflow automation # 2026-01-22 (1.15.1) Update dependencies to latest versions - [bugfix] Updated package.json and pnpm dependencies # 2024-12-02 (1.15.0) Improved subscription management by ensuring expired credit cards are linked to the active payment method. - [feature] Exclude active cc from rest - [feature] Move expired credit card to active payment method # 2024-11-20 (1.14.1) Fixed a typo in messaging on the configure subscription form. - [bugfix] Correct wording on configure subscription page # 2024-11-13 (1.14.0) Added versioning for translations while maintaining backward compatibility. Introduced versioned URLs. - [feature] Translations versioning # 2024-11-13 (1.13.3) Improved credit card validation form to properly highlight invalid fields. - [bugfix] Add expiration value to CreditCardPCIFields - [bugfix] Add missing field in createFieldsConfig - [bugfix] Change use of expiration value - [bugfix] Fix state select field - [bugfix] Get rid of selectedCountry state - [bugfix] Handle editing address - [bugfix] Make card expiration and card number always required # 2024-11-06 (1.13.2) Improved payment profile functionality by ensuring dropdowns stay open until an option is selected, and allowing forms to close when clicking the close button or outside the window. - [bugfix] Close select when user clicks outside element - [bugfix] Make solution global - [bugfix] Payment profile defects # 2024-11-05 (1.13.1) Fixed an issue where expired credit cards were not correctly marked as "expired." - [bugfix] Reflect expired flag # 2024-10-25 (1.13.0) Ensured that the subscription is immediately active after reactivation, regardless of whether the payment profile is new, expired, or up-to-date, providing a seamless experience for users. - [feature] Add card and active right away - [feature] Add dynamic content of createPaymentProfile - [feature] Add new reactivate subscription flow - [feature] Update case with up-to-date payment profile - [feature] Update subscription when add payment profile # 2024-10-16 (1.12.1) Added missing currency property for Subscription resource. - [bugfix] Add missing prop - [bugfix] Currency of subscriptions price # 2024-10-11 (1.12.0) Resolved problems with the form autocomplete feature to ensure smoother user input. - [bugfix] Add missing cvv - [feature] Make autocomplete disable # 2024-08-14 (1.11.6) Added Subscription components settings. - [bugfix] usedInBilling prop is null # 2024-07-30 (1.11.5) Made i18nSettings properties default. - [bugfix] Add new key for button - [bugfix] Defaults for i18nSettings - [bugfix] Make i18nSettings properties default # 2024-07-30 (1.11.4) Added i18nSettings properties to load default translations. Bug fixes and improvements. - [bugfix] Added DEFAULT_LOAD_PATH - [bugfix] Broken tests - [bugfix] Change content of cancel button - [bugfix] Change incorrect - [bugfix] Change to close - [bugfix] Define loadPath for i18n - [bugfix] Fix nextBillingAmount price after adding a coupon - [bugfix] Fixed CouponErrorCodes import - [bugfix] Issue with wrong refreshing next billing amount field - [bugfix] Issues with displaying subscriptionDetails - [bugfix] Remove instance of deleted file - [bugfix] Remove unnecessary useCoupons hook - [bugfix] Remove unused file - [bugfix] Translations - [bugfix] Typo - [bugfix] Use capital letter - [bugfix] Use static en in default_load_path # 2024-07-12 (1.11.3) Fixed total price value being displayed for Subscription resource. - [bugfix] Change total price value # 2024-07-02 (1.11.2) - [bugfix] Include plan_change_scheduled to the nextBillingAmount # 2024-06-28 (1.11.1) - [bugfix] Change reactive subscription error message # 2024-06-27 (1.11.0) Updated the Embeddable Components to respect billing portal settings. The discount section is now hidden when applying coupons is disabled. - [feature] Hide discount section when coupons setting is false # 2024-06-26 (1.10.1) Added a mechanism for fetching and handling subscription details in the app.
Introduced a new coupons prop to render coupon data in the Subscription component.
Implemented a custom hook `useSubscriptionDetailsService` for managing subscription details retrieval.
Updated test cases with `subscriptionDetails` constant for simulating subscription detail responses.
Enhanced API-related configurations and mock setups in SubscriptionContainer tests. - [bugfix] Fixed state result after fetch subscription details - [bugfix] invalid-billing-amount # 2024-06-03 (1.10.0) Improvement in session manager to refresh auth token if `exp` claim is missing - [bugfix] Set properly api url and request headers - [feature] Handle refresh token if exp date is missing # 2024-05-22 (1.9.6) - [bugfix] Update Content-Type header # 2024-04-29 (1.9.5) - [bugfix] Extend SessionManager to include async headers hook # 2024-03-26 (1.9.4) Migrated Storybook to the latest major version to improve compatibility and maintainability. - [feature] Migration from Storybook 6 to Storybook 8 # 2024-03-04 (1.9.3) Updated dependency management and tooling configuration to stabilize builds and test execution. - [bugfix] Freeze dependencies for minor updates only - [bugfix] Force Docker Compose compatibility with 4.16.0 - [bugfix] Fixed broken tests after dependency updates - [feature] Version update from 7 to 8 # 2023-08-11 (1.9.2) Improved payment profile serialization reliability and test coverage. - [bugfix] Fix payment profile property access - [bugfix] Adjust serializePaymentProfiles test - [bugfix] Add payment profile serializer test # 2023-07-28 (1.9.1) Improved visual consistency for subscription status tags. - [bugfix] Align cancelled Tag to have the same color - [bugfix] Roll back conflicting style change # 2023-07-20 (1.9.0) Enhanced modal display behavior in Storybook and product UI layouts. - [feature] Improve modal sizing in Storybook - [bugfix] Update max height handling for modal content # 2023-07-18 (1.8.1) Applied additional refinements to modal layout behavior. - [bugfix] Modal sizing polish for edge-case layouts # 2023-07-18 (1.8.0) Initial release of the modal sizing improvements for Reusable UI Components. - [feature] Introduce modal sizing updates for improved usability ## Help ### Getting Support Source: https://developers.maxio.com/http/help/getting-support The Maxio Advanced Billing API, while considered stable, is continually being improved. If you have issues integrating with the API or questions regarding the documentation, here are a few options to help you get the answers you need: - [Read the developer docs](https://developers.maxio.com/http/getting-started/overview) - [Search the product documentation](https://maxio.zendesk.com/hc/en-us#availability) - [Contact support](https://docs.maxio.com/hc/en-us/articles/36005349562765-Contacting-Support) - [Open a support ticket](https://maxio.zendesk.com/hc/en-us/requests/new) - [Contact the sales team](mailto:sales@maxio.com) ### Announcements #### 2026 Announcements Source: https://developers.maxio.com/http/help/announcements/2026-announcements # Hybrid Pricing for Quantity-Based and Metered Components Quantity-Based and Metered Components can now combine a primary tiered, volume, or stairstep pricing model with a secondary pricing model for usage above an included threshold, billed together as a single invoice line item instead of multiple. See the [Hybrid Pricing](https://developers.maxio.com/http/getting-started/advanced-billing-concepts/hybrid-pricing) guide for requirements and API configuration. Hybrid Pricing is configured through the existing Components and Price Points endpoints. No new endpoints or request parameters were introduced. It requires Invoice-Centric Billing and must be enabled for your Site; contact your Maxio account team to turn it on. # NEW Catalog Experience and Terminology We’ve redesigned the Maxio Product Catalog to [give you more control](https://docs.maxio.com/hc/en-us/articles/44628847587341-Understand-Planless-Subscriptions) over how you package your offerings. As such, we’ve updated our terminology in the UI: ## UI vs API naming When the new catalog experience is enabled, the UI uses updated labels: - Objects that were previously called Products in the UI are now called Plans. - Objects that were previously called Components in the UI are now called Products. These changes are limited to the application UI. No API object names or endpoints are being renamed as part of this change, and existing integrations continue to work as they do today: - UI Plans still map to the existing product objects in the API. - UI Products still map to the existing component objects in the API. # SDK releases You can view release information on the package manager for a client library: - [Python](https://pypi.org/project/maxio-advanced-billing-sdk/) - [Ruby](https://rubygems.org/gems/maxio-advanced-billing-sdk/) - [PHP](https://packagist.org/packages/maxio/advanced-billing-sdk) - [C#/.NET](https://www.nuget.org/packages/Maxio.AdvancedBillingSdk/) - [Typescript](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/) - [Java](https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk) - [Go](https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk) Or you can visit the client library's release page in source control for release details: # August SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/10.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.10.0 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/10.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/10.0.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/10.0.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/10.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/10.0.0 # March SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/9.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.9.0 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/9.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/9.0.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/9.0.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/9.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/9.0.0 #### 2025 Announcements Source: https://developers.maxio.com/http/help/announcements/2025-announcements # Improved Configurations UX on endpoint pages Configurations to Try Out API calls are now conveniently located in a new section, allowing you to set up your environment, subdomain and credentials all in one place. ![Configuration section dropdown](static/images/announcements/config-section.png) You can view release information on the package manager for a client library: - [Python](https://pypi.org/project/maxio-advanced-billing-sdk/) - [Ruby](https://rubygems.org/gems/maxio-advanced-billing-sdk/) - [PHP](https://packagist.org/packages/maxio/advanced-billing-sdk) - [C#/.NET](https://www.nuget.org/packages/Maxio.AdvancedBillingSdk/) - [Typescript](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/) - [Java](https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk) - [Go](https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk) Or you can visit the client library's release page in source control for release details: # December SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/8.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.8.0 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/8.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/8.0.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/8.0.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/8.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/8.0.0 # September SDK Release Notes - C#/.Net:https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/7.0.1 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.7.1 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/7.0.1 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/7.0.1 - Java:https://github.com/maxio-com/ab-java-sdk/releases/tag/7.0.1 - Ruby:https://github.com/maxio-com/ab-ruby-sdk/releases/tag/7.0.1 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/7.0.1 # July SDK Release Notes - C#/.Net:https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/7.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.7.0 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/7.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/7.0.0 - Java:https://github.com/maxio-com/ab-java-sdk/releases/tag/7.0.0 - Ruby:https://github.com/maxio-com/ab-ruby-sdk/releases/tag/7.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/7.0.0 # January SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/6.1.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.6.0 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/6.1.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/6.1.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/6.1.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/6.1.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/6.1.0 #### 2024 Announcements Source: https://developers.maxio.com/http/help/announcements/2024-announcements You can view release information on the package manager for a client library: - [Python](https://pypi.org/project/maxio-advanced-billing-sdk/) - [Ruby](https://rubygems.org/gems/maxio-advanced-billing-sdk/) - [PHP](https://packagist.org/packages/maxio/advanced-billing-sdk) - [C#/.NET](https://www.nuget.org/packages/Maxio.AdvancedBillingSdk/) - [Typescript](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/) - [Java](https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk) - [Go](https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk) Or you can visit the client library's release page in source control for release details: # December SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/6.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.5.0 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/6.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/6.0.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/6.0.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/6.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/6.0.1 & https://github.com/maxio-com/ab-typescript-sdk/releases/tag/6.0.0 # October SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/5.2.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.4.2 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/5.2.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/5.2.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/5.2.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/5.2.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/5.2.0 # September SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/5.1.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.4.1 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/5.1.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/5.1.0 & https://github.com/maxio-com/ab-python-sdk/releases/tag/5.0.1 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/5.1.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/5.1.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/5.1.0 # August SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/5.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.4.0 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/5.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/5.0.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/5.0.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/5.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/5.0.0 # July SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/4.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.3.0 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/4.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/4.0.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/4.0.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/4.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/4.0.0 # June SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/3.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.2.1 & https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.2.0 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/3.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/3.0.1 & https://github.com/maxio-com/ab-python-sdk/releases/tag/3.0.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/3.0.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/3.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/3.0.0 # March SDK Release Notes - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/2.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v0.1.0 % https://github.com/maxio-com/ab-golang-sdk/releases/tag/v1.0.1-alpha.1 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/2.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/2.0.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/2.0.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/2.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/2.0.0 # February Announcement and SDK Release Notes Starting Feb 2024, Maxio offers Advanced Billing-managed SDKs to support the following community tech stacks: - [Python](https://pypi.org/project/maxio-advanced-billing-sdk/) - [Ruby](https://rubygems.org/gems/maxio-advanced-billing-sdk/) - [PHP](https://packagist.org/packages/maxio/advanced-billing-sdk) - [C#/.NET](https://www.nuget.org/packages/Maxio.AdvancedBillingSdk/) - [Typescript](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/) - [Java](https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk) - [Go (Beta)](https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk@v0.6.0) Maxio's managed SDKs are a commitment to evolve and remove the friction in the Developer Experience (DX). We are excited to announce that with these Software Development Kits (SDKs), sellers can extend Maxio’s functionality to meet the desired level of integration. Decision-makers will be empowered to run a 15-minute evaluation. Release notes: - C#/.Net: https://github.com/maxio-com/ab-dotnet-sdk/releases/tag/1.0.0 - Go: https://github.com/maxio-com/ab-golang-sdk/releases/tag/v1.0.0-alpha.1 - PHP: https://github.com/maxio-com/ab-php-sdk/releases/tag/1.0.0 - Python: https://github.com/maxio-com/ab-python-sdk/releases/tag/1.0.0 - Java: https://github.com/maxio-com/ab-java-sdk/releases/tag/1.0.0 - Ruby: https://github.com/maxio-com/ab-ruby-sdk/releases/tag/1.0.0 - Typescript: https://github.com/maxio-com/ab-typescript-sdk/releases/tag/1.0.0 #### 2023 Announcements Source: https://developers.maxio.com/http/help/announcements/2023-announcements # 2023-05-18 Change in the refund_success and refund_failure webhooks Starting May 18th, 2023, Maxio will undergo a change in the refund_success and refund_failure webhooks. The subscription_id parameter will no longer be supported. Instead, sellers can access the subscription ID through the subscription nested hash: subscription => { id => 1}. Please note that existing sites are unaffected by this change. # 2023-05-16 Enable Chargify.js Security Token by default As of May 16th, 2023, all new Sellers will have enabled Chargify.js Security Token by default. Additionally, merchants will not be able to change the related security settings by themselves. In order to do that they will need to reach out to the support. This change has been made in order to improve the security of sites using Chargify.js and will reduce the exposure of Chargify.js as a target for attack. # 2023-05-10 SSL Badge Removal We would like to inform you that we have decided to immediately discontinue the use of Comodo SSL certificates for our Maxio platform. This decision was made after careful consideration and analysis of our security measures, and we are confident that it will not have any adverse impact on the security or performance of our platform. # 2023-03-09 Rate of Declined Requests for Stripe Gateway On March 9th, 2023, a feature was released that removes the temporary email submitted to Stripe by Chargify.js during the initial tokenization process. During our developer's review, we compared requests made via Chargify's hosted Self-Service pages which were processing these cards with success versus the requests made via Chargify.js, only finding the temporary email as the common differentiation between these requests. The feature in question was slowly rolled out to sites as requested.That being said, it appears that the rate of declined requests from Stripe has recently decreased for affected merchants independent of this feature, indicating that another change has likely occurred on Stripe's end. As a result of these findings, we are marking this issue as resolved for the time being. Apart from the feature outlined above that was released proactively by our developers to hopefully aid in reducing the number of declines, no other changes were made on our end. Additionally, due to the success rates increase without the need for this feature, we will not be rolling out the feature previously mentioned unless requested. If the feature to disable temporary Chargify.js emails is needed for your site's configuration, please reach out to Support. If there are any additional questions on the cause of this issue,please reach out to Stripe support for further clarification as we are unable to verify the changes they made on their end to resolve this issue. # 2023-02-28 Increase in Declines from Stripe Gateway We have multiple merchants experiencing an increase in declines when storing credit cards within the Stripe payment gateway beginning in early February. Further investigation by our developers did not find any changes on our end that would result in these declines. Until we receive more direct insight from Stripe on this matter, we recommend that any affected merchants contact Stripe directly. Additionally, customers encountering declines may reach out to their card issuing bank for more information. We have also found multiple instances where a decline succeeds in the future after some time, suggesting these declines may not be permanent errors. We understand the inconvenience these increased declines may cause, and will provide further updates as soon as we have more information to share. # 2023-02-03 Unintended Renewal Event After The First Dunning Attempt We recently released a fix for renewal webhooks on 2023-01-24, however, we regret to inform you that this resulted in unintended consequences causing the webhooks to trigger daily after the first dunning attempt. Our development team quickly identified and resolved the issue, ensuring that the renewal webhooks will now only trigger on the normal renewal dates. We understand that this situation may have caused some inconvenience, and we would like to extend our sincerest apologies for any disruption. We are committed to providing our customers with the best possible service, and we appreciate your patience and understanding during this time. # 2023-02-01 Limitations to custom fields As of February 13th, 2023, we will implement a change limiting custom fields to 2048 characters. This decision has been made with the aim of improving the stability and performance of our system. # 2023-01-30 "Access Denied" 401 HTTP responses in UI and API Between 12:54 UTC and 13:21 UTC, a routine system update being rolled out incrementally inadvertently caused a small number of customers to experience "Access Denied" 401 HTTP status code responses in the UI and API. As soon as our engineers determined the 401 responses were associated with the system upgrade, the upgrade was immediately rolled back. Due to the incremental rollout of this system upgrade, only a small number of customers were affected within the 25-minute window between the initial rollout and subsequent reversion. Customers were able to work around this issue by refreshing the page or retrying API calls until a successful response was received. While this issue was corrected by the reversion of the system update, we sincerely apologize for any inconveniences this matter caused, and thank you for your patience and understanding as our engineers worked toward a resolution. # 2023-01-24 Renewal Success and Renewal Failure events changes We have recently been made aware of an issue with our subscription renewals and webhook events. Specifically, that subscription renewal did not trigger a webhook event while the subscription was in a past_due state. This was caused by a mid-period component allocation failure or the renewal occurred a couple of days after the subscription entered dunning. Even when the subscription's state changed to active, no event was triggered to note the next renewal, and issue an invoice. We have made changes to our system to ensure that renewal webhooks will be triggered even when a subscription is in a past-due state. This means that our customers will receive the most up-to-date information on their subscriptions. # 2023-01-18 Ability to set custom settings for applying prepayments to invoices As of January 18th, 2023, we have added additional options for the manner in which prepayments are applied to invoices. The new options may be found under Config > Settings > Prepayments and the custom settings for applying prepayments to invoices are as follows: Automatic Payment Collection Method: - Do not automatically apply prepayments - Apply available prepayments automatically immediately upon issuance of invoice - Apply prepayments automatically on the due date (default setting) Remittance Payment Collection Method: - Do not automatically apply prepayments - Apply available prepayments automatically immediately upon issuance of invoice (default setting) This change was made to allow merchants greater flexibility to ensure prepayments are applied to invoices in a manner that best fits their individual workflow. # 2023-01-16 Ability to sort results for List Metafields endpoint As of January 16th, 2023, List Metafields endpoint response will be sorted defaultly by id, ascending. Sorting can be changed to descending by providing direction parameter. # 2023-01-10 Ability to sort results for List Metadata for Resource Type endpoint As of January 10th, 2023, List Metadata for Resource Type endpoint response will be sorted defaultly by id, ascending. Sorting can be changed to descending by providing direction parameter. #### 2022 Announcements Source: https://developers.maxio.com/http/help/announcements/2022-announcements # 2022-12-07 Preserve Period for Subscriptions with Allocated Components During Migration Preview On December 7th, 2022, we will start preserving the period for subscriptions with allocated components during migration preview. Previously, this was not done, but we have made this change to ensure that the preview migration behavior matches the actual migration. # 2022-12-07 "Cancel_at_end_of_period" Set To True Is No Longer Respected During Subscription Creation Via API When It Is Not Intended To Be. As of December 7th, 2022, the "cancel_at_end_of_period" parameter set to "true" will no longer be respected during subscription creation via API if the "next_billing_at" parameter is also present. Previously, this combination of parameters resulted in a subscription with the status of "Active (Pending Cancellation)". Now, this combination of parameters will be invalid and will result in an error with a status code of 422 and a proper error message. This change is being made to ensure that the subscription creation process is consistent and predictable, and to prevent unintended subscription status changes. # 2022-11-21 Create Successful And Failure Payment Events For Subscription Group Renewal As of November 21st, 2022, we will now create Successful and Failure Payment Events for the primary subscription after renewal. This change was made to ensure the renewal behavior works the same as the initial signup making it easier to track subscription group payment activity through the group’s lifetime. # 2022-11-03 Prepayments No Longer Applied Automatically For Remittance Invoice with Net Terms As of November 3rd, 2022, the logic of applying prepayments automatically is being changed for Remittance Invoices. Previously, we applied prepayments automatically when issuing an invoice only in the cases of the collection method set to "remittance", or when the invoice didn't have net terms set. Now, we apply prepayments automatically only in the case when net terms are not set, regardless of the collection method. This change was made to ensure the prepayment behavior upon issuance of invoices with net terms is consistent for invoices of both "automatic" and "remittance" collection methods. # 2022-05-19 Products Price Points Interval Validation Changes As of May 19th, 2022, validation on the `interval` attribute (POST/PATCH products/:id/price_points) is being changed. Previously, we required the `interval` attribute to be greater than 0, so if you provided 0.5 value, there was a misleading error message with text: "Recurring interval: must be greater than 0.". Now, we require this field to be greater than or equal to 1. The new validation message is "Recurring Interval: must be greater than or equal to 1.". # 2022-02-09 Component Allocation Events Backfilled With Transaction Exchange Rate An issue was recently resolved which involved MRR changes for no-charge component allocations on a subscription using a currency other than the site's primary. The MRR changes resulting from these events will be the proper amount going forward. Past event records with the key `component_allocation_change` for such subscriptions have been backfilled with the proper values for component's `transaction_exchange_rate`. If MRR updates for the past events are desired, please reach out to support. #### 2021 Announcements Source: https://developers.maxio.com/http/help/announcements/2021-announcements # 2021-12-16 Current Vault Validation Between approximately 3:30 AM on November 9th, 2021, and 2:00 PM on November 10, 2021,the value of `current_vault` was being validated to see if it matched one of the gateways configured for the site. In most cases the value did match and there was no effect. For a few sites, we discovered that an incorrect value was being submitted. For example, we were receiving `stripe` when the correct value is `stripe_connect`. This change has been reverted, and we are reaching out to a limited number of merchants who experienced signup failures due to this validation. We apologize for any disruption and are taking steps to ensure that notification is provided in advance if we must make a change that breaks backwards compatibility in the API. This change will be re-introduced in the future. # 2021-11-23 Issue Service Credit Response Body Change As of November 23rd, 2021, the [Issue Service Credit API endpoint](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/subscription-invoice-account/issue-service-credit) will respond with a new body: ```json { "id": "Integer", "amount_in_cents": "Integer", "ending_balance_in_cents": "Integer", "entry_type": "String", "memo": "String" } ``` Previously, this endpoint was returning just a status code without body. # 2021-11-18 Renewal Preview Returns Free Non-Zero Components As of November 18th, 2021, the renewal preview API endpoint will return additional component line items. Previously, only components with a cost greater than 0 were returned. With the new behavior, free components will be returned as line items so long as their recorded quantity is greater than 0. # 2021-11-05 Payment Collection Validation Changes As of October 26th, 2021, subscription's attribute "payment_collection_method" is being validated accordingly to site's architecture: - on statement-based sites valid options are: - "automatic" - "invoice" - on Relationship Invoicing architecture valid options are: - "automatic" - "remittance" - "prepaid" # 2021-10-01 Update Price Point Prices Error Response Code Change Currently, when [updating a price point](https://developers.maxio.com/#/http/x-redirect/JTI0ZSUyRkNvbXBvbmVudHMlMkZ1cGRhdGVDb21wb25lbnRQcmljZVBvaW50) with changes to its prices and referencing an id of a price which does not belong to the specified price point, the API returns a 404. The response for this case is changing to a 422. # 2021-09-13 Subscription Reactivation Payment Decline Error Change The error messages returned when a subscription's reactivation payment has been declined will change on October 4, 2021, both within the API and the admin UI. The current behavior returns one of two generic messages. If the payment profile was declined, the message is: “The payment method on file could not be charged.” If no payment profile is on file, the message is: “The customer does not have a credit card on file.” With the upcoming changes, reactivations that fail due to a payment decline will return the payment gateway’s decline message. When no payment profile is on file, the message will be: “No payment method was on file for the X balance,” where X is the appropriate currency marker and amount due at time of reactivation. For API users, failed reactivation calls will still return a 422, and the structure of the error hash remains the same. Only the error messages in the case of a failed payment or missing payment profile will change to better reflect the cause of failure. These errors will also begin to appear in the admin UI. # 2021-02-12 Subscription Reactivation Behavior Change As of February 22nd, 2021, reactivation of subscription within the current billing period will by default apply service credits and prepayments to the invoice. There will be an optional checkbox to reactivate the subscription in the old way without using service credits and prepayments. In the API the behavior also will change - service credits and prepayments will be applied by default, to block that action the `use_credits_and_prepayments` attribute must be set to `false`. Previously, service credits and prepayments haven't been considered during reactivation with resuming the current billing period. #### 2020 Announcements Source: https://developers.maxio.com/http/help/announcements/2020-announcements # 2020-12-18 Changes to date_field Validation As of December 18th, 2020, we have added validation on the `date_field` attribute. Previously, we did not validate the date_field, and if it was other than `created_at` or `updated_at`, we would allow the query update to proceed, but the result was an empty response. Now if other values as `created_at` or `updated_at` are passed in `date_field`, we just ignore them, and filters are not applied. If other params are correct and records exist, they should appear in the response. If you have any questions or concerns please contact us at [support@maxio.com,](mailto:support@maxio.com) and we’ll be glad to assist. # 2020-07-13 API Subscriptions XML Response Change As of July 13th, 2020, the XML response for reading multiple subscriptions has changed. Before, dates and integers with no value still displayed a type: ``` ``` Now, the type will no longer be returned for a nil field. ``` ``` Note: This same change was already previously made when reading a single subscription in 2018. # 2020-04-20 New API Authentication As of April 20 2020, the new authentication method will be enabled. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, the new authentication method was introduced which is user authentication. Obtaining the User API Key is described below. **Enable API Token View for Admin and Team Member** API Token View is a form with the API settings in the user#edit page. Support, Manager or the Owner of the Seller all have the API Token View enabled by default, in addition, they have the possibility to manage who has access to the API Token View. In case the site Admin or a Team Member leaves the company the API Key can be easily deactivated. In order to enable the API Token View, the support/owner should go to the user's list, click edit on the selected user and mark the checkbox. The API Token View will be enabled for the selected user. ![Enable User API Auth](static/images/announcements/2020-04-20-new-api-authentication/enable-user-api-auth.png) API Token View access can be denied, by unchecking the checkbox. The API Key will be automatically DISABLED, and the user will not have access to the API Token View anymore. ![Disable User API Auth](static/images/announcements/2020-04-20-new-api-authentication/disable-user-api-auth.png) **Generate the API Key** When the API Token View is enabled the generation of the API Key is possible. To do so, go to your profile: ![My Profile](static/images/announcements/2020-04-20-new-api-authentication/my-profile.png) Scroll to the API Token View and click "Generate API Key" ![Generate API Key](static/images/announcements/2020-04-20-new-api-authentication/generate-api-key.png) You'll be directed to the page with a new API Key which should be copied. It will be used to get Sales Reps data. ![Copy API Key](static/images/announcements/2020-04-20-new-api-authentication/copy-api-key.png) After this step, we are ready to perform seller level API queries. **Deprecate the API Key** Deprecating the API Key is possible on the API Token View ![Deprecate API Key](static/images/announcements/2020-04-20-new-api-authentication/deprecate-key.png) By clicking the “Deprecate” button. Additional popup with confirmation will be displayed ![Confirmation Popup](static/images/announcements/2020-04-20-new-api-authentication/confirmation-popup.png) Deprecate option is also available for Chargify Staff and Owner of the Seller. It can be especially useful when API Key is compromised. **Regenerate the API Key** Another option when the key has been compromised is to regenerate the API Key. This is done in the API Token View by clicking on the “Regenerate” button. The old API Key will be deprecated and only the new key will be valid. ![Regenerate API Key](static/images/announcements/2020-04-20-new-api-authentication/regenerate-api-key.png) In order to retrieve sales commission resources, [check out sales commission API documentation.](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/sales-commissions/list-sales-commission-settings) # 2020-04-01 Coupon Endpoint Change As of April 13th, 2020, the coupon endpoint in the API will change. Previously when retrieving coupons from this endpoint, only coupons from the default product family would be returned. The default product family is the one that was created first for the site, provided it has not been archived. Moving forward, retrieving coupons from this endpoint will return all coupons for a given site. [Click here to review documentation for the API endpoint that we will be updating.](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/update-coupon) With this in mind, it's recommended to review your integration with Chargify and determine whether any calls retrieving coupons need to be updated. Because more coupons may be returned with this change, we recommend using our pagination functionality. The default number of coupons returned per page would be 30. The maximum allowed value is 200 results per page. In order to only retrieve coupons from a specific product family, [the endpoint documented here may be used.](https://developers.maxio.com/http/advanced-billing-api/api-endpoints/coupons/list-coupons-for-product-family) # 2020-01-27 Product Price Point Order As of January 27th, 2020, we will be updating the API response when fetching a list of price points for a product. Moving forward the `GET` request will now always be returned in `DESC` order of `created_at`, ensuring results are consistent across pages. Previously if you included `page=1` in your request the first result of the response was the default price point for that product. This will no longer be the case and the default will appear based on its `created_at` date and time. # 2020-01-16 Coupon Validation Changes On December 17th, 2019, we made an update to how coupon pricing is validated. Previously we would allow a coupon to be created with a negative amount. If a coupon with a negative amount was applied to a subscription it would get ignored and not attempt to generate a discount, which is the expected behavior. In order to bring coupon validations in line with the expected behavior, we no longer allow coupons to be created with a negative amount. There were a small percentage of these coupons that we've updated from a negative amount to `0` in order to maintain the existing behavior but keep them valid. If you have any questions or concerns please contact us at [support@maxio.com,](mailto:support@maxio.com) and we’ll be glad to assist.