mollie v0.2.2 Mollie.Payments

Link to this section Summary

Functions

Creates a single payment

Retrieve a single payment object by its payment token

Retrieve all payments created with the current website profile, ordered from newest to oldest. Results are paginated

Link to this section Functions

Link to this function cancel(client, id, params \\ %{})
cancel(Mollie.Client.t(), binary(), map()) :: Mollie.response()

Cancels a payment.

Example

Mollie.Payments.cancel client, "tr_7UhSN1zuXS"

More info at: https://docs.mollie.com/reference/v2/payments-api/cancel-payment

Link to this function create(client, body)
create(Mollie.Client.t(), map() | list()) :: Mollie.response()

Creates a single payment.

Payment body example

%{
  "amount" => %{
    "currency" => "USD",
    "value" => "100.00"
  },
  "description" => "Blue suede shows",
  "redirectUrl" => "https://shop.example.com/checkout"
}

Example

Mollie.Payments.create client, payment_body

More info at: https://docs.mollie.com/reference/v2/payments-api/create-payment

Link to this function find(client, id, params \\ %{})

Retrieve a single payment object by its payment token.

Example

Mollie.Payments.find client, "tr_7UhSN1zuXS"

More info at https://docs.mollie.com/reference/v2/payments-api/get-payment

Link to this function list(client, params \\ %{})

Retrieve all payments created with the current website profile, ordered from newest to oldest. Results are paginated.

Examples

Mollie.Payments.list client
Mollie.Payments.list client, %{limit: 100, from: "tr_7UhSN1zuXS"}

More info at: https://docs.mollie.com/reference/v2/payments-api/list-payments