Update subscription payment method
Updates the payment method for an existing subscription contract to use a different existing payment method. The new payment method must already be associated with the customer in Shopify.
Full behavior, validation rules, and side effects
Important Notes:
- The payment method must already exist in the customer’s Shopify payment methods
- Only valid, non-revoked payment methods can be used
- The update is processed through Shopify’s subscription draft system
- Payment method details are cached locally after successful update
Process Flow:
- Validates subscription contract exists
- Creates a draft update in Shopify
- Updates the draft with new payment method
- Commits the draft to apply changes
- Caches payment instrument details locally
- Records activity log entry
Authentication: Requires valid X-API-Key header
Documentation Index
Fetch the complete documentation index at: https://appstleinc-aeca3e0a.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Headers
API Key for authentication
Query Parameters
Subscription contract ID to update payment method for. Must be a valid contract ID that belongs to the authenticated shop.
x >= 1ID of the existing customer payment method to use. Must be a valid Shopify GraphQL payment method ID in the format 'gid://shopify/CustomerPaymentMethod/{id}'. The payment method must:
- Already exist in the customer's Shopify account
- Be in a valid state (not expired or revoked)
- Be authorized for subscription use
You can retrieve available payment methods using the customer payment methods endpoint.
^gid://shopify/CustomerPaymentMethod/[a-zA-Z0-9]+$Response
Payment method updated successfully