GoCardlessClient.Resources.MandateImports (GoCardlessClient v2.0.0)

Copy Markdown View Source

GoCardless Mandate Imports API.

Used to bulk-import mandates migrated from another payment provider.

Workflow

  1. Create a mandate import: create/3
  2. Add individual mandate entries: GoCardlessClient.Resources.MandateImportEntries.add/3
  3. Submit the import for processing: submit/3
  4. GoCardless processes the import and sends webhooks

You can cancel/3 an import at any time before submission.

Example

{:ok, import} = GoCardlessClient.Resources.MandateImports.create(client, %{
  scheme: "bacs"
})

# Add entries...

{:ok, submitted} = GoCardlessClient.Resources.MandateImports.submit(client, import["id"])

Summary

Functions

Cancels a mandate import. Can only be cancelled before submission.

Creates a new mandate import batch.

Retrieves a single mandate import by ID.

Submits a mandate import for processing. All entries must be added before calling this.

Functions

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

Cancels a mandate import. Can only be cancelled before submission.

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

Creates a new mandate import batch.

Params

  • :scheme — target scheme e.g. "bacs", "sepa_core" (required)

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

Retrieves a single mandate import by ID.

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

Submits a mandate import for processing. All entries must be added before calling this.