Update Payment Method URL

B_A
New Member
5 0 0

I am looking to use the api to allow customers update their own payment information. Seems like customerPaymentMethodGetUpdateUrl should be straight forward, but I'm getting this error when running a payment method id

"customerPaymentMethodGetUpdateUrl": {
"userErrors": [{
"field": ["customerPaymentMethodId"],
"message": "Payment method instrument not supported for this mutation",
"code": "INVALID_INSTRUMENT"
}],

What would be considered and invalid instrument? I am in test mode and the payment methods I'm testing are dummy credit cards. Would that make a difference? I have been able to use these to send the update email with customerPaymentMethodSendUpdateEmail without issue.

Reply 1 (1)

Brian_S
Shopify Partner
153 19 39

Based on the release notes I think that's only going to work for Shop Pay payment methods at the moment. The notes say 

This mutation supports Shop Pay as of late 2021, and will expand support to other payment methods in the future.

so the request may work for other types of payment methods in the future. For now, you have to fall back to the customerPaymentMethodSendUpdateEmail if you get an error with customerPaymentMethodGetUpdateUrl

 

for reference: https://shopify.dev/changelog/customerpaymentmethodgetupdateurl-mutation-for-customer-payment-method...

 

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic