If we are using Shopify Payments in test mode, it doesn't allow you to put in an invalid credit card number from https://help.shopify.com/en/manual/payments/shopify-payments/testing-shopify-payments#simulate-faile.... When you try to checkout, it fails. If you try to update your payment method to one of those, it just says 'Failed to update payment method'. So this means the payment method on a subscription is always valid in test mode, since we can't add non valid ones.
any ideas?
Hey eat_to_evolve!
Currently there isn't a way to test a card that succeeds initially and then fails for the reasons that you mentioned. The best way right now is to look at the error code[1] that will be returned when a billing attempt fails.
References:
1. https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionbillingattempterrorcode
Hey chris_mctavish!
I believe revoking a customer payment method will give you an error code but it won't be the same as if a card was declined, or another error.
Here is a current list of error codes that can be returned: https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionbillingattempterrorcode
Hey @matart , I understand we can look at the error code, but the issue is I cannot actually make sure a transaction fails so I can test my flow properly with retries. Is there any plans to allow us to enter invalid card numbers?
Hey @eat_to_evolve!
I wish I had better news, this issue is on our radar but there currently isn't a timeline for implementing it.