> ## 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 to customer

> Triggers Shopify to send an email to the subscription customer with a secure link to update their payment method. This endpoint initiates Shopify's native payment update flow without requiring direct payment handling.

**Key Features:**
- Sends official Shopify payment update email to customer
- Customer receives secure link to Shopify-hosted payment update page
- No PCI compliance required - Shopify handles all payment data
- Supports all Shopify-supported payment methods
- Automatically updates subscription after customer completes the process

**Process Flow:**
1. API call triggers email send request to Shopify
2. Shopify sends branded email to customer's registered email
3. Customer clicks secure link in email
4. Customer authenticates on Shopify-hosted page
5. Customer adds/updates payment method
6. Subscription automatically uses new payment method

**Email Details:**
- Sent from Shopify's email servers
- Uses store's configured sender email
- Subject line typically: "Update your payment method"
- Contains secure, time-limited link
- Shopify-branded with store information

**Use Cases:**
- Failed payment recovery
- Expiring credit card updates
- Customer-requested payment changes
- Proactive payment method maintenance

**Important Notes:**
- Customer must have valid email address
- Email cannot be customized (Shopify template)
- Link expiration time set by Shopify
- Multiple emails can be sent if needed
- No webhook for completion - poll contract for updates

**Rate Limiting:**
- Subject to Shopify's email sending limits
- Recommended: Wait 24 hours between sends to same customer
- Excessive sends may be blocked by Shopify

**Authentication:** Requires valid X-API-Key header



## OpenAPI

````yaml /subscription/admin-api-swagger.json put /api/external/v2/subscription-contracts-update-payment-method
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for managing subscriptions, payments, and
    related operations. These APIs allow you to programmatically manage
    subscription lifecycles, handle payments, configure products, and integrate
    subscription functionality into your applications.
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://subscription-admin.appstle.com
security: []
tags:
  - description: >-
      Core APIs for managing the complete subscription lifecycle including
      creation, updates, pausing, resuming, and cancellation of subscriptions.
    name: Subscription Management
  - description: >-
      APIs for managing subscription payment methods, processing payments,
      handling payment retries, and updating billing information.
    name: Subscription Payments
  - description: >-
      APIs for managing subscription contracts including delivery schedules,
      pricing, order notes, billing cycles, and shipping addresses.
    name: Subscription Contracts
  - description: >-
      APIs for managing products within subscriptions including adding,
      removing, updating quantities, and swapping products.
    name: Subscription Products
  - description: >-
      APIs for handling billing operations, payment processing, and financial
      transactions related to subscriptions.
    name: Billing & Payments
  - description: >-
      APIs for managing discounts and promotional codes applied to
      subscriptions.
    name: Subscription Discounts
  - description: >-
      APIs for managing one-time add-on products that can be purchased alongside
      recurring subscription items.
    name: Subscription One-Time Products
  - description: >-
      APIs for managing subscription plans, pricing tiers, and plan
      configurations.
    name: Subscription Plans
  - description: >-
      APIs for managing customizable product boxes and bundles where customers
      can select multiple items.
    name: Build-a-Box & Bundles
  - description: >-
      APIs for managing the product catalog including product information,
      variants, and inventory.
    name: Product Catalog
  - description: >-
      APIs for managing operational settings, configurations, and administrative
      functions.
    name: Operations & Settings
  - description: >-
      APIs powering the customer-facing portal where subscribers can manage
      their own subscriptions.
    name: Customer Portal
  - description: APIs for managing customer information, profiles, and account details.
    name: Customers
  - description: >-
      APIs for retrieving aggregated subscription data, customer subscription
      history, and account-level subscription information.
    name: Subscription Data
  - description: >-
      APIs for managing delivery profiles, shipping rates, free shipping
      configuration, and delivery method options on subscriptions.
    name: Delivery & Shipping
  - description: >-
      APIs for managing storefront customization including custom CSS, theme
      settings, label translations, and merchant-defined widget configuration.
    name: Customization
  - description: >-
      APIs for configuring cancellation flows, retention offers, cancellation
      reason management, and win-back automation.
    name: Customer Retention
