> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atako.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GoCardless

> Connect GoCardless to your Atako agents — 10 read and 8 write actions.

Let your agents collect bank payments with GoCardless: read customers, mandates, payments, subscriptions and payouts, create customers and authorisation links, take one-off or recurring payments, and cancel them.

## Connection

* **Authentication**: API key (Access token).
* **Required settings**:
  * **Environment** — Use "api-sandbox" for the Sandbox (api-sandbox.gocardless.com), or "api" for Live (api.gocardless.com).

<Note>
  Sign in to your GoCardless dashboard — manage-sandbox.gocardless.com for the Sandbox, manage.gocardless.com for Live — then Developers → Create → Access token. Name it, give it Read-write access, and copy the token (it is shown once). Enter "api-sandbox" in the Environment field for a sandbox token, "api" for a live one: a token is valid on its own environment only.

  See [GoCardless's documentation](https://developer.gocardless.com/api-reference).
</Note>

## Read actions (10)

| Action                        | Description                                                                                                                                                                                                                                                                                                                                                                 |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `get_customer`                | Fetch a single customer: name, e-mail, address, language and metadata.                                                                                                                                                                                                                                                                                                      |
| `get_payment`                 | Fetch a single payment: amount, currency, status, charge date, description and links.                                                                                                                                                                                                                                                                                       |
| `list_billing_requests`       | List billing requests, to find back the id of a request created earlier and check whether the payer completed it. Optional filters: status, customer. Cursor pagination with limit + after/before.                                                                                                                                                                          |
| `list_customer_bank_accounts` | List customer bank accounts (masked account number, bank name, country). Optional filters: customer, enabled, created\_at\_gt / created\_at\_lt. Cursor pagination with limit + after/before.                                                                                                                                                                               |
| `list_customers`              | List customers, newest first. Optional filters: currency, sort\_field, sort\_direction, created\_at\_gt / created\_at\_lt. Cursor pagination with limit + after/before.                                                                                                                                                                                                     |
| `list_events`                 | List events — the audit trail of everything that happened (payment failed, mandate cancelled…). Optional filters: resource\_type, action, or one resource id among payment / mandate / subscription / payout / billing\_request, plus created\_at\_gt / created\_at\_lt. resource\_type cannot be combined with a resource id. Cursor pagination with limit + after/before. |
| `list_mandates`               | List Direct Debit mandates — the authorisation a payment or a subscription is collected against. Optional filters: customer, creditor, customer\_bank\_account, status, reference, mandate\_type, created\_at\_gt / created\_at\_lt. Cursor pagination with limit + after/before.                                                                                           |
| `list_payments`               | List payments. Optional filters: customer, mandate, subscription, creditor, status, currency, charge\_date\_gte / charge\_date\_lte, created\_at\_gt / created\_at\_lt, sort\_field, sort\_direction. Cursor pagination with limit + after/before.                                                                                                                          |
| `list_payouts`                | List payouts — the amounts GoCardless has sent to your bank account, to reconcile against collected payments. Optional filters: status, currency, creditor, payout\_type, reference, created\_at\_gt / created\_at\_lt. Cursor pagination with limit + after/before.                                                                                                        |
| `list_subscriptions`          | List subscriptions (recurring payment schedules). Optional filters: customer, mandate, status, created\_at\_gt / created\_at\_lt. Cursor pagination with limit + after/before.                                                                                                                                                                                              |

## Write actions (8)

| Action                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cancel_mandate`              | Cancel a mandate: it moves to "cancelled" and no new payment can be collected against it. Arguments: mandateId (string MD…, in the path), metadata (object of string values, up to 3 keys, optional). The body is sent enveloped as \{"mandates": \{…}}.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `cancel_payment`              | Cancel a payment that has not yet been submitted to the banks (status "pending\_submission" or "pending\_customer\_approval"); it moves to "cancelled". Arguments: paymentId (string PM…, in the path), metadata (object of string values, up to 3 keys, optional). The body is sent enveloped as \{"payments": \{…}}.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `cancel_subscription`         | Cancel a subscription: it moves to "cancelled" and no further payment is created; payments already submitted are still collected. Arguments: subscriptionId (string SB…, in the path), metadata (object of string values, up to 3 keys, optional). The body is sent enveloped as \{"subscriptions": \{…}}.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `create_billing_request`      | Create a billing request: the object that asks a payer to authorise a mandate (and optionally pay straight away). Arguments: mandate\_request (object \{currency: string 3-letter ISO 4217, scheme: string bank payment scheme — "ach", "autogiro", "bacs", "becs", "becs\_nz", "betalingsservice", "faster\_payments", "pad", "pay\_to" or "sepa\_core", description: string, reference: string, verify: string enum "minimum" \| "recommended" \| "when\_available" \| "always"} — all optional but currency and scheme are what pins the mandate), payment\_request (object \{amount: integer in the lowest denomination, e.g. cents, currency: string, description: string, reference: string} — optional, for an instant first payment), customer\_id (string CU…, optional, to attach the request to an existing customer), fallback\_enabled (boolean), metadata (object of string values, up to 3 keys). The body is sent enveloped as \{"billing\_requests": \{…}} with customer\_id moved into links.customer. Then call create\_billing\_request\_flow to obtain the URL to send to the payer. |
| `create_billing_request_flow` | Create the hosted flow for a billing request and return its authorisation\_url — the link to send to the payer so they authorise the mandate. Arguments: billing\_request\_id (string BRQ…, required, sent as links.billing\_request), redirect\_uri (string URL the payer returns to once done), exit\_uri (string URL for a payer who cannot go further), language (string, 2-letter ISO 639-1, e.g. "fr"), lock\_customer\_details (boolean), lock\_bank\_account (boolean), prefilled\_customer (object \{email, given\_name, family\_name, company\_name, address\_line1, address\_line2, address\_line3, city, region, postal\_code, country\_code} — all strings, all optional). The body is sent enveloped as \{"billing\_request\_flows": \{…}}.                                                                                                                                                                                                                                                                                                                                                 |
| `create_customer`             | Create a customer. Arguments: email (string — required in most cases, so GoCardless can notify the payer), given\_name (string) and family\_name (string) — both required unless company\_name is given, company\_name (string, required unless given\_name + family\_name are given), address\_line1 / address\_line2 / address\_line3 (strings), city (string), region (string, 2-letter ISO 3166-2 code for US customers), postal\_code (string), country\_code (string, 2-letter ISO 3166-1 alpha-2, e.g. "FR"), language (string, 2-letter ISO 639-1, e.g. "fr"), phone\_number (string, ITU E.123 with country code), metadata (object of string values: up to 3 keys, key names up to 50 characters, values up to 500). The body is sent enveloped as \{"customers": \{…}}.                                                                                                                                                                                                                                                                                                                        |
| `create_payment`              | Collect a one-off payment against an active mandate. Arguments: amount (integer, REQUIRED, in the lowest denomination for the currency — 1250 means 12.50 EUR), currency (string enum, REQUIRED: AUD \| CAD \| DKK \| EUR \| GBP \| NZD \| SEK \| USD), mandate\_id (string MD…, REQUIRED, sent as links.mandate — see list\_mandates), description (string, shown to the payer in the notification e-mail), charge\_date (string "yyyy-mm-dd", a future collection date; collected as soon as possible when omitted), reference (string appearing on the payer bank statement), retry\_if\_possible (boolean), metadata (object of string values, up to 3 keys). The body is sent enveloped as \{"payments": \{…}}.                                                                                                                                                                                                                                                                                                                                                                                      |
| `create_subscription`         | Create a subscription: a recurring payment schedule on an active mandate. Arguments: amount (integer, REQUIRED, in the lowest denomination for the currency), currency (string, REQUIRED, 3-letter ISO 4217 — AUD, CAD, DKK, EUR, GBP, NZD, SEK and USD are supported), interval\_unit (string enum, REQUIRED: "weekly" \| "monthly" \| "yearly"), mandate\_id (string MD…, REQUIRED, sent as links.mandate), interval (integer ≥ 1, number of interval\_units between charges, default 1), day\_of\_month (integer 1–28, or -1 for the last day of the month), month (string enum: january…december, lowercase, only when interval\_unit is "yearly"), name (string, max 255, used as the description of each payment), start\_date (string "yyyy-mm-dd"), end\_date (string "yyyy-mm-dd"), count (integer, total number of payments to take), payment\_reference (string), retry\_if\_possible (boolean), metadata (object of string values, up to 3 keys). The body is sent enveloped as \{"subscriptions": \{…}}.                                                                                     |

## Permissions

Every action above must be explicitly granted to an agent before it can be used. See [Permissions](/integrations/permissions) for the grant model and [Security](/integrations/security) for how credentials are protected.
