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

# Adyen - Konbini

> Configure Konbini convenience store payments via Adyen as a payment method in Gr4vy.

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.

Konbini is a popular cash-based payment method in Japan. The buyer receives a payment voucher during checkout and then pays in cash at a participating convenience store. Konbini payments via Adyen are processed through eContext and are supported at Lawson, FamilyMart, Mini Stop, and Seicomart.

## Setup

Please follow the [common Adyen instructions](./adyen) to get set up with Konbini.

Next, make sure to enable Konbini as a payment method on your configured account.

## Supported countries

Konbini (Convenience Stores) supports transactions from buyers in `JP`.

## Supported currencies

Konbini (Convenience Stores) supports processing payments in `JPY`.

## Features

Konbini payments via Adyen support the following features:

* **Direct capture** - Capture funds at the time of the transaction
* **Refunds** - Refund transactions in full
* **Partial refunds** - Refund a portion of the original transaction amount
* **Settlement reporting** - Reconcile transactions against Adyen settlement reports

## Limitations

The following features are not supported by this connector:

* **Delayed capture** - Authorization and capture happen together
* **Partial capture** - Cannot capture a portion of the authorized amount
* **Void** - Cannot cancel a transaction once the voucher is issued
* **Payment method tokenization** - Cannot store the payment method for reuse
* **Zero auth** - Zero-amount verification transactions are not supported

## Integration

For Konbini, the default integration for Adyen is through a redirect to a hosted payments page.

Konbini is a cash payment method. After the voucher is issued, the buyer pays in cash at a convenience store, which can take up to three days. The payment is confirmed out of band, so rely on webhooks to detect the final status rather than the buyer returning to your site.

### Redirect integration

Start by creating a new transaction with the following required fields.

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

  ```go Go theme={"system"}
  amount := int64(1299)
  currency := "JPY"
  country := "JP"
  method := components.RedirectPaymentMethodCreateMethodKonbini
  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("JPY")
          .country("JP")
          .intent(TransactionIntent.CAPTURE)
          .paymentMethod(TransactionCreatePaymentMethod.of(RedirectPaymentMethodCreate.builder()
              .method(RedirectPaymentMethodCreateMethod.KONBINI)
              .country("JP")
              .currency("JPY")
              .redirectUrl("https://example.com/callback")
              .build()))
          .build())
      .call();

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

  ```php PHP theme={"system"}
  $transactionCreate = new TransactionCreate(
      amount: 1299,
      currency: 'JPY',
      country: 'JP',
      intent: 'capture',
      paymentMethod: new RedirectPaymentMethodCreate(
          method: 'konbini',
          country: 'JP',
          currency: 'JPY',
          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="JPY",
      country="JP",
      intent="capture",
      payment_method={
          "method": "konbini",
          "country": "JP",
          "currency": "JPY",
          "redirect_url": "https://example.com/callback",
      }
  )
  ```

  ```ts TypeScript theme={"system"}
  const transaction = await gr4vy.transactions.create({
      amount: 1299,
      currency: "JPY",
      country: "JP",
      intent: "capture",
      paymentMethod: {
          method: "konbini",
          country: "JP",
          currency: "JPY",
          redirectUrl: "https://example.com/callback"
      }
  })
  ```
</CodeGroup>

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

```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": "konbini"
}
```

Present the `approval_url` to the buyer so they can enter their phone number and receive a voucher reference. The buyer then takes the voucher to a participating convenience store and pays in cash.

Because Konbini payments settle out of band, the buyer is not redirected back to Gr4vy after paying. Rely on webhooks to detect the final status, for example `capture_succeeded` once the store processes the cash payment, or a failure state if the voucher expires.

### Direct integration

Adyen provides [web](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Components\&version=6.23.0), [Android](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=Android\&integration=Components\&version=5.15.0) and [iOS](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Components\&version=5.21.1) SDKs for a direct integration. For these flows you should indicate the platform by setting an appropriate `integration_client` when creating the transaction, and then build a client-side integration that uses the [`POST /transactions/:transaction_id/session`](/reference/transactions/get-transaction-session) API to initialize the Adyen SDK.

To start, create a new transaction with the appropriate `integration_client`.

<CodeGroup>
  ```csharp C# theme={"system"}
  var transaction = await client.Transactions.CreateAsync(
    transactionCreate: new TransactionCreate()
    {
      Amount = 1299,
      Currency = "JPY",
      Country = "JP",
      Intent = "capture",
      IntegrationClient = "ios",
      PaymentMethod =
        TransactionCreatePaymentMethod.CreateRedirectPaymentMethodCreate(
          new RedirectPaymentMethodCreate()
          {
            Method = "konbini",
            Country = "JP",
            Currency = "JPY",
            RedirectUrl = "https://example.com/callback",
          }
        ),
    }
  );
  ```

  ```go Go theme={"system"}
  amount := int64(1299)
  currency := "JPY"
  country := "JP"
  integrationClient := "ios"
  method := components.RedirectPaymentMethodCreateMethodKonbini
  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),
    IntegrationClient: &integrationClient,
    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("JPY")
      .country("JP")
      .intent(TransactionIntent.CAPTURE)
      .integrationClient("ios")
      .paymentMethod(TransactionCreatePaymentMethod.of(RedirectPaymentMethodCreate.builder()
        .method(RedirectPaymentMethodCreateMethod.KONBINI)
        .country("JP")
        .currency("JPY")
        .redirectUrl("https://example.com/callback")
        .build()))
      .build())
    .call();

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

  ```php PHP theme={"system"}
  $transactionCreate = new TransactionCreate(
    amount: 1299,
    currency: 'JPY',
    country: 'JP',
    intent: 'capture',
    integrationClient: 'ios',
    paymentMethod: new RedirectPaymentMethodCreate(
      method: 'konbini',
      country: 'JP',
      currency: 'JPY',
      redirectUrl: 'myapp://callback'
    )
  );
  $response = self::$sdk->transactions->create($transactionCreate);
  $transaction = $response->transaction;
  ```

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

  ```ts TypeScript theme={"system"}
  const transaction = await gr4vy.transactions.create({
    amount: 1299,
    currency: "JPY",
    country: "JP",
    intent: "capture",
    integrationClient: "ios",
    paymentMethod: {
      method: "konbini",
      country: "JP",
      currency: "JPY",
      redirectUrl: "https://example.com/callback"
    }
  })
  ```
</CodeGroup>

For mobile, set `integration_client` to `ios` or `android` and use your app deep link for `redirect_url` (for example, `yourapp://`).

After the transaction is created, the API response includes a `session_token` which can be used to get the [session data](/reference/transactions/get-transaction-session) for that transaction.

```sh theme={"system"}
POST /transactions/:transaction_id/session?token=:session_token
```

This session data provides the `sessionId` and `sessionData` required to load the Adyen SDK. Refer to the [common Adyen integration guidance](./adyen-sofort#direct-integration) for a worked example of initializing the Adyen SDK with this session data.

As with the redirect integration, the buyer pays in cash at a convenience store after the voucher is issued, so the final status arrives via webhook rather than an immediate response.

## Testing

Adyen has [instructions](https://docs.adyen.com/payment-methods/econtext-konbini/web-component/#test-and-go-live) on how to test Konbini.
