Saving payment method for customer so I can create a subscription contact

Topic summary

Issue: A developer queried why a customer’s paymentMethods remained empty after completing checkout when trying to auto-create a subscription contract.

Key clarification: Shopify only saves a customer’s payment method if the checkout includes a subscription purchase tied to a selling plan (Shopify’s configuration for subscription offerings). One‑time purchases do not populate paymentMethods.

Actionable takeaway: To have a stored payment method available for creating a subscription contract, ensure the checkout includes an item with a selling plan (i.e., the customer purchases a subscription). Otherwise, a payment method won’t be saved via standard checkout.

Status: Resolved. The clarification answered the question; no additional implementation details or code changes were discussed.

Summarized with AI on December 25. AI used: gpt-5.

So I am making a subscription app. I need it so that when an order is created and the user is not subscribed a subscription contract is created for them, this process requires the customer to have a payment method, to get this I use:

{
customer(id: $customerID) {
firstName
paymentMethods(first: 5) {
edges {
node {
id
}
}
}
}
}
I was testing this on my development store with a fresh account but payment methods is blank, even after completing the checkout. I need to know if when a checkout is completed the paymentMethod is saved, if not do I have to handle this myself and how can I do this. Many Thanks in advance I have been stuck on this for hours

Payment methods aren’t going to be saved unless the customer checks out with an item in their cart that has a selling plan (ie unless they have purchased a subscription)

Thanks for solving this Brian!!