GoCardlessClient.Resources.Payouts (GoCardlessClient v2.0.0)

Copy Markdown View Source

GoCardless Payouts API.

Payouts are batched settlements from GoCardless to your creditor bank account. GoCardless aggregates collected payments and sends periodic payouts.

Payout states

pendingpaid

Example

{:ok, %{items: payouts}} = GoCardlessClient.Resources.Payouts.list(client, %{
  status: "paid",
  currency: "GBP"
})

Summary

Functions

Eagerly collects all payouts into a list.

Retrieves a single payout by ID.

Returns a page of payouts.

Returns a lazy Stream over all pages of payouts.

Updates a payout's metadata. Only :metadata can be changed.

Functions

collect_all(client, params \\ %{}, opts \\ [])

@spec collect_all(GoCardlessClient.Client.t(), map(), keyword()) ::
  {:ok, [map()]}
  | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}

Eagerly collects all payouts into a list.

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

Retrieves a single payout by ID.

list(client, params \\ %{}, opts \\ [])

@spec list(GoCardlessClient.Client.t(), map(), keyword()) ::
  {:ok, %{items: [map()], meta: map()}}
  | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}

Returns a page of payouts.

Filter by :creditor, :creditor_bank_account, :currency, :status, :created_at[gte], :created_at[lte], :payout_type ("merchant" or "partner").

stream(client, params \\ %{}, opts \\ [])

@spec stream(GoCardlessClient.Client.t(), map(), keyword()) :: Enumerable.t()

Returns a lazy Stream over all pages of payouts.

update(client, id, params, opts \\ [])

Updates a payout's metadata. Only :metadata can be changed.