# Update subscription payment method Updates the payment method for a subscription contract by refreshing payment instrument from Shopify customer. This endpoint syncs the subscription's payment method with the customer's default payment method in Shopify. Payment Method Update Process: - Fetch Latest Payment: Retrieves customer's current default payment method from Shopify - Update Contract: Associates new payment method with subscription contract - Validate Payment: Ensures payment method is valid and active - Sync Changes: Updates payment instrument in subscription billing system Key Features: - Automatic Sync: Pulls latest payment method from Shopify customer record - Payment Validation: Verifies new payment method is usable for billing - Contract Update: Updates Shopify subscription contract with new payment - Failed Billing Recovery: Useful for updating payment after billing failures Use Cases: - Customer updates credit card and wants to apply to existing subscription - Recover from failed billing by allowing payment method update - Sync payment methods in customer portal workflows - Update expired or invalid payment methods - Switch between multiple saved payment methods - Integration with custom payment update flows Important Notes: - Customer must have a default payment method in Shopify - Payment method must be valid and not expired - Updates are reflected immediately for future billing - Does not retry failed billing attempts automatically Authentication: Requires API key authentication via X-API-Key header or api_key parameter Endpoint: PUT /api/external/v2/subscription-contracts-update-payment-method Version: 0.0.1 ## Query parameters: - `contractId` (integer, required) Subscription contract ID to update payment method for Example: 123456789 - `api_key` (string) API Key (Deprecated - Use Header X-API-Key instead) ## Header parameters: - `X-API-Key` (string) ## Response 200 fields ## Response 400 fields ## Response 401 fields ## Response 404 fields ## Response 500 fields