View Source Stripe.PaymentSource (Striped v0.1.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 :: map()) :: {: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 :: map()) :: {: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
Query parameters
:ending_before
string:expand
array of: string:limit
integer:object
string:starting_after
string
@spec retrieve( client :: term(), customer :: binary(), id :: binary(), params :: map() ) :: {: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}
Query parameters
:expand
array of: string