> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/integrations/connectors-integrations/payment-processor-capabilities/available-connectors/gocardless.md).

# GoCardless

Configure GoCardless bank debit payments with Hyperswitch.

ACH, BECS, and SEPA Direct Debit define the GoCardless payment gateway route. Mandates and refunds apply to every bank debit method. Capture stays automatic or sequential automatic throughout.

### Status and capabilities

**Integration status:** sandbox

**Category:** payment gateway

**Webhook flows:** mandates, payments, refunds

| Payment method | Type              | Mandates  | Refunds   | Capture methods                 | Countries | Currencies |
| -------------- | ----------------- | --------- | --------- | ------------------------------- | --------- | ---------- |
| bank debit     | ACH Direct Debit  | supported | supported | automatic, sequential automatic | USA       | USD        |
| bank debit     | BECS Direct Debit | supported | supported | automatic, sequential automatic | AUS       | AUD        |
| bank debit     | SEPA Direct Debit | supported | supported | automatic, sequential automatic | 30        | 7          |

### Activate GoCardless with Hyperswitch

#### Before you start

1. Create a GoCardless sandbox account.
2. Sign in to the [Hyperswitch control center](https://app.hyperswitch.io/) or create your Hyperswitch account.
3. In the GoCardless dashboard, go to **Developers > Create > Access Token** and create or copy your Access Token.
4. Enable the same payment methods in GoCardless and in your Hyperswitch connector configuration.

To connect GoCardless to your Hyperswitch account, follow [Activate a connector on Hyperswitch](/integrations/connectors-integrations/activate-connector-on-hyperswitch.md), then return here for what GoCardless supports.

### Connector-Specific Notes

Hyperswitch sends `GoCardless-Version: 2015-07-06` on connector requests. This pins the API version used by the implementation. See [`GOCARDLESS_VERSION`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/gocardless.rs#L85-L110).

### Authentication

Provide an `<access token>`. The `HeaderKey` mapping assigns `api_key` to the access token, and every connector request sends `Authorization: Bearer <access token>`. See [`GocardlessAuthType::try_from()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs#L635-L649) and [`get_auth_header()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/gocardless.rs#L131-L142).

### Webhooks

Configure a `<webhook signing secret>` for source verification. Hyperswitch reads a hex-encoded signature from `Webhook-Signature` and verifies HMAC-SHA256 over the raw request body using the configured `merchant_secret`. See [`get_webhook_source_verification_signature()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/gocardless.rs#L719-L753) and [`verify_webhook_source()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_interfaces/src/webhooks.rs#L265-L301).

The connector processes 11 payment action values:

| Wire action value           | Effect                |
| --------------------------- | --------------------- |
| `created`                   | Payment is processing |
| `customer_approval_granted` | Payment is processing |
| `customer_approval_denied`  | Payment fails         |
| `submitted`                 | Payment is processing |
| `confirmed`                 | Payment succeeds      |
| `paid_out`                  | Payment succeeds      |
| `late_failure_settled`      | Payment fails         |
| `surcharge_fee_debited`     | No status update      |
| `failed`                    | Payment fails         |
| `cancelled`                 | Payment fails         |
| `resubmission_required`     | No status update      |

Because [`WebhookAction`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs#L855-L860) is untagged and tries payment actions first, refund webhooks with actions `created` or `failed`, and mandate webhooks with actions `cancelled`, `created`, `customer_approval_granted`, `failed`, or `submitted`, are processed as payment events regardless of `resource_type`.

The remaining 3 refund actions and 9 mandate actions reach their resource-specific effects:

| Resource | Wire action value           | Effect                 |
| -------- | --------------------------- | ---------------------- |
| Refunds  | `paid`                      | Refund succeeds        |
| Refunds  | `refund_settled`            | No status update       |
| Refunds  | `funds_returned`            | No status update       |
| Mandates | `customer_approval_skipped` | No status update       |
| Mandates | `active`                    | Mandate becomes active |
| Mandates | `transferred`               | No status update       |
| Mandates | `expired`                   | Mandate is revoked     |
| Mandates | `resubmission_requested`    | No status update       |
| Mandates | `reinstated`                | Mandate becomes active |
| Mandates | `replaced`                  | No status update       |
| Mandates | `consumed`                  | Mandate is revoked     |
| Mandates | `blocked`                   | No status update       |

The wire values use `snake_case` in [`PaymentsAction`, `RefundsAction`, and `MandatesAction`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs#L855-L905). Their effects come from [`get_webhook_event_type()`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/gocardless.rs#L790-L849).

### Source reference

The connector implementation is [`gocardless.rs`](https://github.com/juspay/hyperswitch/blob/a17a23c4c4c907d2314043a32a9f505f7f2bd4f9/crates/hyperswitch_connectors/src/connectors/gocardless.rs).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hyperswitch.io/integrations/connectors-integrations/payment-processor-capabilities/available-connectors/gocardless.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
