Skip to main content
PUT
Update subscription payment method

Headers

X-API-Key
string
required

API Key for authentication

Query Parameters

contractId
integer<int64>
required

Subscription contract ID to update payment method for. Must be a valid contract ID that belongs to the authenticated shop.

Required range: x >= 1
paymentMethodId
string
required

ID 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.

Pattern: ^gid://shopify/CustomerPaymentMethod/[a-zA-Z0-9]+$

Response

Payment method updated successfully