Multiple Business Entities - API Change Summary
Overview
This document summarizes the changes made to the Chargebee Billing APIs as part of the Business Entities feature.
business_entity
resource
business_entity
endpoints
Transfer a customer to another business entity
List business entity transfers
business_entity_transfer
resource
business_entity_transfer Resource
customer
resource
Attributes
Name | Description |
---|---|
| string max chars = 50 The unique identifier of the Note: When the |
| string max chars = 50 Note: Present only when the Represents the |
| string max chars = 50 always returned The unique ID of the business entity of this customer. |
customer
endpoints
create_a_customer
Parameter added
Name | Description |
---|---|
| string max chars = 50 optional The unique ID of the business entity this customer should be linked to. Applicable only when multiple business entities have been created for the site. When not provided, the customer is linked to the default business entity defined for the site. |
merge_customers
Description updated
This API moves a customer's payment methods, subscriptions, invoices, credit notes, transactions, unbilled charges, and orders to another customer. Events and email logs will not be moved. The API execution is asynchronous.
link_a_customer
Description updated
Sets a customer into a hierarchical relationship with another. The path parameter customer_id
is the id of the child in the relationship.
Note:
For the
use_default_hierarchy_settings
,parent_account_access
andchild_account_access
parameters, the 'parent' is the customer whose id is payment_owner_id. However, if thepayment_owner_id
is the child itself, then the parent is parent_id.The parent and the child customers must belong to the same business entity.
subscription
resource
Attributes
Name | Description |
---|---|
| The unique identifier of the |
| Represents the |
| string max chars = 50 always returned The unique ID of the business entity of this subscription. This is always the same as the business entity of the customer. |
subscription
endpoints
create_subscription_for_items
Parameter added
Name | Description |
---|---|
| string max chars = 50 optional The unique ID of the business entity this subscription should be linked to. Applicable only when multiple business entities have been created for the site. This must be the same as the business entity of the |
invoice
resource
Attribute added
Name | Description |
---|---|
| string max chars = 50 always returned The unique ID of the business entity of this invoice. Depending on whether the invoice was created directly for a customer or for a subscription, this is the business entity of the customer or the subscription respectively. |
invoice
endpoints
create_invoice_for_items_and_one-time_charges
Parameter descriptions updated
Name | Description |
---|---|
| string max chars = 50 optional Unique ID of the customer this invoice should be created for. Either this or |
| string max chars = 50 optional Unique ID of the subscription this invoice should be created for. Either this or |
credit_note
resource
Attribute added
Name | Description |
---|---|
| string max chars = 50 always returned The unique ID of the business entity of this |
payment_intent
resource
Attribute added
Name | Description |
---|---|
| string max chars = 50 always returned The unique ID of the business entity of this |
payment_intent
endpoints
create_a_payment_intent
Description updated
Creates a PaymentIntent object. This is to be used with Chargebee.js API to complete the 3DS flow for new or stored cards.
While creating, specify the appropriate gateway account and amount. The exact amount can be estimated using our Estimate API.
Customer resource lookup and creation
When customer[id]
is provided for this operation, it is looked up by Chargebee, and if found, the payment_intent
is created for it. If not found, a new customer resource is created with the ID provided, and the payment_intent
is created.
Multiple business entities
If multiple business entities are created for the site, the customer resource lookup and creation happen within the context of the business entity specified in this API call. If no business entity is specified, the customer resource lookup is performed within the site context, and if not found, the resource is created for the default business entity of the site.
New parameter added
Name | Description |
---|---|
| string max chars = 50 optional Sets the context for this operation to the business entity specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site. |
Parameter description updated
Name | Description |
---|---|
| The unique ID of the customer for which this |
payment_source
resource
Attribute added
Name | Description |
---|---|
| string max chars = 50 always returned The unique ID of the business entity of this |
transaction
resource
Attribute added
Name | Description |
---|---|
| string max chars = 50 always returned The unique ID of the business entity of this |
hosted_page
resource
Attribute added
Name | Description |
---|---|
| string max chars = 50 always returned The unique ID of the business entity of this |
hosted_page
endpoints
checkout_charge_items_and_one_time_charges
Description updated
Create a Chargebee hosted page to accept payment details from a customer and checkout charge-items and one-time charges.
The following steps describe how best to use this API:
Call this endpoint, providing item prices, charges, coupons and a host of other details such as billing and shipping addresses of the customer, to be prefilled on the checkout page.
Send the customer to the Checkout
url
received in the response.Once they complete checkout, the set of charge-items and one-time charges are automatically invoiced against the respective
customer
record in Chargebee, and they are redirected to theredirect_url
with theid
andstate
attributes passed as query string parameters.Retrieve the hosted page at this stage to get the invoice details.
Customer resource lookup and creation
When customer[id]
is provided for this operation, it is looked up by Chargebee, and if found, the hosted page is created for it. If not found, a new customer resource is created with the ID provided, and the hosted page is created.
Multiple business entities
If multiple business entities are created for the site, the customer resource lookup and creation happen within the context of the business entity specified in this API call. If no business entity is specified, the customer resource lookup is performed within the site context, and if not found, the resource is created for the default business entity of the site.
New parameter added
Name | Description |
---|---|
| string max chars = 50 optional Sets the context for this operation to the business entity specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site. |
Parameter description updated
Name | Description |
---|---|
| The unique ID of the customer for which this hosted page should be created. If not provided, the ID of the newly created customer resource is autogenerated. |
create_checkout_for_a_new_subscription
Description updated
Create a Chargebee hosted page to accept payment details from a customer and checkout a new subscription.
The following steps describe how best to use this API:
Call this endpoint, providing item prices, coupons and a host of other details such as billing and shipping addresses to be prefilled for the customer on the checkout page.
Send the customer to the Checkout
url
received in the response.Once they complete checkout, a new subscription is automatically created and the customer is redirected to the
redirect_url
with theid
andstate
attributes passed as query string parameters.
Although the customer will be redirected to theredirect_url
after successful checkout, we do not recommend relying on it for completing critical post-checkout actions. This is because redirection may not happen due to unforeseen reasons. Chargebee recommends listening to appropriate webhooks such assubscription_created
orinvoice_generated
to verify a successful checkout.Retrieve the hosted page at this stage to get the subscription and invoice details.
Customer resource lookup and creation
When the customer[id]
parameter is provided and if a customer resource with the ID is found to be already created in Chargebee, the subscription is created under that customer resource. If not found, then a new customer resource is created with the ID provided and the subscription is created under it.
Multiple business entities
If multiple business entities are created for the site, the customer resource lookup and creation happens within the context of the business entity specified in this API call. If no business entity is specified, the customer resource lookup is performed within the site context and if not found, the resource is created for the default business entity of the site.
New parameter added
Name | Description |
---|---|
| string max chars = 50 optional Sets the context for this operation to the business entity specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site. |
Parameter description updated
Name | Description |
---|---|
| The unique identifier for the customer resource for which the subscription should be created. When not provided, a new customer is created with the ID set to the value provided for |
checkout_gift_subscription_for_items
Description updated
Creates a hosted page for a customer (called the gifter) to gift a subscription to another customer (called the receiver).
Gifter customer resource lookup and creation
When gifter.customer_id
is provided, it is looked up in Chargebee when the gifter completes the hosted page checkout. If not found, a new customer resource is created with this ID.
Multiple business entities
If multiple business entities are created for the site, the lookup and creation of the gifter customer resource happen within the context of the business entity specified in this API call. If no business entity is specified, the customer resource lookup is performed within the site context, and if not found, the resource is created for the default business entity of the site.
Gift receiver customer resource lookup and creation
Once the gifter checks out using the hosted page returned by this endpoint, Chargebee checks if a customer resource with the receiver’s email address exists. The first such customer record is considered the receiver’s customer resource. A new customer resource is created for the receiver if none are found.
Multiple business entities
If multiple business entities are created for the site, the lookup and creation of the gift receiver’s customer resource happen within the context of the business entity of the gifter.
New parameter added
Name | Description |
---|---|
| string max chars = 50 optional Sets the context for this operation to the business entity specified. Applicable only when multiple business entities have been created for the site. When this parameter is provided, the operation is able to read/write data associated only to the business entity specified. When not provided, the operation can read/write data for the entire site. |
Parameter description updated
Name | Description |
---|---|
| string max chars = 50 optional The customer ID of the gifter. If not provided, the gifter customer resource is created with an autogenerated ID on checkout. |
quotes
resource
Attribute added
Name | Description |
---|---|
| string max chars = 50 always returned The unique ID of the business entity of this |
ON THIS PAGE
- 1 Overview
- 2 business_entity resource
- 3 business_entity endpoints
- 4 business_entity_transfer resource
- 5 customer resource
- 5.1 Attributes
- 6 customer endpoints
- 6.1 create_a_customer
- 6.2 merge_customers
- 6.3 link_a_customer
- 7 subscription resource
- 7.1 Attributes
- 8 subscription endpoints
- 9 invoice resource
- 9.1 Attribute added
- 10 invoice endpoints
- 11 credit_note resource
- 11.1 Attribute added
- 12 payment_intent resource
- 12.1 Attribute added
- 13 payment_intent endpoints
- 14 payment_source resource
- 14.1 Attribute added
- 15 transaction resource
- 15.1 Attribute added
- 16 hosted_page resource
- 16.1 Attribute added
- 17 hosted_page endpoints
- 18 quotes resource
- 18.1 Attribute added