Mercadopago.Payment (mercadopago_sdk_elixir v0.3.1)

Copy Markdown View Source

Payment operations via the Checkout API.

Summary

Functions

Captures a previously authorized payment.

Creates a payment from payment_data.

Fetches a payment by id.

Searches payments matching filters (query-string parameters).

Streams every result of search/3, fetching each page as it is consumed.

Updates a payment (e.g. to capture or cancel it).

Functions

capture(client, payment_id, amount \\ nil, opts \\ [])

Captures a previously authorized payment.

Omit amount to capture the full authorized amount, or pass a smaller one for a partial capture. This is the named form of the update/4 call MercadoPago documents for capture; update/4 remains available for any other field.

create(client, payment_data, opts \\ [])

Creates a payment from payment_data.

get(client, payment_id, opts \\ [])

Fetches a payment by id.

search(client, filters \\ nil, opts \\ [])

@spec search(Mercadopago.Client.t(), map() | nil, keyword()) ::
  Mercadopago.HTTP.response()

Searches payments matching filters (query-string parameters).

search_stream(client, filters \\ nil, opts \\ [])

@spec search_stream(Mercadopago.Client.t(), map() | nil, keyword()) :: Enumerable.t()

Streams every result of search/3, fetching each page as it is consumed.

See Mercadopago.Pagination.stream/3 for the options and for how failures are reported.

update(client, payment_id, payment_data, opts \\ [])

Updates a payment (e.g. to capture or cancel it).