Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Change customer

We have 2 customers both with past due accounts. We accidentally sent one customer the wrong link to update a past due payment. This customer updated the subscription to her email address and ran the wrong past due renewal amount. So now this subscription (ID #1074508899) is tied to the wrong customer name (cust ID 18604770) as shown in the foxycart subscriptions. However when pulling this transaction via the API it is showing the correct customer ID (18467588) and correct email and name? How do we correct this to get the correct customer associated this renewal/subscription?
  • fc_adamfc_adam FoxyCart Team

    To get the sub back to the correct customer, you can simply re-send the Sub Token URL to the correct customer and have them login using their normal email and password. That will change the subscription back to their customer account. It looks like you've re-added the past due amount to the subscription as well, so that would be charged when the checkout is completed again.

    If the customer doesn't need to change any information on their account, but just re-try the transaction, you could make that change for them. You can do that by loading the Sub Token URL yourself, entering their password and then using the Unified Order Entry password as set on your store's advanced settings page in the FoxyCart administration. If something does need to be updated by the customer though, like their payment details, then the customer will need to action that themselves.
    However when pulling this transaction via the API it is showing the correct customer ID (18467588) and correct email and name?
    Could you clarify that? I just tried pulling the latest transaction, where it was transferred to the incorrect customer and it's showing the ID and name/email of the customer it moved to (18604770) rather than the original (18467588). I also tried pulling the subscription itself and it's showing the same information related to the customer it's moved to.
  • Thanks @fc_adam

    We tried what you mentioned in the second paragraph using the Sub Token URL and logging in with the "correct" customer email and the Unified Order Entry password, the only problem was that their card on file is no longer correct so it didn't seem to save when we attempted to process the card and the card was declined. In our dunning process we regularly send them the sub token URL and our concern is if they open the link it will pull up the other customers email by default which may cause confusion, so we were trying to update this subscription with the correct customer ID.

    To clarify on the last point I have more detail now, in Foxycart admin portal under active subscriptions it's showing the last successful transaction ID (1074508899) and it's showing the wrong customer name (Jennifer....) but when I checked the API for that transaction ID it was showing the correct customer name (Alisha...) and customer ID which I thought was confusing. I later realized this is likely pulling the customer name from a more recent transaction ID (1101836789) which was when the wrong customer (Jennifer) accidentally got the wrong Sub Token URL (for Alisha) and updated her information to this subscription.

    So the long winded question is can we modify future transactions back to the correct customer via the API (or otherwise) such that we can send the customer (Alisha) a sub token URL that will pull up her email by default? I was looking to see if I could modify this later transaction ID 1101836789 via the API to re-assocaite it back to the correct customer (Alisha). Please let me know if we have any options to modify this on the back-end without causing confusion by sending out a sub token URL which has the wrong users email associated with it.

    Thanks again!
  • fc_adamfc_adam FoxyCart Team

    Thanks for the clarification. It's not currently possible to modify a transaction once it's completed - they're treated as historical references.

    What you need to do is modify the subscription - as the set up of that is what is used to generate the transaction as each renewal occurs. Unfortunately it's not possible to alter what customer is attached to a given subscription via the API. The only option there is to make use of the sub_token URL.

    It sounds like the customers payment card has since expired and been replaced, so it's not working anymore. This in turn means you can't update the subscription on behalf of the customer. But if they use the sub token URL they'll see the other customers email which as you noted would be quite a surprise and point of concern.

    One thing you can do though is take the sub token URL that you get from the admin, and then append the customers email for checkout prepopulation to the end.

    So for example, let's say the sub token URL was, and the customer you need the sub to be for was - you would send John a link that looked like this:

    I'd definitely recommend first ensuring that the normal sub_token URL is loading with the email that you expect it to (which is the wrong one), before then modifying the URL to include the customer_email portion and testing it again to ensure that the email you want it to be is shown. Then you can send the customer this URL and when they load the checkout to enter their password it will be their email shown as they would expect it to be.
  • Great @fc_adam thanks for the solution and details on what can/cannot be modified. We'll use the sub_token URL w/ the email appended.
Sign In or Register to comment.