Docs

Log into read the version of docs relevant to your site.

How can I merge two customer records in Chargebee?

This article covers

I accidentally created a duplicate customer record but that has payment-related information. How do I merge it to the other customer record in Chargebee?

I have created a Customer record with the desired ID, how do I merge the pre-existing customer record to the new one?

Summary

You can merge two customer records using a bulk operation named 'Merge two customer child resources'

Here's how you can test and use the operation:

  1. Go to Settings < Import & Export Data < Choose a Bulk Operation < Showing = Customers < Merge two customer child resources < Proceed < Download Sample CSV
  1. Give the 'From' and 'To' customer IDs for the merge > Save it as a CSV
  1. Upload the CSV file in Chargebee The same is available as Merge Customers via API upon enabling.

Points to note:

  • This action moves the source ('from') customer's payment methods, subscriptions, invoices, credit notes, transactions, unbilled charges, orders to the target ('to') customer

  • Events and email logs will not be moved

  • This execution is asynchronous

  • The returned customer object is the 'to' customer/target customer object

  • The source customer record will still remain in Chargebee unless manually deleted

  • If you're on the Rise plan, and both your customer records have 1 payment method type each (eg. 1 credit card in each record) then you'd obtain an error, 'Upgrade to a higher plan to use this API. Please contact support'. To proceed without upgrading, you will have to remove a credit card from either of the customer records.

Warning: Merge operations are not easily reversible. It is highly recommended to try it on your Test site first and contact support to enable it on your live site.

Was this article helpful?