We are providing the subscription app on Shopify App Store.
We called Subscription’s BillingAttempt API at 2021-10-06 12:00 (UTC).
Ref: https://shopify.dev/api/admin-graphql/2021-07/mutations/subscriptionBillingAttemptCreate
The response’s error_code was “unexpected_error” and error_message was “No such customer: ‘card_xxxxxxxxxxxxxxxx’”. What is the error?
Also, The customer has a payment method. The payment method is integrated with Stripe by customerPaymentMethodRemoteCreditCardCreate mutation API.
Ref: https://shopify.dev/api/admin-graphql/2021-10/mutations/customerpaymentmethodremotecreditcardcreate
Thanks,
1 Like
Observing the very similar problem here: https://community.shopify.com/post/1337468
So, this is widespread.
Shopify Support, please, address ASAP.
1 Like
@camelmasa , we’ve received a reply from Justin B from Shopify Developer Support:
Just letting you know the issue was identified and a fix was just deployed. The fix has restored the previous behaviour for this mutation by allowing it to be sent with only the StripeCustomerId and customerId arguments. It will also ensure any payment methods created with this mutation moving forward are valid and able to process billing attempts.
So, if you try to re-create the payment method now, it should work. We were using this mutation passing only customerId (Shopify’s) and stripeCustomerId, and it was creating correct payment methods.
Good luck!
2 Likes
Awesome! Thank you for sharing the information. I’ll try that!
@vladimird Did you try that ? Did you receive a “has already been taken” error when calling customerPaymentMethodRemoteCreditCardCreate mutation API?
@camelmasa Correct, you need to call Revoke first.
And when you call Revoke, there will be an error that there’s active subscription associated with this payment method.
If it’s test subscription, you can just cancel it. If it is actual customer’s subscription, then you would need something like that:
- Pause the subscription.
- Revoke payment method.
- Create new payment method.
- Associate the new payment method with the subscription.
- Activate the subscription.
For steps 1,4,5 you will need combination of these mutations:
https://shopify.dev/api/admin-graphql/2021-10/mutations/subscriptioncontractupdate
https://shopify.dev/api/admin-graphql/2021-10/mutations/subscriptionDraftUpdate
https://shopify.dev/api/admin-graphql/2021-10/mutations/subscriptionDraftCommit
2 Likes
Oh my gosh! Thank you for your kindness!