> ## Documentation Index
> Fetch the complete documentation index at: https://developers.appstle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send payment method update email

> Asks Shopify to email the member a secure link to update the payment method on this membership. The payment method changes only when the member follows the link and saves new details, so a 200 response means Shopify accepted the email request, not that the payment method changed.

**How it works:**
- **Finds the membership's payment method**: Looks up the payment method attached to this membership contract in Shopify
- **Requests Shopify's update email**: Shopify emails the member a secure link to update that payment method
- **Changes nothing itself**: The call does not change the membership's payment method, and it does not read the customer's default payment method in Shopify

**Use Cases:**
- Ask a member whose card is expiring or has expired to update it
- Follow up after a failed renewal. The call does not retry the billing attempt

**Important Notes:**
- The membership must have an active payment method. If Shopify has revoked it, the call returns 400 and no email is sent
- The call does not check the membership's status. It also returns 200 for a cancelled membership whose payment method is still on file
- Each successful call asks Shopify for another email, so don't retry a call that returned 200
- Shopify sends the email, not the app, so the app's email templates don't apply and the call takes no subject or message

**Authentication:** Requires API key authentication via X-API-Key header or api_key parameter



## OpenAPI

````yaml /memberships/admin-api-swagger.json put /api/external/v2/subscription-contracts-update-payment-method
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for managing memberships, payments, and
    related operations. These APIs allow you to programmatically manage
    membership lifecycles, handle payments, configure products, and integrate
    membership functionality into your applications.
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://membership-admin.appstle.com
security: []
tags:
  - description: >-
      APIs for retrieving product swap/substitution options allowing members to
      exchange membership items based on configured swap rules and variant
      groups
    name: Product Swap Rules
  - description: >-
      APIs for managing customer payment methods, payment tokens, and payment
      method retrieval for memberships
    name: Customer Payment Methods
  - description: >-
      APIs for managing one-time product additions to upcoming membership
      orders, including adding, retrieving, and removing one-off items
    name: One-Time Add-Ons
  - description: >-
      APIs for managing membership contracts including creation, updates, status
      changes, line items, discounts, and billing operations
    name: Membership Contracts
  - description: >-
      APIs for retrieving historical discount code usage and redemption
      information for membership contracts
    name: Customer Discount History
  - description: >-
      APIs for managing customer portal settings including UI customization,
      text labels, feature toggles, and branding options for the member
      self-service portal
    name: Customer Portal Configuration
  - description: >-
      APIs for retrieving custom CSS styles applied to membership widgets and
      customer portal for theme customization
    name: Custom CSS Styling
  - description: >-
      APIs for managing membership cancellation flow settings including
      retention offers, survey questions, and cancel confirmation screens
    name: Cancellation Flow Configuration
  - description: >-
      APIs for managing membership billing attempts, recurring orders, payment
      retries, order history, and order skipping
    name: Billing & Orders
  - description: >-
      APIs for managing Shopify delivery profiles, shipping rates, zones, and
      free shipping configuration for membership memberships
    name: Shipping & Delivery Profiles
  - description: >-
      APIs for managing membership plan groups, including creating plans,
      configuring discounts, billing intervals, and assigning products to plans
    name: Membership Plans
  - description: >-
      APIs for retrieving product catalog, variants, pricing, and inventory
      information for memberships.
    name: Product & Inventory Data
  - description: >-
      APIs for managing shop-level membership settings, configuration, and
      general store information.
    name: Shop Settings
  - description: >-
      APIs for performing bulk/mass operations on multiple membership contracts
      including status updates, product replacements, and billing date changes.
    name: Bulk Operations
paths:
  /api/external/v2/subscription-contracts-update-payment-method:
    put:
      tags:
        - Membership Contracts
      summary: Send payment method update email
      description: >-
        Asks Shopify to email the member a secure link to update the payment
        method on this membership. The payment method changes only when the
        member follows the link and saves new details, so a 200 response means
        Shopify accepted the email request, not that the payment method changed.


        **How it works:**

        - **Finds the membership's payment method**: Looks up the payment method
        attached to this membership contract in Shopify

        - **Requests Shopify's update email**: Shopify emails the member a
        secure link to update that payment method

        - **Changes nothing itself**: The call does not change the membership's
        payment method, and it does not read the customer's default payment
        method in Shopify


        **Use Cases:**

        - Ask a member whose card is expiring or has expired to update it

        - Follow up after a failed renewal. The call does not retry the billing
        attempt


        **Important Notes:**

        - The membership must have an active payment method. If Shopify has
        revoked it, the call returns 400 and no email is sent

        - The call does not check the membership's status. It also returns 200
        for a cancelled membership whose payment method is still on file

        - Each successful call asks Shopify for another email, so don't retry a
        call that returned 200

        - Shopify sends the email, not the app, so the app's email templates
        don't apply and the call takes no subject or message


        **Authentication:** Requires API key authentication via X-API-Key header
        or api_key parameter
      operationId: updatePaymentMethodV2
      parameters:
        - description: Membership contract ID to update payment method for
          example: 123456789
          in: query
          name: contractId
          required: true
          schema:
            format: int64
            type: integer
        - description: API Key (Deprecated - Use Header X-API-Key instead)
          in: query
          name: api_key
          required: false
          schema:
            type: string
        - in: header
          name: X-API-Key
          required: false
          schema:
            type: string
      responses:
        '200':
          description: >-
            Shopify accepted the request to email the member a link to update
            the payment method. The payment method has not changed yet
        '400':
          description: >-
            Contract does not exist, the membership has no active payment
            method, or Shopify refused to send the email
        '401':
          description: Authentication required - invalid or missing API key
        '500':
          description: Unexpected error while asking Shopify to send the email

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.