younifyd
Menu

Update Hierarchy Access Settings For A Customer

Update account hierarchy access settings for a customer

POST/customers/{customer-id}/update_hierarchy_settings

Use it in a workflow

  1. Add a step and choose the Chargebee connector.
  2. Pick the Update Hierarchy Access Settings For A Customer action (under Chargebee API).
  3. Fill in the fields below, then reference the result from later steps as {{updateHierarchyAccessSettingsForACustomer.response.data}}.

Request

Path parameters

customer-idstringrequired

Headers

chargebee-request-origin-devicestring

The device from which the customer has made the request

chargebee-request-origin-userstring (email)

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-user-encodedstring (email)

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-request-origin-ipstring

The IP address of the customer where the request originated

chargebee-event-actionsstring

skip all actions to be done on the events

One ofall-disabled

chargebee-event-emailstring

skip only emails

One ofall-disabled

chargebee-event-webhookstring

skip only webhooks

One ofall-disabled

chargebee-business-entity-idstring

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

Request body

Enter the body as JSON in the step's Body field.

use_default_hierarchy_settingsboolean

<p class="mb-2">Decides if Chargebee should apply settings from the <a href="https://www.chargebee.com/docs/2.0/account-hierarchy.html#advanced-mode" target="_blank">Chargebee Billing UI</a> or from this API request.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">If set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code>: Chargebee removes existing settings stored in the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">parent_account_access</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">child_account_access</code> attributes of the customer. The settings configured in the Chargebee Billing UI apply for the customer.</li> <li class="text-base leading-relaxed">If set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">false</code>: Chargebee replaces existing settings stored in the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">parent_account_access</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">child_account_access</code> parameters with those passed in this API call. If any of those parameters are not passed, they remain unchanged for the customer.</li> </ul>

Default true

parent_account_accessobject

Parameters for parent_account_access

portal_edit_child_subscriptionsstring

Sets parent's level of access to child subscriptions on the Self-Serve Portal. \* yes - The parent account can view and edit the subscriptions of the child account. \* no - The parent account cannot view or edit the subscriptions of the child account. \* view_only - The parent account can only view the subscriptions of the child account.

One ofyesview_onlyno

portal_download_child_invoicesstring

Sets parent's level of access to child invoices on the Self-Serve Portal. \* yes - The parent account can view and download the invoices of the child account. \* no - The parent account can neither view nor download the invoices of the child account. \* view_only - The parent account can only view the invoices of the child account.

One ofyesview_onlyno

send_subscription_emailsboolean

<p class="mb-2">If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code> , the parent account will receive subscription-related emails sent to the child account.</p>

send_payment_emailsboolean

<p class="mb-2">If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code> , the parent account will receive payment-related emails sent to the child account.</p>

send_invoice_emailsboolean

<p class="mb-2">If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code> , the parent account will receive invoice-related emails sent to the child account.</p>

child_account_accessobject

