Chargebee retrive function giving error

if I delete rthe chargbee customar, then if I want to check the customar exists or not to using chargbee ChargeBee_Customer::retrieve then it gives a error. how to handel this?

 


Hey Ankit, 


Thanks for writing in!


Could you please let me know what error are you facing? It would be great if you could share a screenshot. 


Also, to get a list of deleted customers, you may use the List Customers API and pass the include_deleted parameter as true. Please refer to this document: https://apidocs.chargebee.com/docs/api/customers#list_customers_include_deleted 


Hope this information is helpful. Do let me know if you have any queries and I will be glad to help you out. 

Hi Sudhir

You can theck the error from my screenshot. I have print that error inside catch block.

as here  the chargbee customar "test_user" not existes, but if this "test_user" is a id how should i khow that it is a valid customar or not.


 

try {

            $result = ChargeBee_Customer::retrieve("test_user");

        } catch (\Exception $e) {

            echo "<pre>";

            print_r($e);

            echo "</pre>";

            exit();


        }

Login or Signup to post a comment
×