Anchor to customerPaymentMethodCreditCardUpdatecustomer
customerPaymentMethodCreditCardUpdate
mutation
Requires access scope. Also: Requires
scope.
Updates the credit card payment method for a customer.
Anchor to Arguments
Arguments
- Anchor to billingAddressbilling•
Address MailingAddress requiredInput! The billing address.
- •ID!required
The ID of the customer payment method.
- Anchor to sessionIdsession•
Id String!required The Cardserver session ID.
Was this section helpful?
Anchor to CustomerPaymentMethodCreditCardUpdatePayload returnsCustomerPaymentMethodCreditCardUpdatePayload returns
- Anchor to customerPaymentMethodcustomer•
Payment Method The customer payment method.
- Anchor to processingprocessing•
If the card verification result is processing. When this is true, customer_payment_method will be null.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation customerPaymentMethodCreditCardUpdate($billingAddress: MailingAddressInput!, $id: ID!, $sessionId: String!) {
customerPaymentMethodCreditCardUpdate(billingAddress: $billingAddress, id: $id, sessionId: $sessionId) {
customerPaymentMethod {
# CustomerPaymentMethod fields
}
processing
userErrors {
field
message
}
}
}
Input
{
"billingAddress": {
"address1": "<your-address1>",
"address2": "<your-address2>",
"city": "<your-city>",
"company": "<your-company>",
"countryCode": "",
"firstName": "<your-firstName>",
"lastName": "<your-lastName>",
"phone": "<your-phone>",
"provinceCode": "<your-provinceCode>",
"zip": "<your-zip>"
},
"id": "gid://shopify/<objectName>/10079785100",
"sessionId": "<your-sessionId>"
}
{
"billingAddress": {
"address1": "<your-address1>",
"address2": "<your-address2>",
"city": "<your-city>",
"company": "<your-company>",
"countryCode": "",
"firstName": "<your-firstName>",
"lastName": "<your-lastName>",
"phone": "<your-phone>",
"provinceCode": "<your-provinceCode>",
"zip": "<your-zip>"
},
"id": "gid://shopify/<objectName>/10079785100",
"sessionId": "<your-sessionId>"
}
input MailingAddressInput {
address1: String
address2: String
city: String
company: String
country: String
countryCode: CountryCode
firstName: String
id: ID
lastName: String
phone: String
province: String
provinceCode: String
zip: String
}