Menu
Switch Gateway Account
Switch gateway account
/payment_sources/{cust-payment-source-id}/switch_gateway_accountUse it in a workflow
- Add a step and choose the Chargebee connector.
- Pick the Switch Gateway Account action (under Chargebee API).
- Fill in the fields below, then reference the result from later steps as
{{switchGatewayAccount.response.data}}.
Request
Path parameters
cust-payment-source-idstringrequiredHeaders
chargebee-request-origin-devicestringThe 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-ipstringThe IP address of the customer where the request originated
chargebee-event-actionsstringskip all actions to be done on the events
One ofall-disabled
chargebee-event-emailstringskip only emails
One ofall-disabled
chargebee-event-webhookstringskip only webhooks
One ofall-disabled
chargebee-business-entity-idstringIf the 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.
gateway_account_idstringrequiredThe gateway account you want to switch to.
{
"gateway_account_id": null
}
Response
Returns 200 with an object. Read it in later steps with {{switchGatewayAccount.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'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'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'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_namestringFirst name of the customer
last_namestringLast name of the customer
emailstring (email)Email of the customer. Configured email notifications will be sent to this email.
phonestringPhone number of the customer
companystringCompany 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_methodstringThe 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_statusstringRepresents 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_debitbooleanrequiredWhether 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'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'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)requiredTimestamp 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'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'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'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'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'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'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_codestringThe 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_numberstringAny 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.
localestringDetermines 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'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'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_weekstringApplicable 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_modestringIndicates 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_clearedstringIndicates 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_invoicesbooleanOverride 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.
channelstringThe 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_flagstringIndicates 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_idstringThe [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_idstringThe [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_notesstringA 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_idstringThe 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)requiredThe balance of [promotional credits](/docs/api/promotional_credits) available to the customer.
unbilled_chargesinteger (int64)requiredTotal unbilled charges for this customer
payment_sourceobject**Updates** This API obsoletes the [Cards API](/docs/api/cards) in Chargebee. Represents the payment source for the customer. Specific types of payment source (Card, Direct Debit, Paypal Express Checkout, etc.) is defined as sub-resource in the response object. You can find the list of supported payment sources and the expected input parameters [here](/docs/api/payment_parameters). See [Payment source attributes](/docs/api/payment_sources/payment-source-object) for a descriptive list of attributes and payment source types.
idstringrequiredIdentifier of the payment source
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 payment source resource was last updated.
created_atinteger (unix-time)requiredTimestamp indicating when this payment source resource is created.
customer_idstringrequiredIdentifier of the customer with whom this payment source is associated.
typestringrequiredType of payment source \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* unionpay - Payments made via UnionPay. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* dotpay - Payments made via Dotpay. \* klarna - Payments made via Klarna. \* giropay - Payments made via giropay. \* grab_pay - Payments made via GrabPay \* stablecoin - Payments made via Stablecoin. \* bancontact - Payments made via Bancontact Card. \* amazon_payments - Payments made via Amazon Payments. \* pay_by_bank - Pay By Bank \* online_banking_poland - Payments made via Online Banking Poland \* after_pay - Payments made via Afterpay \* paypay - \* generic - Payments made via Generic Payment Method. \* twint - Payments made via Twint \* automated_bank_transfer - Represents virtual bank account using which the payment will be done. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* trustly - Trustly \* upi - UPI Payments. \* cash_app_pay - Payments made via Cash App Pay. \* south_korean_cards - \* electronic_payment_standard - Electronic Payment Standard \* google_pay - Payments made via Google Pay. \* pay_to - Payments made via PayTo \* revolut_pay - Payments made via Revolut Pay. \* naver_pay - Payments made via Naver Pay. \* alipay - Payments made via Alipay. This payment source is deprecated. \* kakao_pay - Payments made via Kakao Pay. \* sofort - Payments made via Sofort. \* pix - Payments made via Pix \* gcash - \* pay_co - Payments made via PayCo \* wechat_pay - Payments made via WeChat Pay. This payment source is deprecated. \* netbanking_emandates - Netbanking (eMandates) Payments. \* go_pay - Payments made via GoPay \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* faster_payments - Payments made via Faster Payments \* alipay_hk - \* payme - Payments made via PayMe \* klarna_pay_now - Payments made via Klarna Pay Now \* swish - Payments made via Swish \* venmo - Payments made via Venmo \* ideal - Payments made via iDEAL. \* kbc_payment_button - KBC Payment Button \* payconiq_by_bancontact - Payments made via Payconiq by Bancontact. \* apple_pay - Payments made via Apple Pay.
One ofcardpaypal_express_checkoutamazon_paymentsdirect_debitgenericalipayunionpayapple_paywechat_payidealgoogle_paysofortbancontactgiropaydotpayupinetbanking_emandatesvenmopay_tofaster_paymentssepa_instant_transferautomated_bank_transferklarna_pay_nowonline_banking_polandpayconiq_by_bancontactelectronic_payment_standardkbc_payment_buttonpay_by_banktrustlystablecoinkakao_paynaver_payrevolut_paycash_app_paytwintgo_paygrab_paypay_coafter_payswish
reference_idstringrequiredThe reference id. In the case of Amazon and PayPal this will be the 'billing agreement id'. For GoCardless direct debit this will be 'mandate id'. In the case of card payments this will be the identifier provided by the gateway/card vault for the specific payment method resource. **Note:** This is not the one time temporary token provided by gateways like Stripe.
statusstringrequiredCurrent status of the payment source. \* valid - A payment source that is valid and active. \* expiring - A payment source that is expiring (like card's status based on its expiry date). \* invalid - The billing agreement cannot be used. It might become valid again either automatically or due to customer action. \* pending_verification - The payment source needs to be verified \* expired - A payment source that has expired
One ofvalidexpiringexpiredinvalidpending_verificationDefault "valid"
gatewaystringrequiredName of the gateway this payment source is stored with. \* bluesnap - BlueSnap is a payment gateway. \* jp_morgan - J.P. Morgan Mobility Payment Solutions is a payment gateway that enables you to securely accept and manage digital payments across different [payment_source_type](/docs/api/payment_sources/payment_source-object#type). This feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/jp-morgan-bacs&ref=feature) to enable the J.P. Morgan Mobility Payment Solutions gateway via payFURL for your test and live sites. \* tco - 2Checkout is a payment gateway. \* payway - \* razorpay - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* dlocal - Dlocal provides payment solutions for global commerce by accepting local payment methods. \* checkout_com - Checkout.com is a payment gateway. \* adyen - Adyen is a payment gateway. \* braintree - Braintree is a payment gateway. \* paystack - Paystack is a payment gateway for businesses in Africa. It enables secure payment acceptance both online and offline. This feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/paystack&ref=feature) to enable Paystack for your test and live sites. \* pay_com - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes. \* moneris_us - Moneris USA is a payment gateway. \* pin - Pin is a payment gateway \* moneris - Moneris is a payment gateway. \* chargebee - Chargebee test gateway. \* cybersource - CyberSource is a payment gateway. \* ecentric - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* first_data_global - First Data Global Gateway Virtual Terminal Account \* exact - Exact Payments is a payment gateway. \* nuvei - Nuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. This feature is a **Private Beta Release** . [Request access](https://app.chargebee.com/login?forward=https://app.chargebee.com/request_access/nuvei&ref=feature) to enable Nuvei for your test and live sites. \* eway - eWAY Account is a payment gateway. \* amazon_payments - Amazon Payments is a payment service provider. \* sage_pay - Sage Pay is a payment gateway. \* elavon - Elavon Virtual Merchant is a payment solution. \* orbital - Chase Paymentech(Orbital) is a payment gateway. \* beanstream - Bambora(formerly known as Beanstream) is a payment gateway. \* hdfc - HDFC Account is a payment gateway. \* bank_of_america - Bank of America Gateway \* gocardless - GoCardless is a payment service provider. \* paymill - PAYMILL is a payment gateway. \* balanced_payments - Balanced is a payment gateway \* twikey - Twikey is a payment service provider that specializes in processing direct debit payments across the EU. \* moyasar - \* deutsche_bank - Deutsche Bank is the leading German bank with strong European roots and a global network. This feature is a **Private Beta Release**. \* bluepay - BluePay is a payment gateway. \* paypal_express_checkout - PayPal Express Checkout is a payment gateway. \* paypal_payflow_pro - PayPal Payflow Pro is a payment gateway. \* global_payments - Global Payments is a payment service provider. \* not_applicable - Indicates that payment gateway is not applicable for this resource. \* nmi - NMI is a payment gateway. \* worldpay - WorldPay is a payment gateway \* authorize_net - Authorize.net is a payment gateway \* tempus - \* stripe - Stripe is a payment gateway. \* metrics_global - Metrics global is a leading payment service provider providing unified payment services in the US. \* windcave - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* quickbooks - Intuit QuickBooks Payments gateway \* wepay - WePay is a payment gateway. \* ezidebit - Ezidebit is a payment gateway integration based in Australia that supports automated direct debit, BPAY, and card payments for businesses. This feature is a **Private Beta Release**. \* wirecard - WireCard Account is a payment service provider. \* chargebee_payments - Chargebee Payments gateway \* paypal_pro - PayPal Pro Account is a payment gateway. \* paypal - PayPal Commerce is a payment gateway. \* ingenico_direct - Worldline Online Payments is a payment gateway. \* ogone - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* migs - MasterCard Internet Gateway Service payment gateway. \* vantiv - Vantiv is a payment gateway. \* eway_rapid - eWAY Rapid is a payment gateway. \* mollie - Mollie is a payment gateway. \* solidgate - Solidgate is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. This feature is a **Private Beta Release**. \* ebanx - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion.
One ofchargebeechargebee_paymentsadyenstripewepaybraintreeauthorize_netpaypal_propinewayeway_rapidworldpaybalanced_paymentsbeanstreambluepayelavonfirst_data_globalhdfcmigsnmiogonepaymillpaypal_payflow_prosage_paytcowirecardamazon_paymentspaypal_express_checkoutgocardlessorbitalmoneris_usmonerisbluesnapcybersourcevantivcheckout_compaypalingenico_directexactmollie
gateway_account_idstringThe gateway account to which this payment source is stored with.
ip_addressstringThe IP address of the customer. Used primarily for referral integration and EU VAT validation.
issuing_countrystring[two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code.
deletedbooleanrequiredIndicates that this resource has been deleted.
business_entity_idstring<p class="mb-2">The unique ID of the <a href="/docs/api/advanced-features">business entity</a> of this <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_source</code>. This is always the same as the business entity of the <a href="/docs/api/payment_sources/payment_source-object#customer_id">customer</a>.</p> <span featureId="cb-mbe" isMicro="true"></span>
cardobject17 fieldsCard details associated with this payment source.
bank_accountobject11 fieldsBank account details the direct debit or ACH or NetBanking agreement/mandate created with this payment source.
boletoobject4 fieldsBoleto payment source details of the customer
billing_addressobject14 fieldsBilling address for the payment source.
amazon_paymentobject2 fieldsAmazon payments details associated with this payment source.
upiobject1 fieldsRepresents the payment method that allows you to make payments directly using a bank account.
paypalobject2 fieldsPayPal Express Checkout details associated with this payment source.
venmoobject1 fieldsVenmo details associated with this payment source.
klarna_pay_nowobject1 fieldsKlarna Pay Now payment source details of the customer
mandatesarray<object>3 fieldsMandate details associated with the payment source.
{
"customer": null,
"payment_source": null
}
Need more? See the Chargebee guide for connection setup and behaviour shared by every action.