--- displayed_sidebar: jsClientSidebar slug: /references/js-client/PaymentMethodsResource --- import ParameterTypes from "@site/src/components/ParameterTypes" # PaymentMethodsResource This class is used to send requests to Payment Method API Routes part of the [Store Customer API Routes](https://docs.medusajs.com/api/store#customers\_postcustomers). All its method are available in the JS Client under the `medusa.customers.paymentMethods` property. All methods in this class require [customer authentication](AuthResource.mdx#authenticate). ## Methods ### list Retrieve the logged-in customer's saved payment methods. This method only works with payment providers created with the deprecated Payment Service interface. The payment methods are saved using the Payment Service's third-party service, and not on the Medusa backend. So, they're retrieved from the third-party service. #### Example ```ts import Medusa from "@medusajs/medusa-js" const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) // must be previously logged medusa.customers.paymentMethods.list().then(({ payment_methods }) => { console.log(payment_methods.length) }) ``` #### Parameters `", "description": "Custom headers to attach to the request.", "optional": false, "defaultValue": "{}", "expandable": false, "children": [] } ]} /> #### Returns