Retrieves a PaymentMethod object for a given Customer.
Parameters
No parameters.
Returns
Returns a PaymentMethod object.
curl https://api.stripe.com/v1/customers/{{CUSTOMER_ID}}/payment_methods/{{PAYMENT_METHOD_ID}} \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"{ "id": "pm_1NVChw2eZvKYlo2CHxiM5E2E", "object": "payment_method", "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": null, "phone": null }, "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "pass" }, "country": "US", "exp_month": 12, "exp_year": 2034, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "generated_from": null, "last4": "4242", "networks": { "available": [ "visa" ], "preferred": null }, "three_d_secure_usage": { "supported": true }, "wallet": null }, "created": 1689682128, "customer": "cus_9s6XKzkNRiz8i3", "livemode": false, "metadata": {}, "redaction": null, "type": "card"}Returns a list of all PaymentMethods.
Parameters
- typeenum
Filters the list by the object
typefield. Unfiltered, the list returns all payment method types exceptcustom. If your integration expects only one type of payment method in the response, specify that type value in the request to reduce your payload.
More parameters
- allow_
redisplayenum - customerstring
- customer_
accountstring - ending_
beforestring - limitinteger
- starting_
afterstring
Returns
A dictionary with a data property that contains an array of up to limit PaymentMethods of type type, starting after PaymentMethods starting_. Each entry in the array is a separate PaymentMethod object. If no more PaymentMethods are available, the resulting array will be empty.
curl -G https://api.stripe.com/v1/payment_methods \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d type=card \ -d limit=3 \ -d customer={{CUSTOMER_ID}}{ "object": "list", "url": "/v1/payment_methods", "has_more": false, "data": [ { "id": "pm_1NO6mA2eZvKYlo2CEydeHsKT", "object": "payment_method", "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": null, "phone": null }, "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "unchecked" }, "country": "US", "exp_month": 8, "exp_year": 2024, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "generated_from": null, "last4": "4242", "networks": { "available": [ "visa" ], "preferred": null }, "three_d_secure_usage": { "supported": true }, "wallet": null }, "created": 1687991030, "customer": "cus_9s6XKzkNRiz8i3", "livemode": false, "metadata": {}, "type": "card" } ]}Returns a list of PaymentMethods for a given Customer
Parameters
- typeenum
An optional filter on the list, based on the object
typefield. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
More parameters
- allow_
redisplayenum - ending_
beforestring - limitinteger
- starting_
afterstring
Returns
A dictionary with a data property that contains an array of up to limit PaymentMethods of type type, starting after PaymentMethods starting_. Each entry in the array is a separate PaymentMethod object. If no more PaymentMethods are available, the resulting array will be empty.
curl -G https://api.stripe.com/v1/customers/{{CUSTOMER_ID}}/payment_methods \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d limit=3{ "object": "list", "url": "/v1/customers/cus_9s6XKzkNRiz8i3/payment_methods", "has_more": false, "data": [ { "id": "pm_1NVChw2eZvKYlo2CHxiM5E2E", "object": "payment_method", "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": null, "phone": null }, "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "pass" }, "country": "US", "exp_month": 12, "exp_year": 2034, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "generated_from": null, "last4": "4242", "networks": { "available": [ "visa" ], "preferred": null }, "three_d_secure_usage": { "supported": true }, "wallet": null }, "created": 1689682128, "customer": "cus_9s6XKzkNRiz8i3", "livemode": false, "metadata": {}, "redaction": null, "type": "card" } ]}