Delete a customer source
Delete a specified source for a given customer.
API Endpoint: DELETE /v1/customers/{customer}/sources/{id}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.customer.source.delete(customer="string", id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.customer.source.delete(customer="string", id="string")GET /v1/customers/{customer}/sources
List sources for a specified customer.
API Endpoint: GET /v1/customers/{customer}/sources
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.customer.source.list(customer="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.customer.source.list(customer="string")GET /v1/customers/{customer}/sources/{id}
Retrieve a specified source for a given customer.
API Endpoint: GET /v1/customers/{customer}/sources/{id}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.customer.source.get(customer="string", id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.customer.source.get(customer="string", id="string")Create a card
When you create a new credit card, you must specify a customer or recipient on which to create it.
If the card’s owner has no default card, then the new card will become the default.
However, if the owner already has a default, then it will not change.
To change the default, you should update the customer to have a new default_source.
API Endpoint: POST /v1/customers/{customer}/sources
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.customer.source.create(customer="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.customer.source.create(customer="string")POST /v1/customers/{customer}/sources/{id}
Update a specified source for a given customer.
API Endpoint: POST /v1/customers/{customer}/sources/{id}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.customer.source.update(customer="string", id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.customer.source.update(customer="string", id="string")Verify a bank account
Verify a specified bank account for a given customer.
API Endpoint: POST /v1/customers/{customer}/sources/{id}/verify
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.customer.source.verify(customer="string", id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.customer.source.verify(customer="string", id="string")