When the customer is part of an \[account hierarchy\](https://www.chargebee.com/docs/account-hierarchy.html) , this attribute defines the level of access that the customer has to its own information.

portal_edit_subscriptionsstring

Determines the child's access to its own subscriptions in the Self-Serve Portal. \* view_only - The child account can only view its subscriptions. \* yes - The child account can view and edit its subscriptions.

One ofyesview_only

portal_download_invoicesstring

Determines the child's access to its own invoices in the Self-Serve Portal. \* view_only - The child account can view but not download its invoices. \* no - The child account cannot view or download its own invoices. \* yes - The child account can both view and download its invoices.

One ofyesview_onlyno

send_subscription_emailsboolean

<p class="mb-2">If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code> , the child account receives email notifications for its subscriptions.</p>

send_payment_emailsboolean

<p class="mb-2">If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code> , the child account receives email notifications for payment-related activities for its invoices.</p>

send_invoice_emailsboolean

<p class="mb-2">If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code> , the child account receives email notifications for its invoices.</p>

json
{
  "use_default_hierarchy_settings": null,
  "parent_account_access": null,
  "child_account_access": null
}

Response

Returns 200 with an object. Read it in later steps with {{updateHierarchyAccessSettingsForACustomer.response.data.<field>}}.

customerobject

<div class="api-description"><p class="mb-2">Represents a customer, which can be an individual or organization that subscribes to your products or services. The customer resource associates with <a href="/docs/api/subscriptions/subscription-object">subscriptions</a>, <a href="/docs/api/cards/card-object">card information</a>, and billing addresses. The customer details include their ID, name, contact information, and any <a href="/docs/api/advanced-features">custom attributes</a> you&#x27;d like to associate with them.</p><div class="warning alert alert-warning"><p class="mb-2"><strong class="font-semibold">Breaking Change</strong>:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><a href="https://www.chargebee.com/docs/2.0/sites-intro.html" target="_blank"><strong class="font-semibold">Sites</strong></a> <strong class="font-semibold">created before March 1, 2014</strong>: <a href="/docs/api/cards/update-card-for-a-customer">updating the card</a> deletes the customer&#x27;s <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_address</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">vat_number</code> and replaces them with values from the request.</li> <li class="text-base leading-relaxed"><strong class="font-semibold">Sites created on or after March 1, 2014</strong>: updating the card doesn&#x27;t change the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_address</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">vat_number</code>.</li> </ul></div></div>

idstringrequired

<p class="mb-2">The unique identifier of the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">customer</code> resource. You have the option to specify this value when creating a customer. If not specified, Chargebee automatically generates a unique identifier.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Tip</strong> When the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">customer</code> resource is <a href="/docs/api/business_entities/transfer-resources-to-another-business-entity">transferred</a> to a different <code><a href="/docs/api/business_entities">business_entity</a></code>, Chargebee assigns a new random identifier to the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">id</code> attribute. The original identifier is preserved for the transferred copy of the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">customer</code> resource. (See also: <a href="/docs/api/business_entities">Mechanics of business entity transfer</a>.)</p></div> <span featureId="cb-mbe" isMicro="true"></span>

first_namestring

First name of the customer

last_namestring

Last name of the customer

emailstring (email)

Email of the customer. Configured email notifications will be sent to this email.

phonestring

Phone number of the customer

companystring

Company name of the customer.

vat_numberstring

<p class="mb-2">The VAT/tax registration number for the customer. For customers with <code><a href="/docs/api/customers/customer-object#billing_address">billing_address</a></code></p> <p class="mb-2"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">country</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code> (which is <strong class="font-semibold">United Kingdom - Northern Ireland</strong> ), the first two characters of the <a href="https://en.wikipedia.org/wiki/VAT_identification_number" target="_blank">full VAT number</a> can be overridden by setting <code><a href="/docs/api/customers/customer-object#vat_number_prefix">vat_number_prefix</a></code> .</p>

auto_collectionstringrequired

<p class="mb-2">When the customer has a <code><a href="/docs/api/customers/customer-object#payment_method">payment_method</a></code> of <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">type</code> <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">card</code> , this attribute determines whether to automatically charge the card whenever an invoice <code><a href="/docs/api/invoices/invoice-object#status">status</a></code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">payment_due</code> .</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong> This setting can be <a href="/docs/api/subscriptions/create-subscription-for-items#auto_collection">overridden</a> for individual subscriptions of the customer.</p></div> * on - <p class="mb-2">Chargebee automatically charges the card for invoices that enter <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">payment_due</code> <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> .</p> * off - <p class="mb-2">Automatic charging is disabled; manual payment is required for due invoices.</p>

One ofonoffDefault "on"

offline_payment_methodstring

The preferred offline payment method for the customer. \* sepa_credit - SEPA Credit \* cash - Cash \* no_preference - No Preference \* bank_transfer - Bank Transfer \* check - Check \* eu_automated_bank_transfer - EU Automated Bank Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* uk_automated_bank_transfer - UK Automated Bank Transfer \* custom - Custom \* boleto - Boleto \* mx_automated_bank_transfer - MX Automated Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* ach_credit - ACH Credit

One ofno_preferencecashcheckbank_transferach_creditsepa_creditboletous_automated_bank_transfereu_automated_bank_transferuk_automated_bank_transferjp_automated_bank_transfermx_automated_bank_transfercustom

net_term_daysinteger (int32)required

<p class="mb-2">The number of days from <a href="/docs/api/invoices/invoice-object#date" class="text-blue-600 hover:text-blue-800 underline"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">invoice.date</code></a> until payment for the invoice is due.</p> <span featureId="cb-net-d-payment-terms" isMicro="true"></span>

Default 0

vat_number_validated_timeinteger (unix-time)

Returns the recent VAT number validation time.

vat_number_statusstring

Represents the VAT validation status. This is applicable if you have configured EU, UK or Australian taxes and the [VAT number validation](https://www.chargebee.com/docs/2.0/uk-vat.html#uk-vat-validation) is enabled. \* not_validated - This status is only applicable for countries in European Zone. This is applicable when both the customer's billing address and the organization's address should be of the same European Zone and EU tax should be configured with the "Also validate VAT Number for Country of Business" option in the disabled status. \* undetermined - When Chargebee is not able to validate the VAT number it is stored as 'undetermined'. This can occur due to reasons like service outage etc. VAT numbers with 'undetermined' status will be in queue for validation on daily basis. \* valid - If the given VAT number is valid. \* invalid - If the given VAT number is invalid.

One ofvalidinvalidnot_validatedundetermined

allow_direct_debitbooleanrequired

Whether the customer can pay via Direct Debit

Default false

is_location_validboolean

<div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong> Applicable only when the customer&#x27;s <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_address.country</code> is New Zealand, Australia, or in the EU.</p></div> <p class="mb-2">When the customer uses a <a href="/docs/api/payment_sources/payment_source-object#type" target="_blank">card</a> <a href="/docs/api/customers/customer-object#primary_payment_source_id" target="_blank">payment source</a>, this attribute specifies whether the country of the customer and the card issuer are the same. The following three location indicators are compared:</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">The card issuer&#x27;s country.</li> <li class="text-base leading-relaxed">The <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_address.country</code>.</li> <li class="text-base leading-relaxed">The country to which <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">created_from_ip</code> belongs.</li> <li class="text-base leading-relaxed">When all three are the same, this attribute is set to true, otherwise it is set to false. When all three are the same, this attribute is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code>, otherwise it is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">false</code>.</li> </ul>

created_atinteger (unix-time)required

Timestamp indicating when this customer resource is created.

created_from_ipstring

<p class="mb-2">The IP address of the customer when this customer record was created. It&#x27;s mainly used for <a href="https://www.chargebee.com/docs/marketing-integration-index.html" target="_blank">referral integrations</a> and validating VAT if the customer is in the EU or UK. Depending on the method used to create the customer record, the field is set as follows:</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><strong class="font-semibold">API</strong>: When creating the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">customer</code> resource through the API, you must include the customer&#x27;s IP address in a <a href="/docs/api/advanced-features">custom HTTP request header</a> (<code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">chargebee-request-origin-ip</code>) for Chargebee to capture it.</li> <li class="text-base leading-relaxed"><strong class="font-semibold">Checkout</strong>: For <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">customer</code> resources created through <a href="https://www.chargebee.com/docs/2.0/hosted-checkout.html" target="_blank">Chargebee Checkout</a>, Chargebee automatically captures the IP address of the customer.</li> <li class="text-base leading-relaxed"><strong class="font-semibold">UI</strong>: When <a href="https://www.chargebee.com/docs/2.0/customers.html#creating-a-new-customer" target="_blank">creating a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">customer</code></a> resource via the Chargebee Billing UI, this field is not relevant and the value must be ignored.</li> </ul>

exemption_detailsarray<any>

Indicates the exemption information. You can customize customer exemption based on specific Location, Tax level (Federal, State, County and Local), Category of Tax or specific Tax Name. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. To know more about what values you need to provide, refer to this [Avalara's API document](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/exemption/) .

taxabilitystring

<p class="mb-2">Specifies if the customer is liable for tax</p> * taxable - <p class="mb-2">Computes tax for the customer based on the <a href="https://www.chargebee.com/docs/tax.html" target="_blank" rel="noopener noreferrer">site configuration</a>. In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that&#x27;s not available either, the tax is taken as zero.</p> * exempt - <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Customer is exempted from tax. When using Chargebee&#x27;s native <a href="https://www.chargebee.com/docs/tax.html" target="_blank" rel="noopener noreferrer">Taxes</a> feature or when using the <a href="https://www.chargebee.com/docs/taxjar.html" target="_blank" rel="noopener noreferrer">TaxJar integration</a>, no other action is needed.</li> <li class="text-base leading-relaxed">However, when using our <a href="https://www.chargebee.com/docs/avalara.html" target="_blank" rel="noopener noreferrer">Avalara integration</a>, optionally, specify <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">entity_code</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">exempt_number</code> attributes if you use Chargebee&#x27;s <a href="https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption" target="_blank">AvaTax for Sales</a> or specify <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">exemption_details</code> attribute if you use <a href="https://www.chargebee.com/docs/avatax-for-communication.html" target="_blank" rel="noopener noreferrer">Chargebee&#x27;s AvaTax for Communications</a> integration. Tax may still be applied by Avalara for certain values of <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">entity_code</code>/<code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">exempt_number</code>/<code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">exemption_details</code> based on the state/region/province of the taxable address.</li> </ul>

One oftaxableexemptDefault "taxable"

entity_codestring

The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) . \* l - Other or custom \* m - Educational organization \* n - Local government \* h - Commercial agricultural production \* i - Industrial production/manufacturer \* j - Direct pay permit \* k - Direct mail \* p - Commercial aquaculture \* q - Commercial Fishery \* r - Non-resident \* d - Foreign diplomat \* e - Charitable or benevolent organization \* f - Religious organization \* g - Resale \* a - Federal government \* b - State government \* c - Tribe/Status Indian/Indian Band \* med2 - US Medical Device Excise Tax with taxable sales tax \* med1 - US Medical Device Excise Tax with exempt sales tax

One ofabcdefghijklmnpqrmed1med2

exempt_numberstring

Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) .

resource_versioninteger (int64)

<p class="mb-2">Version number of this resource. The <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">resource_version</code> is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.</p>

updated_atinteger (unix-time)

Timestamp indicating when this customer was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.

localestring

Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication.

billing_dateinteger (int32)

<div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong> Applicable only when <a href="https://www.chargebee.com/docs/calendar-billing.html">Calendar Billing</a> with support for customer-specific billing date is enabled and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date_mode</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">manually_set</code>.</p></div> <p class="mb-2">Specifies the day of the month for subscription renewals on month-based or year-based plans. Month-based and year-based plans are <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">item_price</code> resources where the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">item_type</code> is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">plan</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">period_unit</code> is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">month</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">year</code> respectively.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Example</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><strong class="font-semibold">Month-based subscriptions</strong>: If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date</code> is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">15</code>, month-based renewals occur on the 15th of the month. It&#x27;s important to note that if the value is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">31</code>, renewals align with the last day of the month. Additionally, in February, a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date</code> of <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">29</code>, <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">30</code>, or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">31</code> aligns renewals for the last day of February.</li> <li class="text-base leading-relaxed"><strong class="font-semibold">Year-based subscriptions</strong>: A <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date</code> of <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">15</code> and a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_month</code> of <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">7</code> schedules the renewal on the 15th of July.</li> </ul></div>

billing_monthinteger (int32)

<div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong> Applicable only when <a href="https://www.chargebee.com/docs/calendar-billing.htm">Calendar Billing</a> with support for customer-specific billing date is enabled and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date_mode</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">manually_set</code>.</p></div> <p class="mb-2">Specifies the renewal month for subscriptions on year-based plans. Year-based plans are <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">item_price</code> resources where <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">item_type</code> is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">plan</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">period_unit</code> is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">year</code>.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Example</strong> The renewal date is 15th July when <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">15</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_month</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">7</code>.</p></div>

billing_date_modestring

<div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong> Applicable only when <a href="https://www.chargebee.com/docs/calendar-billing.html">Calendar Billing</a> with support for customer-specific billing date is enabled and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date_mode</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">manually_set</code>.</p></div> <p class="mb-2">Indicates whether this customer&#x27;s <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_month</code> values can be changed via the <a href="/docs/api/customers/change-billing-date">Change billing date API</a> .</p> * manually_set - <p class="mb-2"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_month</code> can be adjusted via API.</p> * using_defaults - <p class="mb-2"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_date</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">billing_month</code> are fixed as per Chargebee <a href="https://www.chargebee.com/docs/2.0/calendar-billing-config.html#configuring-calendar-billing_configuring-site-wide-billing">site settings</a> and not modifiable via API.</p>

One ofusing_defaultsmanually_set

billing_day_of_weekstring

Applicable when *calendar billing* (with customer specific billing date support) is enabled. When set, renewals of all the weekly subscriptions of this customer will be aligned to this week day. \* saturday - Saturday \* monday - Monday \* friday - Friday \* sunday - Sunday \* wednesday - Wednesday \* thursday - Thursday \* tuesday - Tuesday

One ofsundaymondaytuesdaywednesdaythursdayfridaysaturday

billing_day_of_week_modestring

Indicates whether this customer's *billing_day_of_week* value is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_day_of_week* will not be reset even when all of the weekly subscriptions are cancelled. \* using_defaults - Billing date is set based on defaults configured. \* manually_set - Billing date is specifically set (default configuration is overridden)

One ofusing_defaultsmanually_set

pii_clearedstring

Indicates whether this customer's personal information has been cleared \* cleared - Cleared \* scheduled_for_clear - Scheduled For Clear \* active - Active

One ofactivescheduled_for_clearclearedDefault "active"

auto_close_invoicesboolean

Override for this customer, the [site-level setting](https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the [subscription level](/docs/api/subscriptions/subscription-object#auto_close_invoices) which takes precedence.

channelstring

The subscription channel this object originated from and is maintained in. \* play_store - The object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. \* app_store - The object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.

One ofwebapp_storeplay_store

active_idstring

<div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong>: Present only when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">customer</code> has been <a href="/docs/api/business_entities/transfer-resources-to-another-business-entity">transferred</a> between business entities.</p></div> <p class="mb-2">Represents the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">id</code> of the active version of the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">customer</code> resource.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Tip</strong>: If the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">id</code> and <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">active_id</code> of a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">customer</code> resource are the same, this indicates that you are working with the active version of that customer resource.</p></div> <span featureId="cb-mbe" isMicro="true"></span>

fraud_flagstring

Indicates whether or not the customer has been [identified as fraudulent](https://www.chargebee.com/docs/payments/2.0/fraud-management/chargebee-fraud-management). \* suspicious - The customer has been identified as potentially fraudulent by the gateway \* safe - The customer has been marked as safe \* fraudulent - The customer has been marked as fraudulent

One ofsafesuspiciousfraudulent

primary_payment_source_idstring

The [identifier](/docs/api/payment_sources/payment_source-object#id) of the customer's [primary payment source](https://www.chargebee.com/docs/2.0/payment-method-overview.html#primary-and-backup-payment-methods)

backup_payment_source_idstring

The [identifier](/docs/api/payment_sources/payment_source-object#id) of the customer's [backup payment source](https://www.chargebee.com/docs/2.0/payment-method-overview.html#primary-and-backup-payment-methods) .

invoice_notesstring

A note for the customer that appears on all their invoice PDFs. This is one of [several notes](/docs/api/invoices/invoice-object#notes) displayed on the invoice PDF.

business_entity_idstring

The unique ID of the [business entity](/docs/api/advanced-features) of this subscription. This is always the same as the [business entity](/docs/api/subscriptions/subscription-object#customer_id) of the customer.

preferred_currency_codestring

**Note** Applicable only when the [Multi-Currency](https://www.chargebee.com/docs/2.0/multi-currency-pricing.html) feature is enabled. Specifies the customer's preferred currency in [ISO 4217](https://www.chargebee.com/docs/supported-currencies.html) format.

promotional_creditsinteger (int64)required

The balance of [promotional credits](/docs/api/promotional_credits) available to the customer.

unbilled_chargesinteger (int64)required

Total unbilled charges for this customer

json
{
  "customer": null
}

Need more? See the Chargebee guide for connection setup and behaviour shared by every action.