View Source Stripe.PaymentSource (stripity_stripe v3.2.0)
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.
Types
@type t() :: %Stripe.PaymentSource{}
The payment_source
type.
Functions
@spec create( 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
.
@spec list( 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( 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}