Subscription migration guide

Fix “customer_payment_method_id has an invalid customer payment method ID”

Check your contract CSV

What Shopify expects

Shopify’s column table describes customer_payment_method_id as “The ID for the payment method used by the customer for the contract”, a unique alphanumeric code, for example 24e8c839c47ef47d30ad28346d130e74. The troubleshooting page adds that it “needs to match the correct payment method ID in your Shopify admin” and must belong to the customer_id on the same row.

Works
customer_id,…,customer_payment_method_id
6320530986896,…,24e8c839c47ef47d30ad28346d130e74

The usual causes

  • A full gid like gid://shopify/CustomerPaymentMethod/24e8…: keep only the code at the end.
  • Your old app’s own payment method number (Recharge’s payment_method_id, for example).
  • A Stripe token (pm_…, card_…) or PayPal billing agreement (B-…): these aren’t saved in Shopify.
  • The right card, but on the wrong customer row (“customer_payment_method_id does not match the customer”).
  • A revoked or expired card.
Doesn’t work: Stripe token
customer_payment_method_id
pm_1PRfaqCDgYAbXXXXXXXX

Where to get the real ID

  1. Recharge: in Payment Methods - All, rows with processor_name shopify_payments have the Shopify ID in processor_payment_method_token.
  2. Seal, Appstle, Loop: their exports usually don’t include it. Install Shopify’s free GraphiQL app with read_customers and read_customer_payment_methods, run the read-only lookup the builder writes for you, and paste the result back.
  3. If a customer has several saved cards, pick the one their subscription should charge. The builder matches by last 4 digits when the export has them.

Customers whose card isn’t in Shopify

If the old app charged through its own Stripe, Braintree or Authorize.net account, the card isn’t saved in Shopify, and the CSV can’t fix that. Either ask those customers to subscribe again through your Shopify checkout before their next charge, or use an app that has Shopify’s protected payment-method scope to import the cards (Shopify’s customerPaymentMethodRemoteCreate flow). Keep those customers billing in the old app until they have a working Shopify payment method.

More subscription migration guides