Updating payment method on subscription contract not working with Stripe

luis_costa
Shopify Partner
4 0 0

Hello. We have an issue on our test store account where we can't update the payment method of a subscription contract. The workflow is as follows:

 

1. Create a new payment method using Stripe. We can see the payment method created on stripe successfully:

 

Screenshot 2024-04-19 at 09.08.54.png

 

We create this using the graphql mutation customerPaymentMethodRemoteCreate (https://shopify.dev/docs/api/admin-graphql/2023-07/mutations/customerpaymentmethodremotecreate)

 

2. Change the subscription contract using the draft update workflow:

 

  • Create a new draft update from the subscription using the mutation subscriptionContractUpdate
  • Call the mutation subscriptionDraftUpdate where we pass in the ID of the new payment method created by step 1
  • This call returns the field "revokedReason" `STRIPE_API_INVALID_REQUEST_ERROR`. I can't find any documentation to explain why this happens occurs or how to fix it. The documentation only says "Invalid request. Failed to retrieve payment method from Stripe."

Our stripe integration seems to be working fine (proved by the fact that the new payment method is created with success). Can someone help please?

 

Thank you

Replies 0 (0)