paths:
  /api/external/v2/subscription-contracts-update-payment-method:
    put:
      tags:
        - Subscription Payments
        - Subscription Contracts
      summary: Send payment method update email to customer
      description: >-
        Triggers Shopify to send an email to the subscription customer with a
        secure link to update their payment method. This endpoint initiates
        Shopify's native payment update flow without requiring direct payment
        handling.


        **Key Features:**

        - Sends official Shopify payment update email to customer

        - Customer receives secure link to Shopify-hosted payment update page

        - No PCI compliance required - Shopify handles all payment data

        - Supports all Shopify-supported payment methods

        - Automatically updates subscription after customer completes the
        process


        **Process Flow:**

        1. API call triggers email send request to Shopify

        2. Shopify sends branded email to customer's registered email

        3. Customer clicks secure link in email

        4. Customer authenticates on Shopify-hosted page

        5. Customer adds/updates payment method

        6. Subscription automatically uses new payment method


        **Email Details:**

        - Sent from Shopify's email servers

        - Uses store's configured sender email

        - Subject line typically: "Update your payment method"

        - Contains secure, time-limited link

        - Shopify-branded with store information


        **Use Cases:**

        - Failed payment recovery

        - Expiring credit card updates

        - Customer-requested payment changes

        - Proactive payment method maintenance


        **Important Notes:**

        - Customer must have valid email address

        - Email cannot be customized (Shopify template)

        - Link expiration time set by Shopify

        - Multiple emails can be sent if needed

        - No webhook for completion - poll contract for updates


        **Rate Limiting:**

        - Subject to Shopify's email sending limits

        - Recommended: Wait 24 hours between sends to same customer

        - Excessive sends may be blocked by Shopify


        **Authentication:** Requires valid X-API-Key header
      operationId: updatePaymentMethodV2
      parameters:
        - description: >-
            Subscription contract ID for payment method update. Must be a valid
            contract ID that belongs to the authenticated shop.
          example: 123456789
          in: query
          name: contractId
          required: true
          schema:
            format: int64
            minimum: 1
            type: integer
        - deprecated: true
          description: API Key (Deprecated - Use X-API-Key header instead)
          in: query
          name: api_key
          required: false
          schema:
            type: string
        - description: API Key for authentication
          in: header
          name: X-API-Key
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                message: Payment method update email sent successfully
          description: Payment update email sent successfully
        '400':
          content:
            application/json:
              examples:
                Cancelled Subscription:
                  description: Cancelled Subscription
                  value:
                    detail: >-
                      Payment method cannot be updated for cancelled
                      subscriptions
                    instance: >-
                      /api/external/v2/subscription-contracts-update-payment-method
                    status: 400
                    title: UserGeneratedError:Cannot update cancelled subscription
                    type: https://example.com/errors/bad-request
                Contract Not Found:
                  description: Contract Not Found
                  value:
                    detail: 'No subscription contract found with ID: 123456789'
                    instance: >-
                      /api/external/v2/subscription-contracts-update-payment-method
                    status: 400
                    title: Contract not found
                    type: https://example.com/errors/bad-request
                Customer Not Found:
                  description: Customer Not Found
                  value:
                    detail: Customer associated with payment method not found
                    instance: >-
                      /api/external/v2/subscription-contracts-update-payment-method
                    status: 400
                    title: UserGeneratedError:Customer not found
                    type: https://example.com/errors/bad-request
                Email Service Error:
                  description: Email Service Error
                  value:
                    detail: Shopify email service temporarily unavailable
                    instance: >-
                      /api/external/v2/subscription-contracts-update-payment-method
                    status: 400
                    title: UserGeneratedError:Email could not be sent
                    type: https://example.com/errors/bad-request
                Invalid Email Address:
                  description: Invalid Email Address
                  value:
                    detail: Cannot send email to invalid email address
                    instance: >-
                      /api/external/v2/subscription-contracts-update-payment-method
                    status: 400
                    title: UserGeneratedError:Customer email is invalid
                    type: https://example.com/errors/bad-request
                No Payment Method:
                  description: No Payment Method
                  value:
                    detail: Subscription has no associated payment method
                    instance: >-
                      /api/external/v2/subscription-contracts-update-payment-method
                    status: 400
                    title: Payment method not found
                    type: https://example.com/errors/bad-request
          description: Invalid request or email send failed
        '401':
          content:
            application/json:
              example:
                detail: Valid X-API-Key header is required
                instance: /api/external/v2/subscription-contracts-update-payment-method
                status: 401
                title: Authentication required
                type: https://example.com/errors/unauthorized
          description: Authentication required
        '403':
          content:
            application/json:
              example:
                detail: API key does not have permission to update payment methods
                instance: /api/external/v2/subscription-contracts-update-payment-method
                status: 403
                title: Insufficient permissions
                type: https://example.com/errors/forbidden
          description: Insufficient permissions
        '404':
          description: Subscription contract not found
        '422':
          content:
            application/json:
              examples:
                Rate Limit Exceeded:
                  description: Rate Limit Exceeded
                  value:
                    detail: >-
                      Payment update email was recently sent. Please wait before
                      sending another.
                    instance: >-
                      /api/external/v2/subscription-contracts-update-payment-method
                    status: 422
                    title: UserGeneratedError:Too many emails sent
                    type: https://example.com/errors/unprocessable-entity
                Shopify API Error:
                  description: Shopify API Error
                  value:
                    detail: Unable to send payment update email at this time
                    instance: >-
                      /api/external/v2/subscription-contracts-update-payment-method
                    status: 422
                    title: Shopify API error
                    type: https://example.com/errors/unprocessable-entity
          description: Email cannot be sent due to business rules

````