# customerPaymentMethodSendUpdateEmail - admin-graphql - MUTATION Version: 2025-01 ## Description Sends a link to the customer so they can update a specific payment method. ### Access Scopes `write_customers` access scope. ## Arguments * [customerPaymentMethodId](/docs/api/admin-graphql/2025-01/scalars/ID): ID! - The payment method to be updated. * [email](/docs/api/admin-graphql/2025-01/input-objects/EmailInput): EmailInput - Specifies the payment method update email fields. ## Returns * [customer](/docs/api/admin-graphql/2025-01/objects/Customer): Customer The customer to whom an update payment method email was sent. * [userErrors](/docs/api/admin-graphql/2025-01/objects/UserError): UserError! The list of errors that occurred from executing the mutation. ## Examples ### Send an email with only the customer payment method id Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation sendCustomerPaymentUpdateEmail($customerPaymentMethodId: ID!) { customerPaymentMethodSendUpdateEmail(customerPaymentMethodId: $customerPaymentMethodId) { customer { id } userErrors { field message } } }\",\n \"variables\": {\n \"customerPaymentMethodId\": \"gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff\"\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation sendCustomerPaymentUpdateEmail($customerPaymentMethodId: ID!) {\n customerPaymentMethodSendUpdateEmail(customerPaymentMethodId: $customerPaymentMethodId) {\n customer {\n id\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"customerPaymentMethodId\": \"gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff\"\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation sendCustomerPaymentUpdateEmail($customerPaymentMethodId: ID!) {\n customerPaymentMethodSendUpdateEmail(customerPaymentMethodId: $customerPaymentMethodId) {\n customer {\n id\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"customerPaymentMethodId\": \"gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff\"\n}\n\nresponse = client.query(query: query, variables: variables)\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation sendCustomerPaymentUpdateEmail($customerPaymentMethodId: ID!) {\n customerPaymentMethodSendUpdateEmail(customerPaymentMethodId: $customerPaymentMethodId) {\n customer {\n id\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"customerPaymentMethodId\": \"gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff\"\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation sendCustomerPaymentUpdateEmail($customerPaymentMethodId: ID!) {\n customerPaymentMethodSendUpdateEmail(customerPaymentMethodId: $customerPaymentMethodId) {\n customer {\n id\n }\n userErrors {\n field\n message\n }\n }\n}" #### Graphql Input { "customerPaymentMethodId": "gid://shopify/CustomerPaymentMethod/b7cc6e3267aace169e516ed48be72dff" } #### Graphql Response { "data": { "customerPaymentMethodSendUpdateEmail": { "customer": { "id": "gid://shopify/Customer/544365967" }, "userErrors": [] } } }