GoCardlessClient.Resources.FundsAvailabilities (GoCardlessClient v2.0.0)

Copy Markdown View Source

GoCardless Funds Availabilities API.

Check whether sufficient funds are available in a Payment Account before initiating an outbound payment or withdrawal.

Example

{:ok, result} = GoCardlessClient.Resources.FundsAvailabilities.check(client, %{
  amount: 50000,
  currency: "GBP"
})

if result["available"] do
  # Proceed with outbound payment
else
  IO.puts("Funds available at: #{result["available_at"]}")
end

Summary

Functions

Checks whether funds are available for a given amount and currency.

Functions

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

Checks whether funds are available for a given amount and currency.

Params

  • :amount — amount in minor currency units (required)
  • :currency — ISO 4217 currency code (required)