Sample - Stripe API
GET/v1/payment_methods

List payment methods

Lists payment methods available for retrieval, optionally filtered by customer, account, redisplay setting, or payment-method type. Use starting_after or ending_before to paginate the results and limit to control page size. Unfiltered results include all payment method types except custom.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

8 parameters
allow_redisplaystringoptional
Filters payment methods by whether they can be shown again in a customer checkout flow: always, limited, or unspecified.
Allowed:alwayslimitedunspecified
customerstringoptional
The unique identifier of the customer whose payment methods to retrieve. Maximum 5000 characters.
customer_accountstringoptional
The unique identifier of the account whose payment methods to retrieve. Maximum 5000 characters.
ending_beforestringoptional
Cursor identifying the first object on the previous page to retrieve. Maximum 5000 characters.
expandarray<string>optional
Specifies response fields to expand. Each expansion value must not exceed 5000 characters.
limitintegeroptional
Maximum number of objects to return. Must be between 1 and 100 and defaults to 10 when omitted.
starting_afterstringoptional
Cursor identifying the last object on the previous page to retrieve. Maximum 5000 characters.
typestringoptional
Filters results by payment method type. Without this filter, the list includes all payment method types except custom.
Allowed:acss_debitaffirmafterpay_clearpayalipayalmaamazon_payau_becs_debitbacs_debitbancontactbilliebizumblik

2 status codes
200Returns a list object containing payment methods in `data`, a `has_more` pagination flag, the list `object` type, and the list URL.
dataarray<PaymentMethod>required
has_morebooleanrequired
True if this list has another page of items after this one that can be fetched.
objectstringrequired
String representing the object's type. Objects of the same type share the same value. Always has the value `list`.
Allowed:list
urlstringrequired
The URL where this list can be accessed.
defaultError response.
errorobjectrequired

Error handling

allow_redisplay must be one of always, limited, or unspecified when provided. type must be one of the payment method types accepted by the API, and limit must be between 1 and 100 with a default of 10 when omitted.