GoCardlessClient.Resources.OutboundPaymentImports (GoCardlessClient v2.0.0)

Copy Markdown View Source

GoCardless Outbound Payment Imports API.

Bulk creation of outbound payments via an import batch. Useful for processing payroll, supplier payments, or any scenario with many outbound payments at once.

Workflow

  1. Create an import: create/3
  2. Add import entries: GoCardlessClient.Resources.OutboundPaymentImportEntries
  3. GoCardless processes entries and sends events/webhooks per payment

Import states

createdprocessingcompleted / failed

Example

{:ok, import} = GoCardlessClient.Resources.OutboundPaymentImports.create(client, %{
  currency: "GBP",
  links: %{payment_account: "PA123"}
})

Summary

Functions

Eagerly collects all outbound payment imports into a list.

Creates a new outbound payment import batch.

Retrieves a single outbound payment import by ID.

Returns a page of outbound payment imports.

Returns a lazy Stream over all pages of outbound payment imports.

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 outbound payment imports into a list.

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

Creates a new outbound payment import batch.

Params

  • :currency — ISO 4217 currency code for all payments in this batch (required)
  • links.payment_account — the Payment Account to fund from (required)

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

Retrieves a single outbound payment import 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 outbound payment imports.

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

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

Returns a lazy Stream over all pages of outbound payment imports.