Mollie.Customers.Subscriptions (mollie v0.7.2)
With subscriptions, you can schedule recurring payments to take place at regular intervals.
For example, by simply specifying an amount and an interval, you can create an endless subscription to charge a monthly fee, until you cancel the subscription.
Or, you could use the times parameter to only charge a limited number of times, for example to split a big transaction in multiple parts.
Link to this section Summary
Functions
Cancels a subscription.
Create a subscription to schedule recurring payments to take place at regular intervals.
Retrieve a subscription by its ID and its customer’s ID.
Retrieve all subscriptions of a customer. Results are paginated.
Retrieve all payments of a specific subscriptions of a customer. Results are paginated.
Link to this section Functions
cancel(client, customer_id, id, params \\ %{})
Specs
cancel(Mollie.Client.t(), binary(), binary(), map() | list()) :: Mollie.response()
Cancels a subscription.
example
Example
Mollie.Customers.Subscriptions client, "cst_stTC2WHAuS", "sub_rVKGtNd6s3"More info at: https://docs.mollie.com/reference/v2/subscriptions-api/cancel-subscription
create(client, customer_id, body \\ %{})
Specs
create(Mollie.Client.t(), binary(), map()) :: Mollie.response()
Create a subscription to schedule recurring payments to take place at regular intervals.
Subscription body example
%{
"amount" => %{
"value" => "19.95",
"currency" => "EUR"
},
"interval" => "1 month",
"description" => "Monthly subscription"
}
example
Example
Mollie.Customers.Subscriptions client, "cst_8wmqcHMN4U", subscription_bodyMore info at: https://docs.mollie.com/reference/v2/subscriptions-api/create-subscription
find(client, customer_id, id, params \\ %{})
Specs
find(Mollie.Client.t(), binary(), binary(), map() | list()) :: Mollie.response()
Retrieve a subscription by its ID and its customer’s ID.
example
Example
Mollie.Customers.Subscriptions.find client, "cst_8wmqcHMN4U", "sub_rVKGtNd6s3"More info at: https://docs.mollie.com/reference/v2/subscriptions-api/get-subscription
list(client, customer_id, params \\ %{})
Specs
list(Mollie.Client.t(), binary(), map() | list()) :: Mollie.response()
Retrieve all subscriptions of a customer. Results are paginated.
example
Example
Mollie.Customers.Subscriptions.list client, "cst_8wmqcHMN4U"More info at: https://docs.mollie.com/reference/v2/subscriptions-api/list-subscriptions
list_payments(client, customer_id, id, params \\ %{})
Specs
list_payments(Mollie.Client.t(), binary(), binary(), map() | list()) :: Mollie.response()
Retrieve all payments of a specific subscriptions of a customer. Results are paginated.
example
Example
Mollie.Customers.Subscriptions.list_payments client, "cst_8wmqcHMN4U", "sub_rVKGtNd6s3"More info at: https://docs.mollie.com/reference/v2/subscriptions-api/list-subscriptions-payments