Retrieving and Passing Payment Methods from Stripe to Recharge via Shopify

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!

1 Like

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!

1 Like

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

@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?