--- title: "Online banking Finland for API only" description: "Add Online banking Finland to your API-only integration." url: "https://docs.adyen.com/payment-methods/finland-online-banking/api-only" source_url: "https://docs.adyen.com/payment-methods/finland-online-banking/api-only.md" canonical: "https://docs.adyen.com/payment-methods/finland-online-banking/api-only" last_modified: "2026-05-25T12:55:01+02:00" language: "en" --- # Online banking Finland for API only Add Online banking Finland to your API-only integration. [View source](/payment-methods/finland-online-banking/api-only.md) You can add Online banking Finland to your existing integration. The following instructions show only what you must add to your integration specifically for Online banking Finland. If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide. ## Requirements | Requirement | Description | | | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | **Integration type** | Make sure that you have an existing [API-only integration](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only). | | | **Redirect handling** | Make sure that your existing integration is set up to [handle the redirect](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#handle-the-redirect). `action.type`: **redirect**. | | | **Setup steps** | Before you begin, [add Online banking Finland in your Customer Area](/payment-methods/add-payment-methods). | | ## How it works 1. The shopper selects Online banking Finland as the payment method. 2. The shopper enters their details in the [payment form that you build](#build-your-payment-form). 3. When you make the payment request, you [include additional information about the items that the shopper intends to purchase](#additional-parameters-payments). 4. Your existing integration setup will [handle the redirect](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#handle-the-redirect). ## Build your payment form There are two options available when building your payment form for Online banking Finland. 1. Make use of the Paytrail payment page for bank selection (default). * In your form, display the payment button for Online banking Finland. * Make a [payment](#additional-parameters-payments). 2. Show the list of issuer banks in your checkout and redirect shoppers to their selected issuer. * Show a list of available banks to your shopper. * After the shopper selects a bank, pass the corresponding **Issuer** value to your server. You will need this to make a [payment](#additional-parameters-payments). The available issuers for Online banking Finland are the same in the test and live environment: | Bank name | Issuer ID | | ---------------- | --------------- | | OP | osuuspankki | | Nordea | nordea | | NordeaBusiness | nordea-business | | Danske Bank | danske | | S-Pankki | spankki | | POP Pankki | pop | | Oma Säästöpankki | omasp | | Aktia | aktia | | Handelsbanken | handelsbanken | | Säästöpankki | saastopankki | | Ålandsbanken | alandsbanken | You can also get the issuer list from the [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) response, as explained in the [API-only integration guide](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only\&version=71#get-available-payment-methods). You can [download the logo for Online banking Finland](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%2Bonly\&version=71#downloading-logos) and for the issuing banks to use in your form. ## Get Online banking Finland as an available payment method When you make the [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) to [get available payment methods](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#get-available-payment-methods), specify the following so that Online banking Finland is included in the response. | Parameter | Values | | ------------------------------------------------------------------------------------------------------------------ | ------------------------- | | [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-countryCode) | **FI** | | [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount-currency) | **EUR** | | [amount.value](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount-value) | The value of the payment. | **Example request for available payment methods** #### curl ```bash curl https://checkout-test.adyen.com/v72/paymentMethods \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "amount": { "currency": "EUR", "value": 1000 }, "paymentMethod": { "type": "ebanking_FI" }, "shopperLocale": "fi-FI", "countryCode": "FI", "reference":"YOUR_ORDER_NUMBER", "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "shopperEmail": "s.hopper@@example.com" }' ``` #### Java ```java // Adyen Java API Library v41.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("EUR") .value(1000L); PaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest() .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .countryCode("FI") .shopperEmail("s.hopper@@example.com") .shopperLocale("fi-FI"); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentMethodsResponse response = service.paymentMethods(paymentMethodsRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(1000); $paymentMethodsRequest = new PaymentMethodsRequest(); $paymentMethodsRequest ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setCountryCode("FI") ->setShopperEmail("s.hopper@@example.com") ->setShopperLocale("fi-FI"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->paymentMethods($paymentMethodsRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the LIVE environment, also include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "EUR", Value = 1000 }; PaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest { Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", CountryCode = "FI", ShopperEmail = "s.hopper@@example.com", ShopperLocale = "fi-FI" }; // Send the request var service = new PaymentsService(client); var response = service.PaymentMethods(paymentMethodsRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.1.0 const { Client, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const paymentMethodsRequest = { amount: { currency: "EUR", value: 1000 }, paymentMethod: { type: "ebanking_FI" }, shopperLocale: "fi-FI", countryCode: "FI", reference: "YOUR_ORDER_NUMBER", returnUrl: "https://your-company.com/checkout?shopperOrder=12xy..", merchantAccount: "ADYEN_MERCHANT_ACCOUNT", shopperEmail: "s.hopper@@example.com" } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.2.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "EUR", Value: 1000, } paymentMethodsRequest := checkout.PaymentMethodsRequest{ Amount: &amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", CountryCode: common.PtrString("FI"), ShopperEmail: common.PtrString("s.hopper@@example.com"), ShopperLocale: common.PtrString("fi-FI"), } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentMethodsInput().IdempotencyKey("UUID").PaymentMethodsRequest(paymentMethodsRequest) res, httpRes, err := service.PaymentsApi.PaymentMethods(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "amount": { "currency": "EUR", "value": 1000 }, "paymentMethod": { "type": "ebanking_FI" }, "shopperLocale": "fi-FI", "countryCode": "FI", "reference": "YOUR_ORDER_NUMBER", "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "shopperEmail": "s.hopper@@example.com" } # Send the request result = adyen.checkout.payments_api.payment_methods(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.2.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :amount => { :currency => 'EUR', :value => 1000 }, :paymentMethod => { :type => 'ebanking_FI' }, :shopperLocale => 'fi-FI', :countryCode => 'FI', :reference => 'YOUR_ORDER_NUMBER', :returnUrl => 'https://your-company.com/checkout?shopperOrder=12xy..', :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :shopperEmail => 's.hopper@@example.com' } # Send the request result = adyen.checkout.payments_api.payment_methods(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.1.0 import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "EUR", value: 1000 }; const paymentMethodsRequest: Types.checkout.PaymentMethodsRequest = { amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "FI", shopperEmail: "s.hopper@@example.com", shopperLocale: "fi-FI" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { idempotencyKey: "UUID" }); ``` **Example response with Online banking Finland and available issuing banks** ```json { "paymentMethods": [ { "name": "Online banking Finland", "type": "ebanking_FI", "issuers": [ { "id": "osuuspankki", "name": "OP" }, { "id": "nordea", "name": "Nordea" }, { "id": "nordea-business", "name": "NordeaBusiness" }, { "id": "danske", "name": "Danske Bank" }, { "id": "spankki", "name": "S-Pankki" }, { "id": "pop", "name": "POP Pankki" }, { "id": "omasp", "name": "Oma Säästöpankki" }, { "id": "aktia", "name": "Aktia" }, { "id": "handelsbanken", "name": "Handelsbanken" }, { "id": "saastopankki", "name": "Säästöpankki" }, { "id": "alandsbanken", "name": "Ålandsbanken" } ] } ] } ``` ## Add additional parameters to your /payments request When you [make a payment](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#make-a-payment), add the following parameters: | Parameter | Required | Description | | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | [paymentMethod.type](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **ebanking\_FI** | | [paymentMethod.issuer](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod) | | The issuer ID of the shopper's selected bank. This is only relevant (and required) for the Issuer redirect flow. | | [shopperEmail](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperEmail) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The shopper's email address. | | [returnUrl](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-returnUrl) | | The URL to which the shopper should be redirected after completing the payment. Maximum length: 1024 characters. | **Example payment request for Online banking Finland** #### curl ```bash curl https://checkout-test.adyen.com/v72/payments \ -H 'x-API-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "amount":{ "currency":"EUR", "value":1000 }, "paymentMethod": { "type": "ebanking_FI" }, "shopperLocale": "fi-FI", "countryCode": "FI", "reference":"YOUR_ORDER_NUMBER", "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "shopperEmail": "s.hopper@@example.com" }' ``` #### Java ```java // Adyen Java API Library v41.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("EUR") .value(1000L); EBankingFinlandDetails eBankingFinlandDetails = new EBankingFinlandDetails() .type(EBankingFinlandDetails.TypeEnum.EBANKING_FI); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .countryCode("FI") .paymentMethod(new CheckoutPaymentMethod(eBankingFinlandDetails)) .shopperEmail("s.hopper@@example.com") .shopperLocale("fi-FI") .returnUrl("https://your-company.com/checkout?shopperOrder=12xy.."); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("ebanking_FI"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setCountryCode("FI") ->setPaymentMethod($checkoutPaymentMethod) ->setShopperEmail("s.hopper@@example.com") ->setShopperLocale("fi-FI") ->setReturnUrl("https://your-company.com/checkout?shopperOrder=12xy.."); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the LIVE environment, also include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "EUR", Value = 1000 }; EBankingFinlandDetails eBankingFinlandDetails = new EBankingFinlandDetails { Type = EBankingFinlandDetails.TypeEnum.EbankingFI }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", CountryCode = "FI", PaymentMethod = new CheckoutPaymentMethod(eBankingFinlandDetails), ShopperEmail = "s.hopper@@example.com", ShopperLocale = "fi-FI", ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." }; // Send the request var service = new PaymentsService(client); var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.1.0 const { Client, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const paymentRequest = { amount: { currency: "EUR", value: 1000 }, paymentMethod: { type: "ebanking_FI" }, shopperLocale: "fi-FI", countryCode: "FI", reference: "YOUR_ORDER_NUMBER", returnUrl: "https://your-company.com/checkout?shopperOrder=12xy..", merchantAccount: "ADYEN_MERCHANT_ACCOUNT", shopperEmail: "s.hopper@@example.com" } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.2.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "EUR", Value: 1000, } eBankingFinlandDetails := checkout.EBankingFinlandDetails{ Type: "ebanking_FI", } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", CountryCode: common.PtrString("FI"), PaymentMethod: checkout.EBankingFinlandDetailsAsCheckoutPaymentMethod(&eBankingFinlandDetails), ShopperEmail: common.PtrString("s.hopper@@example.com"), ShopperLocale: common.PtrString("fi-FI"), ReturnUrl: "https://your-company.com/checkout?shopperOrder=12xy..", } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "amount": { "currency": "EUR", "value": 1000 }, "paymentMethod": { "type": "ebanking_FI" }, "shopperLocale": "fi-FI", "countryCode": "FI", "reference": "YOUR_ORDER_NUMBER", "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "shopperEmail": "s.hopper@@example.com" } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.2.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :amount => { :currency => 'EUR', :value => 1000 }, :paymentMethod => { :type => 'ebanking_FI' }, :shopperLocale => 'fi-FI', :countryCode => 'FI', :reference => 'YOUR_ORDER_NUMBER', :returnUrl => 'https://your-company.com/checkout?shopperOrder=12xy..', :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :shopperEmail => 's.hopper@@example.com' } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.1.0 import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "EUR", value: 1000 }; const eBankingFinlandDetails: Types.checkout.EBankingFinlandDetails = { type: Types.checkout.EBankingFinlandDetails.TypeEnum.EbankingFi }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "FI", paymentMethod: eBankingFinlandDetails, shopperEmail: "s.hopper@@example.com", shopperLocale: "fi-FI", returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` **Example payment request for Online banking Finland and an issuing bank** #### curl ```bash curl https://checkout-test.adyen.com/v72/payments \ -H 'x-API-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "amount":{ "currency":"EUR", "value":1000 }, "paymentMethod": { "type": "ebanking_FI", "issuer": "osuuspankki" }, "shopperLocale": "fi-FI", "countryCode": "FI", "reference":"YOUR_ORDER_NUMBER", "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "shopperEmail": "s.hopper@@example.com" }' ``` #### Java ```java // Adyen Java API Library v41.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("EUR") .value(1000L); EBankingFinlandDetails eBankingFinlandDetails = new EBankingFinlandDetails() .type(EBankingFinlandDetails.TypeEnum.EBANKING_FI) .issuer("osuuspankki"); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .countryCode("FI") .paymentMethod(new CheckoutPaymentMethod(eBankingFinlandDetails)) .shopperEmail("s.hopper@@example.com") .shopperLocale("fi-FI") .returnUrl("https://your-company.com/checkout?shopperOrder=12xy.."); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(1000); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("ebanking_FI") ->setIssuer("osuuspankki"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setCountryCode("FI") ->setPaymentMethod($checkoutPaymentMethod) ->setShopperEmail("s.hopper@@example.com") ->setShopperLocale("fi-FI") ->setReturnUrl("https://your-company.com/checkout?shopperOrder=12xy.."); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the LIVE environment, also include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "EUR", Value = 1000 }; EBankingFinlandDetails eBankingFinlandDetails = new EBankingFinlandDetails { Type = EBankingFinlandDetails.TypeEnum.EbankingFI, Issuer = "osuuspankki" }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", CountryCode = "FI", PaymentMethod = new CheckoutPaymentMethod(eBankingFinlandDetails), ShopperEmail = "s.hopper@@example.com", ShopperLocale = "fi-FI", ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." }; // Send the request var service = new PaymentsService(client); var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.1.0 const { Client, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const paymentRequest = { amount: { currency: "EUR", value: 1000 }, paymentMethod: { type: "ebanking_FI", issuer: "osuuspankki" }, shopperLocale: "fi-FI", countryCode: "FI", reference: "YOUR_ORDER_NUMBER", returnUrl: "https://your-company.com/checkout?shopperOrder=12xy..", merchantAccount: "ADYEN_MERCHANT_ACCOUNT", shopperEmail: "s.hopper@@example.com" } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.2.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "EUR", Value: 1000, } eBankingFinlandDetails := checkout.EBankingFinlandDetails{ Type: "ebanking_FI", Issuer: common.PtrString("osuuspankki"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", CountryCode: common.PtrString("FI"), PaymentMethod: checkout.EBankingFinlandDetailsAsCheckoutPaymentMethod(&eBankingFinlandDetails), ShopperEmail: common.PtrString("s.hopper@@example.com"), ShopperLocale: common.PtrString("fi-FI"), ReturnUrl: "https://your-company.com/checkout?shopperOrder=12xy..", } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "amount": { "currency": "EUR", "value": 1000 }, "paymentMethod": { "type": "ebanking_FI", "issuer": "osuuspankki" }, "shopperLocale": "fi-FI", "countryCode": "FI", "reference": "YOUR_ORDER_NUMBER", "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy..", "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "shopperEmail": "s.hopper@@example.com" } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.2.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :amount => { :currency => 'EUR', :value => 1000 }, :paymentMethod => { :type => 'ebanking_FI', :issuer => 'osuuspankki' }, :shopperLocale => 'fi-FI', :countryCode => 'FI', :reference => 'YOUR_ORDER_NUMBER', :returnUrl => 'https://your-company.com/checkout?shopperOrder=12xy..', :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :shopperEmail => 's.hopper@@example.com' } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.1.0 import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "EUR", value: 1000 }; const eBankingFinlandDetails: Types.checkout.EBankingFinlandDetails = { type: Types.checkout.EBankingFinlandDetails.TypeEnum.EbankingFi, issuer: "osuuspankki" }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "FI", paymentMethod: eBankingFinlandDetails, shopperEmail: "s.hopper@@example.com", shopperLocale: "fi-FI", returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` The response includes the `action.type`: **redirect**. **Example response with an additional action** ```json { "resultCode":"RedirectShopper", "action":{ "paymentMethodType":"ebanking_FI", "method":"GET", "url":"https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=...", "type":"redirect" } } ``` ## Handle the redirect 1. To complete the payment, redirect the shopper to the `action.url` returned in the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response, taking into account the following recommendations: * **When using the HTTP GET method:**\ For security reasons, when showing the redirect in the app, we recommend that you use [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) for iOS or [Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) for Android, instead of WebView objects. Also refer to the [security best practices](https://developer.android.com/topic/security/best-practices#webview) for WebView. * **Redirection for mobile integrations:**\ For mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling. 2. After the shopper is redirected back to your website, check the payment result by making a POST [/payments/details](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details) request, specifying: * `details`: object that contains the URL-decoded `redirectResult` returned when the shopper was redirected back to your site. **/payments/details request** ```bash curl https://checkout-test.adyen.com/v72/payments/details \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "details": { "redirectResult": "eyJ0cmFuc1N0YXR1cyI6IlkifQ==" } }' ``` 3. In the response note the following: * `resultCode`: use this to present the result to your shopper. * `pspReference`: our unique identifier for the transaction. **/payments/details response** ```json { "resultCode": "Authorised", "pspReference": "V4HZ4RBFJGXXGN82" } ``` ## Present the payment result Use the  [resultCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details#responses-200-resultCode) that you received in the [/payments/details](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/details) response to present the payment result to your shopper. The `resultCode` values you can receive for Online banking Finland are: | resultCode | Description | Action to take | | --------------------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Authorised** | The payment was successful. | Inform the shopper that the payment has been successful. You will receive the funds in 3 days. | | **Cancelled** | The shopper canceled the payment while they were on the Online banking Finland-hosted payment page. | Ask the shopper whether they want to continue with the order, or ask them to select a different payment method. | | **Error** | There was an error when the payment was being processed. | Inform the shopper that there was an error processing their payment. The response contains a `refusalReason`, indicating the cause of the error. | | **Pending** or **Received** | The shopper has completed the payment but the final result is not yet known. | Inform the shopper that you have received their order, and are waiting for the payment to be completed. To know the final result of the payment, wait for the [AUTHORISATION webhook](/development-resources/webhooks/webhook-types). | | **Refused** | The payment was refused by the shopper's bank. | Ask the shopper to try the payment again using a different payment method. | []()If the shopper failed to return to your website or app, wait for webhooks to know the outcome of the payment. The webhooks you can receive for Online banking Finland are: | eventCode | success field | Description | Action to take | | ----------------- | ------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------- | | **AUTHORISATION** | **false** | The transaction failed. | Cancel the order and inform the shopper that the payment failed. | | **AUTHORISATION** | **true** | The shopper successfully completed the payment. | Inform the shopper that the payment has been successful and proceed with the order. | | **OFFER\_CLOSED** | **true** | The shopper did not complete the payment. | Cancel the order and inform the shopper that the payment timed out. | ## Test and go live Before accepting live payments, test your integration using the [test environment and sample data provided by Paytrail](https://support.paytrail.com/hc/en-us/articles/4950093122065--Test-credentials-for-Paytrail-s-service). Testing multiple partial refunds is currently not available. ## See also * [API-only integration guide](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only)