View Source Stripe.PaymentSource (Striped v0.2.0)
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 :: term(), customer :: binary(), params :: %{ optional(:expand) => [:string], :metadata => :object, :source => :string, optional(:validate) => :boolean } ) :: {: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( client :: term(), customer :: binary(), params :: %{ optional(:ending_before) => :string, optional(:expand) => [:string], optional(:limit) => :integer, optional(:object) => :string, optional(:starting_after) => :string } ) :: {: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 :: term(), customer :: binary(), id :: binary(), params :: %{optional(:expand) => [:string]} ) :: {: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}