$kit->paymentMethods->list()| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | The Stripe customer ID to list payment methods for. |
userId | string|int | No | Your own internal user ID. Stamped onto every returned record, and, if provided, triggers a savePaymentMethods() call to your storage adapter. |
| Exception | When |
|---|---|
StripeOperationError | The customer ID does not exist. |
userId is passed does StripeKit call savePaymentMethods($userId, $records) on your storage adapter, which is expected to fully replace that user's stored payment methods with the given list, not merge them. If you call list() without a userId, nothing is persisted.