Mollie.Payments.Refunds (mollie v0.7.2)

Create refunds on a Payment. The refunded amount is credited to your customer.

Link to this section Summary

Functions

Cancels a refund for a payment.

Creates a refund on an existing payment.

Retrieve a single refund by its ID.

Link to this section Functions

Link to this function

cancel(client, payment_id, id, params \\ %{})

Specs

cancel(Mollie.Client.t(), binary(), binary(), map()) :: Mollie.response()

Cancels a refund for a payment.

example

Example

Mollie.Payments.Refunds.cancel client, "tr_7UhSN1zuXS", "re_4qqhO89gsT"

More info at: https://docs.mollie.com/reference/v2/refunds-api/cancel-refund

Link to this function

create(client, payment_id, body)

Specs

create(Mollie.Client.t(), binary(), map() | list()) :: Mollie.response()

Creates a refund on an existing payment.

Refund body example

%{
  "amount" => %{
    "currency" => "EUR",
    "value" => "25.00"
  },
  "descripton" => "Discount"
}

example

Example

Mollie.Payments.Refunds.create client, "tr_7UhSN1zuXS", refund_body

More info at: https://docs.mollie.com/reference/v2/refunds-api/create-refund

Link to this function

find(client, payment_id, id, params \\ %{})

Specs

Retrieve a single refund by its ID.

example

Example

Mollie.Payments.Refunds.find client, "tr_7UhSN1zuXS", "re_4qqhO89gsT"

More info at: https://docs.mollie.com/reference/v2/refunds-api/get-refund