> ## Documentation Index
> Fetch the complete documentation index at: https://integration.wpay.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Adyen - Pay by Bank (redirect)

> Configure Adyen's Pay by Bank (US), a redirect to Plaid that Adyen hosts, as a payment method in Gr4vy.

**Adyen**

Adyen is a global payment technology company founded in 2006 in Amsterdam, Netherlands. The company provides a single platform for accepting payments across online, mobile, and in-store channels for major enterprises worldwide including Uber, Spotify, and Microsoft.

Pay by Bank (US) is Adyen's open banking payment method for the US market, powered by Plaid. The buyer is redirected to Plaid to select and authenticate with their bank. Plaid runs balance and risk checks at the time of authorization, and the payment settles over the ACH Direct Debit network.

Adyen runs the Plaid flow on its own page, and Adyen keeps the bank account. This is separate from Gr4vy's own Pay by Bank with [Plaid](./plaid-bank), where Gr4vy links and stores the bank account.

> [!NOTE]
>
> **Four Adyen connectors debit a buyer's bank account.** Pick the one that matches who collects the account:
>
> * [ACH Direct Debit](https://integration.wpay.com.au/connections/payments/adyen-ach) (redirect): the buyer enters their account and routing numbers on Adyen's page, and Adyen keeps them.
> * [SEPA](https://integration.wpay.com.au/connections/payments/adyen-sepa) (redirect): the buyer enters their IBAN on Adyen's page, and Adyen keeps it.
> * [Pay by Bank (redirect)](https://integration.wpay.com.au/connections/payments/adyen-paybybank): Adyen sends the buyer to Plaid to choose their bank. US only.
> * [Bank account (ACH, SEPA, BACS)](https://integration.wpay.com.au/connections/payments/adyen-bank) (stored in Gr4vy): you send the bank account details or a Plaid-linked account, and Gr4vy stores the account. Use this connector to charge bank accounts that you [import](https://integration.wpay.com.au/guides/features/token-import/overview.md) into Gr4vy.

## Setup

Please follow the [common Adyen instructions](./adyen) to get set up with Pay by Bank (US).

Next, contact Adyen to enable Pay by Bank (US) on your merchant account. Adyen requires merchants to be registered with Plaid before go-live, which can take up to one week.

## Supported countries

**Pay by Bank (redirect)**

## Supported currencies

**Pay by Bank (redirect)**

## Capabilities

This list is for guidance only. It doesn't guarantee availability or
create any rights, and the provider may need to enable some features for
your account.

## Integration

Pay by Bank (US) is always a redirect flow. After creating a transaction, the buyer is redirected to Plaid to select their bank and authenticate. After authentication, Plaid runs a balance check and the buyer is redirected back to your `redirect_url`.

### Redirect integration

Create a new transaction using the `paybybank` method.

```csharp C# theme={"system"}
var transaction = await client.Transactions.CreateAsync(
    transactionCreate: new TransactionCreate()
    {
        Amount = 1299,
        Currency = "USD",
        Country = "US",
        Intent = "capture",
        PaymentMethod =
            TransactionCreatePaymentMethod.CreateRedirectPaymentMethodCreate(
                new RedirectPaymentMethodCreate()
                {
                    Method = "paybybank",
                    Country = "US",
                    Currency = "USD",
                    RedirectUrl = "https://example.com/callback",
                }
            ),
    }
);
```

```go Go theme={"system"}
amount := int64(1299)
currency := "USD"
country := "US"
method := components.RedirectPaymentMethodCreateMethodPaybybank
redirectUrl := "https://example.com/callback"

redirectPaymentMethodCreate := components.RedirectPaymentMethodCreate{
    Method:      method,
    Country:     country,
    Currency:    currency,
    RedirectURL: redirectUrl,
}
paymentMethod := components.CreateTransactionCreatePaymentMethodRedirectPaymentMethodCreate(redirectPaymentMethodCreate)

transactionCreate := components.TransactionCreate{
    Amount:        amount,
    Currency:      currency,
    Country:       &country,
    Intent:        gr4vy.Pointer(components.TransactionIntentCapture),
    PaymentMethod: &paymentMethod,
}

transaction, err := client.Transactions.Create(ctx, transactionCreate, nil, nil, nil)
```

```java Java theme={"system"}
CreateTransactionResponse transactionResponse = gr4vyClient.transactions().create()
    .transactionCreate(TransactionCreate.builder()
        .amount(1299L)
        .currency("USD")
        .country("US")
        .intent(TransactionIntent.CAPTURE)
        .paymentMethod(TransactionCreatePaymentMethod.of(RedirectPaymentMethodCreate.builder()
            .method(RedirectPaymentMethodCreateMethod.PAYBYBANK)
            .country("US")
            .currency("USD")
            .redirectUrl("https://example.com/callback")
            .build()))
        .build())
    .call();

Transaction transaction = transactionResponse.transaction().orElse(null);
```

```php PHP theme={"system"}
$transactionCreate = new TransactionCreate(
    amount: 1299,
    currency: 'USD',
    country: 'US',
    intent: 'capture',
    paymentMethod: new RedirectPaymentMethodCreate(
        method: 'paybybank',
        country: 'US',
        currency: 'USD',
        redirectUrl: 'https://example.com/callback'
    )
);
$response = self::$sdk->transactions->create($transactionCreate);
$transaction = $response->transaction;
```

```python Python theme={"system"}
transaction: models.Transaction = client.transactions.create(
    amount=1299,
    currency="USD",
    country="US",
    intent="capture",
    payment_method={
        "method": "paybybank",
        "country": "US",
        "currency": "USD",
        "redirect_url": "https://example.com/callback",
    }
)
```

```ts TypeScript theme={"system"}
const transaction = await gr4vy.transactions.create({
    amount: 1299,
    currency: "USD",
    country: "US",
    intent: "capture",
    paymentMethod: {
        method: "paybybank",
        country: "US",
        currency: "USD",
        redirectUrl: "https://example.com/callback"
    }
})
```

After the transaction is created, the API response includes `payment_method.approval_url` and the `buyer_approval_pending` status.

```json theme={"system"}
{
  "type": "transaction",
  "id": "ea1efdd0-20f9-44d9-9b0b-0a3d71e9b625",
  "payment_method": {
    "type": "payment-method",
    "approval_url": "https://cdn.sandbox.spider.gr4vy.app/connectors/adyen/apm.html?token=..."
  },
  "method": "paybybank"
}
```

Open the `approval_url` in a popup or redirect so the buyer can authenticate with their bank via Plaid. After the buyer completes the flow they are redirected to the `redirect_url` you provided when creating the transaction. Do not rely solely on the redirect — either poll the transaction or (recommended) rely on webhooks to detect the final status (for example `capture_succeeded` or failure states).

> [!NOTE]
>
> Pay by Bank (US) includes a Plaid balance check at authorization. If the selected bank account has insufficient funds, Adyen refuses the authorization and the transaction moves to a declined state.

## Recurring payments

Pay by Bank (US) via Adyen supports storing the bank account after the first redirect. When you store the payment method, Gr4vy registers a recurring contract with Adyen so the stored bank account can be debited for subsequent transactions without requiring the buyer to go through the Plaid flow again.

See [Recurring payments](https://integration.wpay.com.au/guides/features/recurring-payments/overview.md) for an overview of storing and reusing payment methods.

Pay by Bank (US) via Adyen doesn't support delayed capture, so always set `intent` to `capture`. To store the bank account without charging the buyer, create a transaction with an `amount` of `0`, `intent` set to `capture`, and `store` set to `true`. A transaction with `intent` set to `authorize` finds no matching connection and fails with the error `There is no active payment service for this transaction.`

## Testing

Adyen provides a [Pay by Bank (US) sandbox](https://docs.adyen.com/payment-methods/pay-by-bank-us/) for testing. Use the Plaid sandbox credentials (`user_good` / `pass_good`) when prompted during the redirect flow. Select an account with sufficient balance (for example, the savings account) to avoid the balance-check refusal.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.