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
- Create an import:
create/3 - Add import entries:
GoCardlessClient.Resources.OutboundPaymentImportEntries - GoCardless processes entries and sends events/webhooks per payment
Import states
created → processing → completed / failed
Example
{:ok, import} = GoCardlessClient.Resources.OutboundPaymentImports.create(client, %{
currency: "GBP",
links: %{payment_account: "PA123"}
})
Summary
Functions
@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.
@spec create(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
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)
@spec get(GoCardlessClient.Client.t(), String.t(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Retrieves a single outbound payment import by ID.
@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.
@spec stream(GoCardlessClient.Client.t(), map(), keyword()) :: Enumerable.t()
Returns a lazy Stream over all pages of outbound payment imports.