Menu
Create Invoice For Items And One Time Charges
Create invoice for items and one-time charges
/invoices/create_for_charge_items_and_chargesUse it in a workflow
- Add a step and choose the Chargebee connector.
- Pick the Create Invoice For Items And One Time Charges action (under Chargebee API).
- Fill in the fields below, then reference the result from later steps as
{{createInvoiceForItemsAndOneTimeCharges.response.data}}.
Request
Headers
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.
customer_idstring<p class="mb-2">Unique ID of the customer this invoice should be created for. Either this 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">subscription_id</code> must be provided.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong></p><p class="mb-2">The invoice is <a href="/docs/api/getting-started">linked</a> to the same <a href="/docs/api/getting-started">business entity</a> as this customer.</p></div> <span featureId="cb-mbe" isMicro="true"></span>
subscription_idstring<p class="mb-2">Unique ID of the subscription this invoice should be created for. Either this 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">customer_id</code> must be provided.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong></p><p class="mb-2">The invoice is <a href="/docs/api/getting-started">linked</a> to the same <a href="/docs/api/getting-started">business entity</a> as this subscription.</p></div> <span featureId="cb-mbe" isMicro="true"></span>
currency_codestringThe currency code (ISO 4217 format) of the invoice amount.
invoice_notestringA note for this particular invoice. This, and [all other notes](/docs/api/invoices/invoice-object#notes) for the invoice are displayed on the PDF invoice sent to the customer.
remove_general_noteboolean<p class="mb-2">Set 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">true</code> to remove the <a href="https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes" target="_blank"><strong class="font-semibold">general note</strong></a> from this invoice.</p>
Default false
po_numberstringPurchase Order Number for this invoice.
coupon_idsarray<string>List of Coupons to be added.
authorization_transaction_idstringAuthorization transaction to be captured.
payment_source_idstringPayment source to be used for this payment.
auto_collectionstring<p class="mb-2">If specified, the customer level auto collection will be overridden.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">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">create_pending_invoice</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">true</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">auto_collection</code> cannot be passed. When the pending invoice is closed, the <a href="/docs/api/subscriptions/subscription-object#auto_collection" class="text-blue-600 hover:text-blue-800 underline">subscription</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">auto_collection</code> setting is used when available; otherwise, the <a href="/docs/api/customers/customer-object#auto_collection" class="text-blue-600 hover:text-blue-800 underline">customer</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">auto_collection</code> setting applies.</li> </ul></div> * on - <p class="mb-2">Whenever an invoice is created, an automatic attempt will be made to charge.</p> * off - <p class="mb-2">Whenever an invoice is created as payment due.</p>
One ofonoff
net_term_daysinteger (int32)invoice_dateinteger (unix-time)<p class="mb-2">The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. <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">taxes</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">line_item_taxes</code> are computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.</p>
create_pending_invoiceboolean<p class="mb-2">When 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>, the invoice is created with <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> 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">pending</code> and payment is not collected. The invoice can be closed later via the <a href="/docs/api/invoices/close-a-pending-invoice" class="text-blue-600 hover:text-blue-800 underline">close a pending invoice</a> operation.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Prerequisites</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/billing/2.0/usage-based-billing/setting-up-usage-based-billing" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Usage-based billing</a> must be enabled for the site.</li> <li class="text-base leading-relaxed"><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">subscription_id</code> must be provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Payment collection parameters cannot be passed when this parameter 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">true</code>. This includes <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_id</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">authorization_transaction_id</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">auto_collection</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">payment_method</code> parameters, <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> parameters, <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_intent</code> parameters, 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">token_id</code>.</li> <li class="text-base leading-relaxed"><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">auto_collection</code> cannot be overridden on this request. When the pending invoice is closed, the <a href="/docs/api/subscriptions/subscription-object#auto_collection" class="text-blue-600 hover:text-blue-800 underline">subscription</a> or <a href="/docs/api/customers/customer-object#auto_collection" class="text-blue-600 hover:text-blue-800 underline">customer</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">auto_collection</code> setting applies.</li> </ul></div>
token_idstringToken generated by Chargebee JS representing payment method details.
replace_primary_payment_sourcebooleanIndicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.
Default false
retain_payment_sourcebooleanIndicates whether the payment source should be retained for the customer.
Default true
payment_initiatorstringThe type of initiator to be used for the payment request triggered by this operation. \* customer - Pass this value to indicate that the request is initiated by the customer \* merchant - Pass this value to indicate that the request is initiated by the merchant
One ofcustomermerchant
shipping_addressobjectParameters for shipping_address
first_namestringThe first name of the contact.
last_namestringThe last name of the contact.
emailstring (email)The email address.
companystringThe company name.
phonestringThe phone number.
line1stringAddress line 1
line2stringAddress line 2
line3stringAddress line 3
citystringThe name of the city.
state_codestring<p class="mb-2">The <a href="https://www.iso.org/obp/ui/#search/code" target="_blank">ISO 3166-2 state/province code</a> without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set <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">state_code</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">AZ</code> (not <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">US-AZ</code> ). For Tamil Nadu (India), set 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">TN</code> (not <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">IN-TN</code> ). For British Columbia (Canada), set 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">BC</code> (not <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">CA-BC</code> ).</p>
statestring<p class="mb-2">The state/province name. Is set by Chargebee automatically for US, Canada and India 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">state_code</code> is provided.</p>
zipstringZip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address) .
countrystring<p class="mb-2">The billing address country of the customer. Must be one of <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank" rel="noopener noreferrer">ISO 3166 alpha-2 country code</a> .</p> <p class="mb-2"><strong class="font-semibold">Note</strong>: If you enter an invalid country code, the system will return an error.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Brexit</strong></p><p class="mb-2">If you have enabled <a href="https://www.chargebee.com/docs/eu-vat.html" target="_blank" rel="noopener noreferrer">EU VAT</a> in 2021 or later, or have <a href="https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee" target="_blank" rel="noopener noreferrer">manually enable</a> the Brexit configuration, then <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> (the code for <strong class="font-semibold">United Kingdom - Northern Ireland</strong>) is available as an option.</p></div>
validation_statusstringThe address verification status. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid.
One ofnot_validatedvalidpartially_validinvalidDefault "not_validated"
statement_descriptorobjectParameters for statement_descriptor
descriptorstringPayment descriptor text
cardobjectParameters for card
gateway_account_idstringThe gateway account in which this payment source is stored.
first_namestringCardholder's first name
last_namestringCardholder's last name
numberstringThe credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js) , you can specify the Braintree encrypted card number here.
expiry_monthinteger (int32)Card expiry month.
expiry_yearinteger (int32)Card expiry year.
cvvstringThe card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js) , you can specify the Braintree encrypted CVV here.
preferred_schemestringThe customer's preferred card scheme for co-branded cards. **Note**: Currently, this parameter is only supported for Stripe. \* cartes_bancaires - A Cartes Bancaires card scheme. \* mastercard - A MasterCard scheme. \* visa - A Visa card scheme.
One ofcartes_bancairesmastercardvisa
billing_addr1stringAddress line 1, as available in card billing address.
billing_addr2stringAddress line 2, as available in card billing address.
billing_citystringCity, as available in card billing address.
billing_state_codestring<p class="mb-2">The <a href="https://www.iso.org/obp/ui/#search/code" target="_blank">ISO 3166-2 state/province code</a> without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set <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">state_code</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">AZ</code> (not <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">US-AZ</code> ). For Tamil Nadu (India), set 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">TN</code> (not <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">IN-TN</code> ). For British Columbia (Canada), set 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">BC</code> (not <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">CA-BC</code> ).</p>
billing_statestring<p class="mb-2">The state/province name. Is set by Chargebee automatically for US, Canada and India 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">state_code</code> is provided.</p>
billing_zipstringPostal or Zip code, as available in card billing address.
billing_countrystring<p class="mb-2">The billing address country of the customer. Must be one of <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank" rel="noopener noreferrer">ISO 3166 alpha-2 country code</a> .</p> <p class="mb-2"><strong class="font-semibold">Note</strong>: If you enter an invalid country code, the system will return an error.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Brexit</strong></p><p class="mb-2">If you have enabled <a href="https://www.chargebee.com/docs/eu-vat.html" target="_blank" rel="noopener noreferrer">EU VAT</a> in 2021 or later, or have <a href="https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee" target="_blank" rel="noopener noreferrer">manually enable</a> the Brexit configuration, then <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> (the code for <strong class="font-semibold">United Kingdom - Northern Ireland</strong>) is available as an option.</p></div>
additional_informationobject<ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"> <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">checkout_com</code>: While adding a new payment method using <a href="/docs/api/payment_sources/create-using-permanent-token">permanent token</a> or passing raw card details to Checkout.com, <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">document</code> ID 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">country_of_residence</code> are required to support payments through <a href="https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal" target="_blank">dLocal</a>.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">payer</code>: User related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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_of_residence</code>: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a <a href="https://docs.checkout.com/resources/codes/country-codes" target="_blank">two-character ISO code</a>.</li> <li class="text-base leading-relaxed"><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">document</code>: Document ID is the user's <a href="https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents" target="_blank">identification number</a> based on their country.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">bluesnap</code>: While passing raw card details to BlueSnap, 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">fraud_session_id</code> is added, <a href="https://developers.bluesnap.com/docs/fraud-prevention" target="_blank">additional validation</a> is performed to avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud_session_id</code>: Your <a href="https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector" target="_blank">BlueSnap fraud session ID</a> required to perform anti-fraud validation.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">braintree</code>: While passing raw card details to Braintree, your <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">fraud_merchant_id</code> and the user'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">device_session_id</code> can be added to perform <a href="https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data" target="_blank">additional validation</a> and avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">device_session_id</code>: Session ID associated with the user's device.</li> <li class="text-base leading-relaxed"><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">fraud_merchant_id</code>: Your <a href="https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data" target="_blank">merchant ID</a> for fraud detection.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">chargebee_payments</code>: While passing raw card details to Chargebee Payments, 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">fraud_session_id</code> is added, additional validation is performed to avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud_session_id</code>: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">bank_of_america</code>: While passing raw card details to Bank of America, your user'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">device_session_id</code> can be added to perform additional validation and avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">device_session_id</code>: Session ID associated with the user's device.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">ecentric</code>: This parameter is used to verify and process payment method details in Ecentric. 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">merchant_id</code> parameter is included, Chargebee will vault it / perform a lookup and verification against 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">merchant_id</code>, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">merchant_id</code>: Merchant GUID where the card is vaulted or need to be vaulted.</li> </ul> </li> <li class="text-base leading-relaxed"> <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">ebanx</code>: While passing raw card details to EBANX, the user'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">document</code> is required for some countries 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">device_session_id</code> can be added to perform <a href="https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint" target="_blank">additional validation</a> and avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">payer</code>: User related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">document</code>: Document is the user's identification number based on their country.</li> </ul> </li> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">device_session_id</code>: Session ID associated with the user's device</li> </ul> </li> </ul> </li> </ul>
bank_accountobjectParameters for bank_account
gateway_account_idstringThe gateway account in which this payment source is stored.
ibanstringAccount holder's International Bank Account Number. For the [GoCardless](https://www.chargebee.com/docs/gocardless.html) platform, this can be the [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details)
first_namestringAccount holder's first name as per bank account. If not passed, details from customer details will be considered.
last_namestringAccount holder's last name as per bank account. If not passed, details from customer details will be considered.
companystringAccount holder's company name as per bank account. If not passed, details from customer details will be considered.
emailstring (email)Account holder's email address. If not passed, details from customer details will be considered. All Direct Debit compliant emails will be sent to this email address.
phonestringPhone number of the account holder that is linked to the bank account.
bank_namestringName of account holder's bank.
account_numberstringAccount holder's bank account number.
routing_numberstringBank account routing number.
bank_codestringIndicates the bank code.
account_typestringRepresents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/) ACH and Razorpay NetBanking users only. If not passed, account type is taken as null. \* checking - Checking Account \* business_checking - Business Checking Account \* savings - Savings Account \* current - Current Account
One ofcheckingsavingsbusiness_checkingcurrent
account_holder_typestringFor Stripe ACH users only. Indicates the account holder type. \* individual - Individual Account. \* company - Company Account.
One ofindividualcompany
echeck_typestringFor Authorize.net ACH users only. Indicates the type of eCheck. \* ppd - Payment Authorization is prearranged between the customer and the merchant. \* ccd - Payment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type. \* web - Payment Authorization obtained from the customer via the internet.
One ofwebppdccd
issuing_countrystring[two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code. Required when local bank details are provided, and not IBAN.
swedish_identity_numberstringFor GoCardless Autogiro users only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
billing_addressobject<p class="mb-2">The billing address associated with the bank account. The value is a JSON object with the following keys and their values:- <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">first_name</code>:(string, max chars=150) The first name of the contact.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">last_name</code>:(string, max chars=150) The last name of the contact.</li> <li class="text-base leading-relaxed"><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">company_name</code>:(string, max chars=250) The company name for the address.</li> <li class="text-base leading-relaxed"><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">line1</code>:(string, max chars=180) The first line of the address.</li> <li class="text-base leading-relaxed"><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">line2</code>:(string, max chars=180) The second line of the address.</li> <li class="text-base leading-relaxed"><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>:(string) The name of the country for the address.</li> <li class="text-base leading-relaxed"><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</code>:(string, max chars=50) The two-letter, <a href="https://www.iso.org/iso-3166-country-codes.html">ISO 3166 alpha-2</a> country code for the address.</li> <li class="text-base leading-relaxed"><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">state</code>:(string, max chars=50) The name of the state or province for the address. When not provided, this is set automatically for US, Canada, and India.</li> <li class="text-base leading-relaxed"><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">state_code</code>:(string, max chars=50) The <a href="https://www.iso.org/obp/ui/#search/code/">ISO 3166-2 state/province code</a> without the country prefix. This is supported for USA, Canada, and India. For instance, for Arizona (USA), set state_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">AZ</code> (not <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">US-AZ</code>). For Tamil Nadu (India), set 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">TN</code> (not <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">IN-TN</code>). For British Columbia (Canada), set 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">BC</code> (not <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">CA-BC)</code>.</li> <li class="text-base leading-relaxed"><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">city</code>:(string, max chars=50) The city name for the address.</li> <li class="text-base leading-relaxed"><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">postal_code</code>:(string, max chars=20) The postal or ZIP code for the address.</li> <li class="text-base leading-relaxed"><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">phone</code>:(string, max chars=50) The contact phone number for the address.</li> <li class="text-base leading-relaxed"><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">email</code>:(string, max chars=70) The contact email address for the address.</li> </ul>
payment_methodobjectParameters for payment_method
typestringThe type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer) API under Customer resource. \* grab_pay - Payments made via GrabPay \* go_pay - Payments made via GoPay \* google_pay - Payments made via Google Pay. \* after_pay - Payments made via Afterpay \* pix - Payments made via Pix \* pay_by_bank - Pay By Bank \* sofort - Payments made via Sofort. \* twint - Payments made via Twint \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* giropay - Payments made via giropay. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* paypay - \* south_korean_cards - \* bancontact - Payments made via Bancontact Card. \* upi - UPI Payments. \* revolut_pay - Payments made via Revolut Pay. \* stablecoin - Payments made via Stablecoin. \* alipay - Payments made via Alipay. This payment source is deprecated. \* payme - Payments made via PayMe \* pay_to - Payments made via PayTo \* pay_co - Payments made via PayCo \* kakao_pay - Payments made via Kakao Pay. \* wechat_pay - Payments made via WeChat Pay. This payment source is deprecated. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* dotpay - Payments made via Dotpay. \* klarna - Payments made via Klarna. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* ideal - Payments made via iDEAL. \* electronic_payment_standard - Electronic Payment Standard \* generic - Payments made via Generic Payment Method. \* klarna_pay_now - Payments made via Klarna Pay Now \* faster_payments - Payments made via Faster Payments \* swish - Payments made via Swish \* venmo - Payments made via Venmo \* payconiq_by_bancontact - Payments made via Payconiq by Bancontact. \* naver_pay - Payments made via Naver Pay. \* automated_bank_transfer - Represents virtual bank account using which the payment will be done. \* amazon_payments - Payments made via Amazon Payments. \* gcash - \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* online_banking_poland - \* trustly - Trustly \* kbc_payment_button - KBC Payment Button \* alipay_hk - \* cash_app_pay - Payments made via Cash App 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
gateway_account_idstringThe gateway account in which this payment source is stored.
reference_idstringThe 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 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. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer) API under Customer resource.
tmp_tokenstringSingle-use tokens created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.Net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details.
issuing_countrystring<p class="mb-2"><a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank">ISO 3166 alpha-2 country code</a> .</p> <p class="mb-2"><strong class="font-semibold">Note</strong>: If you enter an invalid country code, the system will return an error.</p> <p class="mb-2">If you have enabled <a href="https://www.chargebee.com/docs/eu-vat.html" target="_blank">EU VAT</a> in 2021 or have <a href="https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee" target="_blank">manually enabled</a> the Brexit configuration, then <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> (the code for <strong class="font-semibold">United Kingdom - Northern Ireland</strong> ) is available as an option.</p>
additional_informationobject<ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"> <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">checkout_com</code>: While adding a new payment method using <a href="/docs/api/payment_sources/create-using-permanent-token">permanent token</a> or passing raw card details to Checkout.com, <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">document</code> ID 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">country_of_residence</code> are required to support payments through <a href="https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal" target="_blank">dLocal</a>.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">payer</code>: User related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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_of_residence</code>: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a <a href="https://docs.checkout.com/resources/codes/country-codes" target="_blank">two-character ISO code</a>.</li> <li class="text-base leading-relaxed"><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">document</code>: Document ID is the user's <a href="https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents" target="_blank">identification number</a> based on their country.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">bluesnap</code>: While passing raw card details to BlueSnap, 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">fraud_session_id</code> is added, <a href="https://developers.bluesnap.com/docs/fraud-prevention" target="_blank">additional validation</a> is performed to avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud_session_id</code>: Your <a href="https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector" target="_blank">BlueSnap fraud session ID</a> required to perform anti-fraud validation.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">braintree</code>: While passing raw card details to Braintree, your <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">fraud_merchant_id</code> and the user'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">device_session_id</code> can be added to perform <a href="https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data" target="_blank">additional validation</a> and avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">device_session_id</code>: Session ID associated with the user's device.</li> <li class="text-base leading-relaxed"><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">fraud_merchant_id</code>: Your <a href="https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data" target="_blank">merchant ID</a> for fraud detection.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">chargebee_payments</code>: While passing raw card details to Chargebee Payments, 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">fraud_session_id</code> is added, additional validation is performed to avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud_session_id</code>: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">bank_of_america</code>: While passing raw card details to Bank of America, your user'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">device_session_id</code> can be added to perform additional validation and avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">device_session_id</code>: Session ID associated with the user's device.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">ecentric</code>: This parameter is used to verify and process payment method details in Ecentric. 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">merchant_id</code> parameter is included, Chargebee will vault it / perform a lookup and verification against 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">merchant_id</code>, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">merchant_id</code>: Merchant GUID where the card is vaulted or need to be vaulted.</li> </ul> </li> <li class="text-base leading-relaxed"> <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">ebanx</code>: While passing raw card details to EBANX, the user'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">document</code> is required for some countries 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">device_session_id</code> can be added to perform <a href="https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint" target="_blank">additional validation</a> and avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">payer</code>: User related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">document</code>: Document is the user's identification number based on their country.</li> </ul> </li> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">device_session_id</code>: Session ID associated with the user's device</li> </ul> </li> </ul> </li> </ul>
payment_intentobjectParameters for payment_intent
idstringIdentifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.
gateway_account_idstringThe gateway account used for performing the 3DS flow.
gw_tokenstringIdentifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.
payment_method_typestringThe list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* card - card \* twint - Payments made via Twint \* dotpay - dotpay \* faster_payments - \* upi - upi \* kbc_payment_button - KBC Payment Button \* klarna - Payments made via Klarna. \* payme - Payments made via PayMe \* google_pay - google_pay \* paypal_express_checkout - paypal_express_checkout \* pix - Pix \* klarna_pay_now - Klarna Pay Now \* ideal - ideal \* boleto - boleto \* wechat_pay - Payments made via WeChat Pay. \* after_pay - Payments made via Afterpay \* grab_pay - Payments made via GrabPay \* direct_debit - direct_debit \* sepa_instant_transfer - \* bancontact - bancontact \* kakao_pay - Payments made via Kakao Pay. \* south_korean_cards - \* swish - Payments made via Swish \* go_pay - Payments made via GoPay \* trustly - Trustly \* naver_pay - Payments made via Naver Pay. \* stablecoin - Payments made via Stablecoin. \* venmo - \* alipay - Payments made via Alipay. \* pay_to - \* pay_co - Payments made via PayCo \* cash_app_pay - Payments made via Cash App Pay. \* alipay_hk - \* netbanking_emandates - netbanking_emandates \* paypay - \* payconiq_by_bancontact - Payments made via Payconiq by Bancontact. \* electronic_payment_standard - Electronic Payment Standard \* pay_by_bank - Pay By Bank \* apple_pay - apple_pay \* online_banking_poland - \* gcash - \* giropay - giropay \* sofort - sofort \* amazon_payments - amazon_payments \* revolut_pay - Payments made via Revolut Pay.
One ofcardidealsofortbancontactgoogle_paydotpaygiropayapple_payupinetbanking_emandatespaypal_express_checkoutdirect_debitboletovenmoamazon_paymentspay_tofaster_paymentssepa_instant_transferklarna_pay_nowonline_banking_polandpayconiq_by_bancontactelectronic_payment_standardkbc_payment_buttonpay_by_banktrustlystablecoinkakao_paynaver_payrevolut_paycash_app_paywechat_payalipaytwintgo_paygrab_paypay_coafter_payswishpaymepix
reference_idstringIdentifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.
additional_informationobject<ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"> <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">checkout_com</code>: While adding a new payment method using <a href="/docs/api/payment_sources/create-using-permanent-token">permanent token</a> or passing raw card details to Checkout.com, <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">document</code> ID 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">country_of_residence</code> are required to support payments through <a href="https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal" target="_blank">dLocal</a>.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">payer</code>: User related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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_of_residence</code>: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a <a href="https://docs.checkout.com/resources/codes/country-codes" target="_blank">two-character ISO code</a>.</li> <li class="text-base leading-relaxed"><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">document</code>: Document ID is the user's <a href="https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents" target="_blank">identification number</a> based on their country.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">bluesnap</code>: While passing raw card details to BlueSnap, 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">fraud_session_id</code> is added, <a href="https://developers.bluesnap.com/docs/fraud-prevention" target="_blank">additional validation</a> is performed to avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud_session_id</code>: Your <a href="https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector" target="_blank">BlueSnap fraud session ID</a> required to perform anti-fraud validation.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">braintree</code>: While passing raw card details to Braintree, your <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">fraud_merchant_id</code> and the user'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">device_session_id</code> can be added to perform <a href="https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data" target="_blank">additional validation</a> and avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">device_session_id</code>: Session ID associated with the user's device.</li> <li class="text-base leading-relaxed"><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">fraud_merchant_id</code>: Your <a href="https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data" target="_blank">merchant ID</a> for fraud detection.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">chargebee_payments</code>: While passing raw card details to Chargebee Payments, 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">fraud_session_id</code> is added, additional validation is performed to avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud_session_id</code>: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">bank_of_america</code>: While passing raw card details to Bank of America, your user'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">device_session_id</code> can be added to perform additional validation and avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">device_session_id</code>: Session ID associated with the user's device.</li> </ul> </li> </ul> </li> <li class="text-base leading-relaxed"> <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">ecentric</code>: This parameter is used to verify and process payment method details in Ecentric. 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">merchant_id</code> parameter is included, Chargebee will vault it / perform a lookup and verification against 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">merchant_id</code>, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">merchant_id</code>: Merchant GUID where the card is vaulted or need to be vaulted.</li> </ul> </li> <li class="text-base leading-relaxed"> <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">ebanx</code>: While passing raw card details to EBANX, the user'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">document</code> is required for some countries 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">device_session_id</code> can be added to perform <a href="https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint" target="_blank">additional validation</a> and avoid fraudulent transactions.</p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">payer</code>: User related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">document</code>: Document is the user's identification number based on their country.</li> </ul> </li> <li class="text-base leading-relaxed"><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">fraud</code>: Fraud identification related information. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">device_session_id</code>: Session ID associated with the user's device</li> </ul> </li> </ul> </li> </ul>
item_pricesobjectParameters for item_prices
item_price_idarray<string>A unique ID for your system to identify the item price.
quantityarray<integer (int32)>Item price quantity
quantity_in_decimalarray<string>The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](/docs/api/getting-started) is enabled.
unit_pricearray<integer (int64)><p class="mb-2">The price or per-unit-price of the item price. By default, it is the <a href="/docs/api/item_prices/item_price-object#price">value set</a> for 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_price</code>. This is only applicable 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">pricing_model</code> 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">item_price</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">flat_fee</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">per_unit</code>. The value depends on the <a href="/docs/api/getting-started">type of currency</a> .</p>
unit_price_in_decimalarray<string>The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](/docs/api/getting-started) is enabled.
date_fromarray<integer (unix-time)>The time when the service period for the item starts.
date_toarray<integer (unix-time)>The time when the service period for the item ends.
descriptionarray<string>The line item name to display on the invoice for this charge item. **Default value** * The invoice name defined for the item in the product catalog.
entity_descriptionarray<string>Descriptive text displayed below the line item name on the invoice for this charge item. **Default value** * The [item price description](/docs/api/item_prices/item_price-object#description) from the product catalog.
item_tiersobjectParameters for item_tiers
item_price_idarray<string>The id of the item price to which this tier belongs.
starting_unitarray<integer (int32)>The lowest value in the quantity tier.
ending_unitarray<integer (int32)>The highest value in the quantity tier.
pricearray<integer (int64)><p class="mb-2">The per-unit price for the tier 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">pricing_model</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">tiered</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">volume</code>. The total cost for the item price 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">pricing_model</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">stairstep</code>. The value is in the minor unit of the currency.</p>
starting_unit_in_decimalarray<string><p class="mb-2">The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as <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">ending_unit_in_decimal</code> of the next lower tier. Returned only when the pricing_model 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">tiered</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">volume</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">stairstep</code> and <a href="/docs/api/getting-started">multi-decimal pricing</a> is enabled.</p>
ending_unit_in_decimalarray<string><p class="mb-2">The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the <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">starting_unit_in_decimal</code> of the next higher tier. Returned only when the pricing_model 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">tiered</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">volume</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">stairstep</code> and <a href="/docs/api/getting-started">multi-decimal pricing</a> is enabled.</p>
price_in_decimalarray<string><p class="mb-2">The decimal representation of the per-unit price for the tier 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">pricing_model</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">tiered</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">volume</code>. 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">pricing_model</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">stairstep</code> , it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and <a href="/docs/api/getting-started">multi-decimal pricing</a> is enabled.</p>
pricing_typearray<string>package_sizearray<integer (int32)><p class="mb-2">Package size for the tier when pricing type 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">package</code>. Specify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.</p>
chargesobjectParameters for charges
entity_descriptionarray<string>Descriptive text for this one-time charge displayed on the invoice, shown below the line item name.
amountarray<integer (int64)>The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started) .
amount_in_decimalarray<string>The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ). Provide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/currencies) is enabled.
descriptionarray<string>The name of this one-time charge as displayed on the invoice line item.
taxablearray<boolean>The amount to be charged is taxable or not.
tax_profile_idarray<string>Tax profile of the charge.
avalara_tax_codearray<string>The Avalara tax codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html) .
hsn_codearray<string>The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true: * [**India**](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst) has been enabled as a **Tax Region**. (An error is returned when this condition is not true.) * The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.
taxjar_product_codearray<string>The TaxJar product codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html) .
avalara_sale_typearray<string>avalara_transaction_typearray<integer (int32)>Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
avalara_service_typearray<integer (int32)>Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
date_fromarray<integer (unix-time)>The time when the service period for the charge starts.
date_toarray<integer (unix-time)>The time when the service period for the charge ends.
notes_to_removeobjectParameters for notes_to_remove
entity_typearray<string>entity_idarray<string>Unique identifier of the [note](/docs/api/invoices/invoice-object#notes) .
tax_providers_fieldsobjectParameters for tax_providers_fields
provider_namearray<string>Name of the tax provider currently supported.
field_idarray<string>Field id of the attribute which tax vendor has provided while getting onboarded with us.
field_valuearray<string>The value of the corresponding tax field.
discountsobjectParameters for discounts
percentagearray<number (double)>The percentage of the original amount that should be deducted from it.
amountarray<integer (int64)>The value of the discount. [The format of this value](/docs/api/currencies) depends on the kind of currency.
quantityarray<integer (int32)>Specifies the number of free units provided for the item, without affecting the total quantity sold
apply_onarray<string>requireditem_price_idarray<string><p class="mb-2">The <a href="/docs/api/subscriptions/subscription-object#subscription_items_item_price_id">id of the item price</a> in the subscription to which the discount is to be applied. Relevant only 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">apply_on</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">specific_item_price</code>.</p> <span featureId="cb-discounts" isMicro="true"></span>
{
"customer_id": null,
"subscription_id": null,
"currency_code": null,
"invoice_note": null,
"remove_general_note": null,
"po_number": null,
"coupon_ids": null,
"authorization_transaction_id": null,
"payment_source_id": null,
"auto_collection": null,
"net_term_days": null,
"invoice_date": null
}
Response
Returns 200 with an object. Read it in later steps with {{createInvoiceForItemsAndOneTimeCharges.response.data.<field>}}.
invoiceobject<div class="api-description"><p class="mb-2">An invoice is a commercial document representing a sale of products/services offered by you to a customer. It enumerates all the charges, adjustments, payments, discounts and taxes associated with the sale.</p><p class="mb-2">An invoice is said to be a recurring one when it is has at least one charge for <a href="/docs/api/items">a plan or an addon item price</a>. It is a non-recurring one when it has charges for only charge-item prices or <a href="https://www.chargebee.com/docs/2.0/charges.html" target="_blank">one-time charges</a>.</p><p class="mb-2">The item prices for any given billing term of a subscription are billed via an invoice at the beginning of the term (unless the charges are left unbilled). However, item prices that belong 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">metered</code> items are billed at the end of the term via 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">pending</code> invoice that can <a href="https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing" target="_blank">close automatically</a> or via <a href="/docs/api/invoices/close-a-pending-invoice">an API call</a>. Moreover, when there are no <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">metered</code> items in the subscription, the invoices can still be generated 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">pending</code> while <a href="/docs/api/subscriptions/create-subscription-for-items">creating</a> or <a href="/docs/api/subscriptions/update-subscription-for-items">updating</a> a subscription.</p><h4>Auto-collection</h4><p class="mb-2">If <a href="https://www.chargebee.com/docs/2.0/customers.html#auto-collection-status" target="_blank">auto-collection</a> is enabled, then immediately on invoice generation (or, in case of subscriptions that have <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">create_pending_invoices</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">true</code>, on <a href="/docs/api/invoices/close-a-pending-invoice">invoice closure</a>), the <a href="/docs/api/customers/customer-object#payment_method">payment method</a> on file is charged:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">If the payment succeeds, the invoice is marked 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">paid</code>.</li> <li class="text-base leading-relaxed">On payment failure, the invoice is marked 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">payment_due</code> and <a href="https://www.chargebee.com/docs/2.0/dunning-v2.html" target="_blank">dunning settings</a> are taken into account for payment retries.</li> <li class="text-base leading-relaxed">If no retry attempts are configured, or when retries are exhausted, the invoice is marked 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">not_paid</code>.</li> <li class="text-base leading-relaxed">the amount due is zero or negative, the invoice is immediately marked 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">paid</code> and the balance, if any, is added to <a href="https://www.chargebee.com/docs/2.0/customers.html#excess-payments" target="_blank">excess payments</a> for the customer.</li> </ul><div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note:</strong> If <a href="https://www.chargebee.com/docs/2.0/consolidated-invoicing.html" target="_blank">consolidated invoicing</a> is enabled, the attribute <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">subscription_id</code> is unavailable when the invoice has line items from multiple subscriptions. The individual subscription ids are seen under <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">line_items.subscription_id</code>.</p></div><div id="recurring-invoice" class="cb-accordion"><div class="cb-accordion-title collapsed" data-toggle="collapse" data-target="#recurring-invoice-content" aria-expanded="false" aria-controls="recurring-invoice-content"><h4>Recurring and non-recurring invoices</h4><i class="fa fa-chevron-circle-down fa-lg" aria-hidden="true"></i></div><div class="collapse" id="recurring-invoice-content"><p class="mb-2">A recurring invoice contains at least one line item that is billed on a recurring basis. Specifically, it has at least one <a href="/docs/api/invoices/invoice-object#line_items" 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">line_items[]</code></a> with <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_type</code> 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_item_price</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">addon_item_price</code>. A non-recurring invoice contains no recurring line items.</p></div></div><div id="refundable-amount" class="cb-accordion"><div class="cb-accordion-title collapsed" data-toggle="collapse" data-target="#refundable-amount-content" aria-expanded="false" aria-controls="refundable-amount-content"><h4>Refundable amount for an invoice</h4><i class="fa fa-chevron-circle-down fa-lg" aria-hidden="true"></i></div><div class="collapse" id="refundable-amount-content"><p class="mb-2">The refundable amount for an invoice is the (amount paid on the invoice + refundable credit applied on the invoice + taxes withheld on the invoice) minus (amount issued as refundable credit notes from the invoice). Each of these amounts is obtained from the invoice resource as follows:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Amount paid on the invoice: <a href="/docs/api/invoices/invoice-object#invoice_amount_paid" 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">amount_paid</code></a></li> <li class="text-base leading-relaxed">Refundable credit applied on the invoice: <a href="/docs/api/invoices/invoice-object#invoice_credits_applied" 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">credits_applied</code></a></li> <li class="text-base leading-relaxed">Taxes withheld on the invoice: Sum of <a href="/docs/api/invoices/invoice-object#invoice_linked_taxes_withheld" 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">linked_taxes_withheld[].amount</code></a></li> <li class="text-base leading-relaxed">Amount issued as refundable credit notes from the invoice: Sum of <a href="/docs/api/invoices/invoice-object#invoice_issued_credit_notes" 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">issued_credit_notes[i].cn_total</code></a> 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">issued_credit_notes[i].cn_status</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">refunded</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">refund_due</code>.</li> </ul></div></div></div>
idstringrequiredThe invoice number. Acts as a identifier for invoice and typically generated sequentially.
customer_idstringrequiredThe identifier of the customer this invoice belongs to.
payment_ownerstringPayment owner of an invoice
subscription_idstring<p class="mb-2">The identifier of the subscription this invoice belongs to. <strong class="font-semibold">Note</strong>: When consolidated invoicing is enabled, you have to refer to <a href="/docs/api/invoices/invoice-object#line_items">line_item`s</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">subscription_id</code> to identify the subscriptions associated with this invoice. However, it is important to avoid using this attribute if the invoice includes charges from multiple subscriptions, as it will be null in such cases.</p>
recurringbooleanrequiredBoolean indicating whether this invoice belongs to a subscription
Default true
statusstringrequired<p class="mb-2">Current status of this invoice.</p> * paid - <p class="mb-2">Indicates a paid invoice.</p> * posted - <p class="mb-2">Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period</p> * pending - <p class="mb-2">The <a href="/docs/api/invoices/invoice-object#status">invoice</a> is yet to be closed (sent for payment collection). An invoice is generated with 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">status</code> when it has line items that belong to items that 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">metered</code> or 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">subscription.create_pending_invoices</code>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>. The <a href="/docs/api/v2/pcv-1/invoices/invoice-object#status">invoice</a> is yet to be closed (sent for payment collection). All invoices are generated with 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">status</code> when <a href="https://www.chargebee.com/docs/1.0/metered_billing.html" target="_blank">Metered Billing</a> is enabled for the site.</p> * payment_due - <p class="mb-2">Indicates the payment is not yet collected and is being retried as per retry settings.</p> * not_paid - <p class="mb-2">Indicates the payment is not made and all attempts to collect is failed.</p> * voided - <p class="mb-2">Indicates a voided invoice.</p>
One ofpaidpostedpayment_duenot_paidvoidedpending
dateinteger (unix-time)<p class="mb-2">The document date displayed on the invoice PDF. By default, it has the same value as the effective date of the action that created the invoice (subscription creation, update, or invoice creation). This date can be backdated (set to a value in the past) while performing the actions. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription or non-recurring charge is effective as of a past date. However, if the invoice is created 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">pending</code> , and if the site is configured to set invoice dates to the date of closing, then upon invoice closure, this date is changed to the invoice closing date.</p>
due_dateinteger (unix-time)Due date of the invoice
net_term_daysinteger (int32)<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>
Default 0
po_numberstringPurchase Order Number for this invoice
vat_numberstringVAT/ Tax registration number of the customer. [Learn more](https://www.chargebee.com/docs/tax.html#capture-tax-registration-number)
price_typestringrequiredThe price type of the invoice. \* tax_exclusive - All amounts in the document are exclusive of tax. \* tax_inclusive - All amounts in the document are inclusive of tax.
One oftax_exclusivetax_inclusiveDefault "tax_exclusive"
exchange_ratenumber (decimal)Exchange rate used for base currency conversion.Note that when converting foreign currency invoices to local currency for VAT purposes, the exchange rates used differ from the base currency exchange rate provided in this field. This is due to regulations set by tax authorities, which require the use of official sources such as European Central Bank rates for local currency conversion.
local_currency_exchange_ratenumber (decimal)This parameter represents the exchange rate as a relative price of the base currency that appears as local currency in invoices and credit notes. The local currency exchange rate specifically refers to the exchange rate of a country's currency when converting it to another currency. For example, if you want to convert US dollars to euros, the local currency exchange rate would be the rate at which you can convert US dollars to euros.
currency_codestringrequiredThe currency code (ISO 4217 format) for the invoice
local_currency_codestringThe currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed.
taxinteger (int64)requiredTotal tax amount for this invoice
sub_totalinteger (int64)required<p class="mb-2">The sum of all the line item amounts minus the sum of all line item discounts. In other words, this is the sum of all <code><a href="/docs/api/invoices/invoice-object#line_items">line_items[]</a>.amount</code></p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">the sum of all <code><a href="/docs/api/invoices/invoice-object#line_item_discounts">line_item_discounts[]</a>.discount_amount</code>.</li> </ul>
sub_total_in_local_currencyinteger (int64)Invoice subtotal in the currency of the place of supply.
totalinteger (int64)Invoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on.
total_in_local_currencyinteger (int64)Total invoice amount in the currency of the place of supply.
amount_dueinteger (int64)<p class="mb-2">The unpaid amount that is due on the invoice. This is calculated as: <code><a href="/docs/api/invoices/invoice-object#total">total</a></code></p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"> <code><a href="/docs/api/invoices/invoice-object#amount_paid">amount_paid</a></code> </li> <li class="text-base leading-relaxed">sum of <code><a href="/docs/api/invoices/invoice-object#applied_credits">applied_credits</a>.applied_amount</code></li> <li class="text-base leading-relaxed">sum of <code><a href="/docs/api/invoices/invoice-object#adjustment_credit_notes">adjustment_credit_notes</a>.cn_total</code></li> <li class="text-base leading-relaxed">sum of <code><a href="/docs/api/invoices/invoice-object#linked_taxes_withheld">linked_taxes_withheld</a>.amount</code>.</li> </ul>
amount_adjustedinteger (int64)Total adjustments made against this invoice.
Default 0
amount_paidinteger (int64)<p class="mb-2">Payments collected successfully for the invoice. This is the sum of <code><a href="/docs/api/invoices/invoice-object#linked_payments">linked_payments[]</a>.txn_amount</code> for all <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">linked_payments[]</code> that have <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">txn_status</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">success</code>.</p>
paid_atinteger (unix-time)Timestamp indicating the date \& time this invoice got paid.
write_off_amountinteger (int64)Amount written off against this invoice.
Default 0
credits_appliedinteger (int64)Total credits applied against this invoice.
Default 0
dunning_statusstringCurrent dunning status of the invoice. \* exhausted - Maximum number of attempts have been made. \* stopped - Dunning has stopped for this invoice. \* success - Payment successfully collected during dunning process. \* in_progress - Dunning is still in progress.
One ofin_progressexhaustedstoppedsuccess
next_retry_atinteger (unix-time)Timestamp indicating when will the next attempt to collect payment for this invoice occur.
voided_atinteger (unix-time)Timestamp indicating the date \& time this invoice got voided.
resource_versioninteger (int64)<p class="mb-2">The version number of this resource. For every change made to the resource, <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.</p>
updated_atinteger (unix-time)Timestamp indicating when this invoice was last updated. This attribute will be present only if the resource has been updated after 2016-09-28. **Note** : This value does not change when the following attributes are changed: *next_retry_at, dunning_status, has_advance_charges*
line_items_next_offsetstring<p class="mb-2">This attribute is returned only if additional resources are available. Use this value as the input parameter 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">line_items_offset</code> to retrieve the next set of resources.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note:</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Applicable only when Enterprise-scale Invoicing is enabled.</li> <li class="text-base leading-relaxed">Enterprise-scale Invoicing is currently in <strong class="font-semibold">Private Beta</strong>. Please reach out to <a href="https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Chargebee Support</a> to enable this feature.</li> </ul></div>
first_invoicebooleanBoolean indicating the first invoice raised for the subscription. In the case of a non-recurring invoice, it indicates the first invoice raised for the customer.
new_sales_amountinteger (int64)<p class="mb-2">The share of the invoice total due to new sales. 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">first_invoice</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">true</code> , this attribute is the same as total. However, when the invoice is a <a href="https://www.chargebee.com/docs/2.0/consolidated-invoicing.html " target="_blank">consolidated</a> one, then it is the sum of all <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">line_items.amount</code> belonging to a new.</p>
has_advance_chargesbooleanIndicates whether an [advance charge](https://www.chargebee.com/docs/billing/2.0/invoices-credit-notes-and-quotes/advance-invoices) is present in this invoice.
term_finalizedbooleanrequiredBoolean indicating this invoice line_items terms are finalized or not.
Default true
is_giftedbooleanrequiredBoolean indicating this invoice is gifted or not.
Default false
generated_atinteger (unix-time)<p class="mb-2">The date when the invoice is finalized. This is the date in the invoice lifecycle when its <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> becomes any one of the following for the first time: <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">posted</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">paid</code>. For an invoice with <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> 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">pending</code> , this happens when it gets closed.</p>
expected_payment_dateinteger (unix-time)The date and time at which [dunning](https://www.chargebee.com/docs/payments/2.0/dunning-v2.html) should resume automatically for the invoice. This attribute is present only if dunning is currently [paused](/docs/api/invoices/pause-dunning-for-invoice) for the invoice. **See also** : [Dunning resumption process](/docs/api/invoices/resume-dunning-for-invoice).
{
"invoice": null
}
Need more? See the Chargebee guide for connection setup and behaviour shared by every action.