Jump to content

Changing Stripe account in WHMCS


Joseph T

Recommended Posts

I'm currently running WHMCS and all the payments are processed by a Stripe account.

I want to change the processor to another Stripe account. ie. another Stripe login.

The question is, for all those under subscription in my hosting account, at which point is the recurring charge initiated?

Is the recurring charge initiated by WHMCS? Or by Stripe?

If the recurring is initiated by WHMCS, I believe it's easy for me as I just need to change the API.

If the recurring is initiated by Stripe, I would have an issue.

Anyone knows?

Link to comment
Share on other sites

I've never done this myself.. but I do know your customer credit cards are not stored in WHMCS, but rather in stripe.. that is your first hurdle to overcome. I also found this for you: https://support.stripe.com/questions/copy-existing-account-data-to-a-new-stripe-account

The recurring charges in the default WHMCS stripe payment gateway are initiated by your WHMCS installation not stripe.

 

Hope it helps.

Link to comment
Share on other sites

15 hours ago, Joseph T said:

If the recurring is initiated by WHMCS, I believe it's easy for me as I just need to change the API.

WHMCS tells Stripe, "hey please charge payment method pm-12345 $10" and Stripe takes that token and tries to charge, however, those tokens would be tied to your account and only ours.  So changing the API tokens to a new account would not allow you to charge the current stored customer / payment method tokens.  Granted, I have not tried this but I am 99% sure this is correct as otherwise any Stripe merchant knows of a customer token of another Stripe merchant could charge that customer and that seems like a security hole.

So if you do change to another Stripe account, you would need to have your clients redo card info even if they are using the same cards and that can be a pain to get done. 

Link to comment
Share on other sites

Yeah, I'd absolutely agree with Steven there - if the old account is no longer being used you could ask stripe if possible to change details! 

 

We did that, when moving from sole trader to LTD company and they were pleasantly easy to deal with! It'd depend upon your circumstances I suppose  - we were essentially appending a LTD to the end and promising them we'd let customers know about the change of business name 

I was dreading the "but I've already put my card on" tickets 😁

Link to comment
Share on other sites

  • 6 months later...
  • 2 weeks later...
  • 1 month later...
On 17/04/2022 at 10:28 PM, WHMCS John said:

Hi @Joseph T

For this to be effective, Stripe must ensure that the migration keeps all the tokens the same in your new Stripe account. That would be the customer (cus_) and payment method (pm_), in some instances also a card (card_).

I've had this exact situation as OP. I went ahead and got Stripe to migrate the data, but was told they are unable to keep the payment method (pm_) IDs the same. This has obviously caused a bit of a headache. Is there a way to access the database and tweak the IDs on WHMCS end? Stripe have supplied me a mapping file to show old IDs and what the new ones are for each card. 

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi @B_dogs,

The Stripe token IDs are stored in WHMCS as a Pay Method record, which are encrypted like credit card details (for obvious reasons). This means that they cannot be edited or changed.

Instead it would be necessary to create a new Pay Method record with the new Stripe token IDs in the correct format, and delete the original Pay Method records with the previous Stripe token IDs.

Normally this would be done by the client adding their card via the Pay Methods page of the client area.

 

Given some PHP know-how, I imagine a script could be created leveraging the createRemoteCardPayMethod method to create new Pay Methods under the appropriate Client Accounts with the new Token IDs, using the JSON format:

{"customer":"cus_abc123","method":"pm_def456"}

 

Link to comment
Share on other sites

Solution found. You have to do migration as seen here: https://support.stripe.com/contact/email?topic=migrations (You have to login to view this contact form)

So 2 Stripe accounts, request outgoing migration in account A, request incoming migration in account B, stripe will do the rest.

I did that, and it works. All subscriptions were transferred.

Edited by Joseph T
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated