View Source Stripe.PaymentSource (Striped v0.5.0) (generated)
Link to this section Summary
Functions
When you create a new credit card, you must specify a customer or recipient on which to create it.
List sources for a specified customer.
Retrieve a specified source for a given customer.
Link to this section Types
@type t() :: %Stripe.PaymentSource{}
The payment_source
type.
Link to this section Functions
@spec create( client :: Stripe.t(), customer :: binary(), params :: %{ optional(:expand) => [binary()], optional(:metadata) => %{optional(binary()) => binary()}, optional(:source) => binary(), optional(:validate) => boolean() }, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
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
.
Details
- Method:
post
- Path:
/v1/customers/{customer}/sources
@spec list( client :: Stripe.t(), customer :: binary(), params :: %{ optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:object) => binary(), optional(:starting_after) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
List sources for a specified customer.
Details
- Method:
get
- Path:
/v1/customers/{customer}/sources
@spec retrieve( client :: Stripe.t(), customer :: binary(), id :: binary(), params :: %{optional(:expand) => [binary()]}, opts :: Keyword.t() ) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieve a specified source for a given customer.
Details
- Method:
get
- Path:
/v1/customers/{customer}/sources/{id}