1. Payment Methods
Documentation
  • Back to home
  • StripeKit
  • Installation
  • Getting Started
  • Choosing a Mode
  • Type Reference
  • Setup
    • Configuration
    • Timezones
    • Storage Adapter
    • Money and Currency
    • Error Handling
  • Stripe
    • Elements
  • Modules
    • Overview
    • Customers
      • Overview
      • List
      • Retrieve
      • Find or Create by Email
      • Create
      • Update
      • Sync
      • Delete
    • Payment Methods
      • Overview
      • Create Setup Intent
      • List
      • Attach
      • Detach
      • Set Default
      • Sync
    • Payments
      • Overview
      • Pay With Saved Method
      • Create
      • Retrieve
      • Confirm
      • Cancel
      • Sync
    • Checkout
      • Overview
      • Get
      • Create
      • Submit Fields
      • Apply Coupon
      • Mark Complete
    • Subscriptions
      • Overview
      • Create
      • Retrieve
      • Cancel
      • Resume
      • Toggle Collection Method
      • Update Fields
      • Apply Promotion Code
      • List By Customer
      • Find By Metadata
      • Sync
    • Invoices
      • Overview
      • Retrieve
      • List By Customer
      • List By Subscription
      • Pay With Saved Method
      • Void
      • Finalize
      • Sync
    • Coupons
      • Overview
      • Create
      • Validate
      • Apply To Subscription
      • List
      • Deactivate
    • Webhooks
      • Overview
      • Process
      • Events Reference
    • Sync
      • Overview
  1. Payment Methods

List

$kit->paymentMethods->list()#

Lists every payment method attached to a customer, and marks which one is their default.

Signature#

Parameters#

FieldTypeRequiredDescription
customerIdstringYesThe Stripe customer ID to list payment methods for.
userIdstring|intNoYour own internal user ID. Stamped onto every returned record, and, if provided, triggers a savePaymentMethods() call to your storage adapter.

Example request#

Example response#

Errors#

ExceptionWhen
StripeOperationErrorThe customer ID does not exist.

Notes#

Only when 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.
Previous
Create Setup Intent
Next
Attach
Built with