Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.26 KB

File metadata and controls

56 lines (38 loc) · 1.26 KB

list

List a Customer's PaymentMethods

Returns a list of PaymentMethods for a given Customer

API Endpoint: GET /v1/customers/{customer}/payment_methods

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.customer.payment_method.list(customer="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.customer.payment_method.list(customer="string")

get

Retrieve a Customer's PaymentMethod

Retrieves a PaymentMethod object for a given Customer.

API Endpoint: GET /v1/customers/{customer}/payment_methods/{payment_method}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.customer.payment_method.get(customer="string", payment_method="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.customer.payment_method.get(
    customer="string", payment_method="string"
)