Hello so i tried to use API to retrieve a test customer and converted into valid json format but the json it shows me was invalid as well as the data it shows me was invalid/hard to read so is there any way you guys can clean it off a bit or give me an example code to help me?
Sorry for the delay in getting back to you. Could you copy-paste the converted information here to check on our end?
i just directly print out custom using print_r function and the data below is what it returned
ChargeBee_Customer Object ( [allowed:protected] => Array (  => id  => firstName  => lastName  => email  => phone  => company  => vatNumber  => autoCollection  => netTermDays  => allowDirectDebit  => createdAt  => createdFromIp  => taxability  => entityCode  => exemptNumber  => resourceVersion  => updatedAt  => locale  => consolidatedInvoicing  => billingDate  => billingDateMode  => billingDayOfWeek  => billingDayOfWeekMode  => cardStatus  => fraudFlag  => primaryPaymentSourceId  => backupPaymentSourceId  => billingAddress  => referralUrls  => contacts  => paymentMethod  => invoiceNotes  => preferredCurrencyCode  => promotionalCredits  => unbilledCharges  => refundableCredits  => excessPayments  => balances  => metaData  => deleted  => registeredForGst ) [_values:protected] => Array ( [id] => anni114 [first_name] => Anni [last_name] => Chen [email] => firstname.lastname@example.org [auto_collection] => off [net_term_days] => 0 [allow_direct_debit] => [created_at] => 1515706017 [taxability] => taxable [updated_at] => 1516320819 [locale] => en-US [resource_version] => 1516320819302 [deleted] => [object] => customer [card_status] => no_card [promotional_credits] => 0 [refundable_credits] => 0 [excess_payments] => 0 [unbilled_charges] => 0 [preferred_currency_code] => USD ) [_subTypes:protected] => Array ( [billing_address] => ChargeBee_CustomerBillingAddress [referral_urls] => ChargeBee_CustomerReferralUrl [contacts] => ChargeBee_CustomerContact [payment_method] => ChargeBee_CustomerPaymentMethod [balances] => ChargeBee_CustomerBalance ) [_dependantTypes:protected] => Array ( ) [_data:protected] => Array ( [id] => anni114 [firstName] => Anni [lastName] => Chen [email] => email@example.com [autoCollection] => off [netTermDays] => 0 [allowDirectDebit] => [createdAt] => 1515706017 [taxability] => taxable [updatedAt] => 1516320819 [locale] => en-US [resourceVersion] => 1516320819302 [deleted] => [object] => customer [cardStatus] => no_card [promotionalCredits] => 0 [refundableCredits] => 0 [excessPayments] => 0 [unbilledCharges] => 0 [preferredCurrencyCode] => USD ) )
Sorry for the delay caused!
Could you look into the following sample codes for fetching subscriptions an try the similar code for retrieving the customer?
Hope this helps
Let us know if you have any other queries.