For discussing the development and integration of subscription-enabled shops using Shopify's Subscription APIs.
Hi Guys,
Does anyone know of an alternative way of updating card details associated with a subscription payment method without using the https://shopify.dev/docs/api/admin-graphql/2023-01/mutations/customerpaymentmethodsendupdateemail API?
Ideally we want to build the UI directly in our app, use the stripe API and update the payment method. I can only see a any of creating a new payment method though, not updating the current one? https://shopify.dev/docs/api/admin-graphql/2023-01/mutations/customerPaymentMethodRemoteCreate
For context, we are using Recharge for subs and they won't allow us to change the payment method associated with a sub, only update it.
Thanks
Hi @awmly!
I assume you are using Stripe as payment processor and you want to have your customers enter new payment method details using Stripe's platform, and later, you want to update your customer's subscription contract in Shopify with the new payment method.
After you obtain the new Stripe payment method, you should be able to achieve that with the following:
Please notice that customerPaymentMethodRemoteCreate exists to support migrations from other subscriptions platforms. Shopify will not follow changes made to the payment method in Stripe (expiry date, last digits, etc.)
Let us know how it goes.
Best,
Juan
To learn more visit the Shopify Help Center or the Community Blog.
Hi @JuanHoyos
Thanks for your reply.
The payment methods in question are Shopify Payments and do not exist in our stripe account.
We do however have scripts in place that can connect to the stripe API and then use the customerPaymentMethodRemoteCreate API to create a new Shopify Payments payment method.
As we are using Recharge for our subscriptions, if we update the subscription contract (as you outlined in point #2) would the new payement method ID then get pushed through to recharge?
Thanks
Andrew.
> if we update the subscription contract (as you outlined in point #2) would the new payement method ID then get pushed through to recharge?
This would be a question for ReCharge, but I'd guess that they should be listening to the contract's changes webhook and can follow through.
Please notice that payment methods created with customerPaymentMethodRemoteCreate are not handled by Shopify Payments, but through the corresponding remote payment processor (Stripe, PayPal, etc.)
Best,
Jua
To learn more visit the Shopify Help Center or the Community Blog.
By the way, we do not expect to provide APIs for handling credit card details because this is out of our PCI scope.
To learn more visit the Shopify Help Center or the Community Blog.