Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Addon Related › Payment Method change with Stripe Subscription
Tagged: payment method
- This topic has 4 replies, 2 voices, and was last updated 4 years, 2 months ago by admin.
-
AuthorPosts
-
September 11, 2020 at 2:56 am #15662Plugin UserParticipant
We have users who subscribe to our website with a monthly fee and an annual subscription. We are configured to use Stripe Subscription with eStore.
The initial signup works well and we have all the user flows working as expected.
I wanted clarification on how do we get the user to change their Credit Card on File (Payment Method).
Also what happens when their card fails to authorize after initial purchase during subsequent monthly payments.
I was expecting to add an eStore created Url on my website in Stripe Webhook which will provide subscription events including cancellation or payment failures.
We could link to Stripe Portal for Change Credit Card on File, but I couldnt find a shortcut code for that as it is not simply just redirecting users to a URL.
September 11, 2020 at 3:21 am #80931Plugin UserParticipantOk, I think i figured out the WebHook part. I will test it now.
https://www.tipsandtricks-hq.com/ecommerce/wp-payment-gateway-bundle-stripe-basic-gateway-setup-4170
However I am still looking for the Update Payment Method / Change Credit Card on file option.
September 11, 2020 at 4:56 am #80932adminKeymasterIf a subscription charge fails, stripe tries it a couple of times then it will cancel the subscription. At that point, our plugin will block the member’s access also.
If a card expires, Stripe takes care of it on their end in terms of changing to the new card (they work directly with the credit card providers for the newly issued card). So generally, you don’t need to handle this yourself.
If the user wants to pay using a completely different card then that is no longer covered by the existing subscription agreement. A new transaction needs to take place so a new agreement can be accepted by the customer for that card. Cancel the existing subscription and tell the user to do a transaction using the new card that he wants to use.
September 11, 2020 at 2:22 pm #80933Plugin UserParticipantok cool. Subscription cancel and fail scenarios are covered now.
For the change in credit card on file, I will need to transfer the user to Stripe portal which has ‘Change Payment Method’ option. However this means I have to now code a redirect.
The way I envision this code to work
1. User gets transferred to WordPress Url which calls Stripe API to create a Stripe Customer Portal session. I will need to provide the Customer ID for it, which will be wp_wp_estore_customer_tbl.subscr_id table. This will need to be current User’s wp_wp_estore_customer_tbl.member_username.
2. Redirect customer to Strip Customer Portal using the session ID provided by API.
If the customer cancels his/her subscription on the portal, Stripe Webhook will take care of demoting the customer in eMember.
Am I thinking this right?
I would sincerely request for a feature in the stripe payment addon. We would really like to have a shortcut code for it. something like this
[wp_eStore_StripeCustomerPortalLink allowCancel=yes allowCardChange=yes showHistory=yes]
Is there an option to get such a shortcut developed by paying professional services?
September 12, 2020 at 12:33 am #80934adminKeymasterTry this option:
-
AuthorPosts
- You must be logged in to reply to this topic.