Idempotency Supported
Creates a hierarchical relationship between two customers. The path parameter customer_id identifies the child in this relationship, and parent_id identifies the parent.
Note
For the use_default_hierarchy_settings, parent_account_access, and child_account_access parameters in this operation, the term "parent" usually refers to payment_owner_id. If payment_owner_id is the same as customer_id, then "parent" refers to parent_id.
Prerequisites & Constraints
customer_idandparent_idmust belong to the same business entity.- The Account Hierarchy limits must not be exceeded due to this operation.
Impacts
Customer
- Sets the following attributes on the
customerresource:
Invoices
- For all invoices generated for
customer_idafter you link the customer, Chargebee setsinvoice.customer_idtoinvoice_owner_id.
Transactions
- When Chargebee generates invoices for
customer_id, ifauto_collectionisonforinvoice_owner_id, Chargebee uses thepayment_sourceof thepayment_owner_idto pay the invoices and creates transactions for the payment underpayment_owner_id.
RevenueStory
- The Customer Insights report in RevenueStory shows parent-level views for customers with hierarchy relationships.
Sample Request
Sample Result[JSON]
URL Format
POST https://[site].chargebee.com/api/v2/customers/{customer-id}/relationships
Input Parameters
The id of the customer responsible for paying the invoices for the customer identified by customer_id.
Constraints
- If the
invoice_owner_idis the same as thecustomer_id, then thepayment_owner_idcan be thecustomer_idor an ancestor of thecustomer_id. - If the
invoice_owner_idis not the same as thecustomer_id, then thepayment_owner_idmust be theinvoice_owner_id.
Decides if Chargebee should apply settings from the Chargebee Billing UI or from this API request.
- If set to
true: Chargebee uses settings configured in the Chargebee Billing UI. - If set to
false: Settings provided in theparent_account_accessandchild_account_accessparameters are applied.
Returns
Customer object
Resource object representing customer