GoCardlessClient Billing Requests API.
Billing Requests power Open Banking (Pay by Bank) and Variable Recurring Payments. They can collect a one-off payment, set up a mandate, or both simultaneously.
Example — instant bank payment
{:ok, br} = GoCardlessClient.Resources.BillingRequests.create(client, %{
payment_request: %{amount: 5000, currency: "GBP", description: "Order #1234"}
})Example — mandate + instant first payment
{:ok, br} = GoCardlessClient.Resources.BillingRequests.create(client, %{
payment_request: %{amount: 10000, currency: "GBP"},
mandate_request: %{currency: "GBP", scheme: "bacs"}
})
Summary
Functions
Cancels a Billing Request before it is fulfilled.
Changes the currency of a Billing Request.
Eagerly collects all Billing Requests into a list.
Collects bank account details for a Billing Request (server-side flow).
Collects customer details for a Billing Request (server-side flow).
Confirms the payer details for a Billing Request.
Creates a Billing Request. Accepts :payment_request, :mandate_request, or both.
Triggers the fallback flow for a Billing Request.
Fulfils a Billing Request, creating the payment and/or mandate.
Retrieves a single Billing Request by ID.
Returns a page of Billing Requests with optional filters.
Sends a notification to the customer for a Billing Request.
Selects the institution (bank) for Open Banking authorisation.
Returns a lazy Stream over all pages of Billing Requests.
Updates a Billing Request's metadata.
Functions
@spec cancel(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Cancels a Billing Request before it is fulfilled.
@spec change_currency(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Changes the currency of a Billing Request.
@spec collect_all(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, [map()]} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Eagerly collects all Billing Requests into a list.
@spec collect_bank_account(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Collects bank account details for a Billing Request (server-side flow).
@spec collect_customer_details( GoCardlessClient.Client.t(), String.t(), map(), keyword() ) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Collects customer details for a Billing Request (server-side flow).
@spec confirm_payer_details(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Confirms the payer details for a Billing Request.
@spec create(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Creates a Billing Request. Accepts :payment_request, :mandate_request, or both.
@spec fallback(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Triggers the fallback flow for a Billing Request.
@spec fulfil(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Fulfils a Billing Request, creating the payment and/or mandate.
@spec get(GoCardlessClient.Client.t(), String.t(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Retrieves a single Billing Request 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 Billing Requests with optional filters.
@spec notify(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Sends a notification to the customer for a Billing Request.
@spec select_institution(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Selects the institution (bank) for Open Banking authorisation.
@spec stream(GoCardlessClient.Client.t(), map(), keyword()) :: Enumerable.t()
Returns a lazy Stream over all pages of Billing Requests.
@spec update(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Updates a Billing Request's metadata.