Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Retrieving and Passing Payment Methods from Stripe to Recharge via Shopify

Retrieving and Passing Payment Methods from Stripe to Recharge via Shopify

gabrielguerin
New Member
5 0 0
Dear Shopify Community,

I have a question regarding the integration of Stripe, Shopify, and Recharge for our ecommerce store. We are currently using Stripe as our payment gateway and Recharge as our subscription platform. We would like guidance on how to retrieve a payment method from a Stripe checkout session, store it in Shopify, and then pass it to Recharge so that the Stripe payment method is then used in Recharge for all subsequent charges.
 
I've seen this post from another user, but I still want to make sure the way I'm trying to accomplish this is correct. Are these the steps to follow?
  1. In Stripe: Retrieve the payment method from a checkout session through the payment intent.
  2. In Shopify: Create a new remote payment method for the customer.
  3. In Recharge: Update or create a payment method for a customer.

Do I need to set it as the default payment method in Recharge for it to be used by the subscription here?

Thanks in advance for your help!
Replies 3 (3)

Liam
Community Manager
3108 344 899

HI Gabrielguerin,

It does seem you're correct with the steps you've described. Here's a further breakdown:

  1. Stripe: Retrieve the payment method from a checkout session through the payment intent.

  2. Shopify: Use the CustomerPaymentMethodRemoteCreate mutation to create a new remote payment method for the customer. The mutation requires the customer's Shopify ID and the Stripe payment method ID.

  3. Recharge: Update or create a payment method for a customer. Recharge API provides endpoints to create or update a customer's payment method.

Also you're correct in saying that you would need to set the new payment method as the default in Recharge for it to be used for subsequent subscription charges.

 

Please note that you need to ensure a secure and compliant handling of payment data throughout this process. I recommend testing this process thoroughly in a secure and controlled environment before implementing it in your live store.

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

gabrielguerin
New Member
5 0 0

Thanks @Liam! I will try to implement it, and will let you know how it goes! 🙂

gabrielguerin
New Member
5 0 0

@Liam, I managed to get step 1 working and step 2 is almost done, but I need guidance on accessing Shopify's protected scopes in Make (Integromat). I posted my question in this thread. Do you have any idea how to accomplish this?