--- title: "IRIS for API only" description: "Add IRIS to your API-only integration." url: "https://docs.adyen.com/payment-methods/iris/api-only" source_url: "https://docs.adyen.com/payment-methods/iris/api-only.md" canonical: "https://docs.adyen.com/payment-methods/iris/api-only" last_modified: "2026-05-22T12:56:54+02:00" language: "en" --- # IRIS for API only Add IRIS to your API-only integration. [View source](/payment-methods/iris/api-only.md) You can add IRIS to your existing integration. The following instructions show only what you must add to your integration specifically for IRIS. 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). | | | **Action handling** | Make sure that your existing integration is set up to [handle the additional action](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#additional-action). `action.type`: **redirect** and **qrCode**. | | | **Setup steps** | - Before you begin, [add IRIS in your Customer Area](/payment-methods/add-payment-methods). - Before you can go live, [request the IRIS payment method](/payment-methods/iris#onboarding) from your Greek bank, and from Adyen, by submitting your DIAS code, as well as the merchant account and the associated stores you want to have it activated on. | | ## How it works 1. The shopper selects IRIS as the payment method. 2. Then, there are two flows possible: * Issuer-redirect: A list of issuers is shown, and the shopper selects their issuing bank. The shopper is then redirected to the issuing bank and completes the payment. The shopper is then redirected back to your page. * Issuer-redirect flow is applicable to Mobile and Desktop checkout scenarios * QR-code: a QR code is shown, which the shopper scans with the issuer app. The shopper completes the payment in the app on their device. You will be notified of the payment result. * QR code flow is intended for Desktop only; on mobile this flow is not recommended, because often the app used for scanning the QR code resides on the same device. 3. You complete the order. ## Build your payment form Include fields to collect important information from your shopper in the payment form. For the Issuer-redirect flow you need to show a list of issuing banks. The list of issuing banks is included in the [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) response. The list may include the following banks: | Bank name | Issuer ID | | ----------------------- | --------- | | Piraeus Bank | PIRBGRAA | | Eurobank | ERBKGRAA | | National Bank of Greece | ETHNGRAA | | Alpha Bank | CRBAGRAA | | Viva | PRXBGRAA | | CrediaBank | ATTIGRAA | You can [download the logo for IRIS](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%2Bonly\&version=71#downloading-logos) to use in your form. We also provide logos for the issuing banks, which you can use on your payment form. For more information, refer to [downloading logos](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%2Bonly\&version=71#downloading-logos). ## Get IRIS 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 IRIS is included in the response. | Parameter | Values | | ------------------------------------------------------------------------------------------------------------------ | ------- | | [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-countryCode) | **GR** | | [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount-currency) | **EUR** | **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 '{ "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "countryCode": "GR", "amount": { "currency": "EUR", "value": 1000 } }' ``` #### Java ```java // Adyen Java API Library v40.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("GR"); // 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("GR"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->paymentMethods($paymentMethodsRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v32.2.1 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 = "GR" }; // 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.0.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 = { merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "GR", amount: { currency: "EUR", value: 1000 } } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.1.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("GR"), } // 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 = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "countryCode": "GR", "amount": { "currency": "EUR", "value": 1000 } } # Send the request result = adyen.checkout.payments_api.payment_methods(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.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 = { :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :countryCode => 'GR', :amount => { :currency => 'EUR', :value => 1000 } } # Send the request result = adyen.checkout.payments_api.payment_methods(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.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: "GR" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { idempotencyKey: "UUID" }); ``` The [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) response contains `paymentMethod.type`: **iris**, as well as the list of issuer banks. **Example response** ```json { "paymentMethods": [ { "issuers": [ { "id": "PIRBGRAA", "name": "Piraeus Bank" }, { "id": "ERBKGRAA", "name": "Eurobank" }, { "id": "ETHNGRAA", "name": "National Bank of Greece" }, { "id": "CRBAGRAA", "name": "Alpha Bank" }, { "id": "PRXBGRAA", "name": "Viva" }, { "id": "ATTIGRAA", "name": "CrediaBank" } ], "name": "IRIS", "type": "iris" } ] } ``` ## 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-") | **iris** | | [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. Required only for Issuer-redirect flow. Not required for QR code flow. | | [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. If the issuer ID is included, the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response will contain the redirect URL. If the issuer ID is not included, the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response will contain the QR code data. | ### Issuer-redirect flow The following example shows how to make a payment request for 10 EUR, requesting the redirect flow. **Example /payments request for IRIS using redirect flow** #### 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 '{ "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "reference":"YOUR_ORDER_NUMBER", "amount":{ "currency":"EUR", "value":1000 }, "paymentMethod":{ "type":"iris", "issuer": "PIRBGRAA" }, "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy.." }' ``` #### Java ```java // Adyen Java API Library v40.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); PaymentDetails paymentDetails = new PaymentDetails() .type(PaymentDetails.TypeEnum.IRIS); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .paymentMethod(new CheckoutPaymentMethod(paymentDetails)) .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("iris"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setPaymentMethod($checkoutPaymentMethod) ->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 v32.2.1 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 }; PaymentDetails paymentDetails = new PaymentDetails { Type = PaymentDetails.TypeEnum.Iris }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", PaymentMethod = new CheckoutPaymentMethod(paymentDetails), 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.0.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 = { merchantAccount: "ADYEN_MERCHANT_ACCOUNT", reference: "YOUR_ORDER_NUMBER", amount: { currency: "EUR", value: 1000 }, paymentMethod: { type: "iris", issuer: "PIRBGRAA" }, returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.1.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, } paymentDetails := checkout.PaymentDetails{ Type: common.PtrString("iris"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", PaymentMethod: checkout.PaymentDetailsAsCheckoutPaymentMethod(&paymentDetails), 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 = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "amount": { "currency": "EUR", "value": 1000 }, "paymentMethod": { "type": "iris", "issuer": "PIRBGRAA" }, "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.." } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.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 = { :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :reference => 'YOUR_ORDER_NUMBER', :amount => { :currency => 'EUR', :value => 1000 }, :paymentMethod => { :type => 'iris', :issuer => 'PIRBGRAA' }, :returnUrl => 'https://your-company.com/checkout?shopperOrder=12xy..' } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.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 paymentDetails: Types.checkout.PaymentDetails = { type: Types.checkout.PaymentDetails.TypeEnum.Iris }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", paymentMethod: paymentDetails, returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` In the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response, note the `action` object. This contains the information needed to redirect the shopper. **Example response** ```json { "resultCode":"RedirectShopper", "action":{ "paymentMethodType":"iris", "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 the following recommendations into consideration: * 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. **Example /payments/details** #### curl ```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==" } }' ``` #### Java ```java // Adyen Java API Library v40.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) PaymentCompletionDetails paymentCompletionDetails = new PaymentCompletionDetails() .redirectResult("eyJ0cmFuc1N0YXR1cyI6IlkifQ=="); PaymentDetailsRequest paymentDetailsRequest = new PaymentDetailsRequest() .details(paymentCompletionDetails); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentDetailsResponse response = service.paymentsDetails(paymentDetailsRequest, 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) $paymentCompletionDetails = new PaymentCompletionDetails(); $paymentCompletionDetails ->setRedirectResult("eyJ0cmFuc1N0YXR1cyI6IlkifQ=="); $paymentDetailsRequest = new PaymentDetailsRequest(); $paymentDetailsRequest ->setDetails($paymentCompletionDetails); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->paymentsDetails($paymentDetailsRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v32.2.1 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) PaymentCompletionDetails paymentCompletionDetails = new PaymentCompletionDetails { RedirectResult = "eyJ0cmFuc1N0YXR1cyI6IlkifQ==" }; PaymentDetailsRequest paymentDetailsRequest = new PaymentDetailsRequest { Details = paymentCompletionDetails }; // Send the request var service = new PaymentsService(client); var response = service.PaymentsDetails(paymentDetailsRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.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 paymentDetailsRequest = { details: { redirectResult: "eyJ0cmFuc1N0YXR1cyI6IlkifQ==" } } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.paymentsDetails(paymentDetailsRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.1.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) paymentCompletionDetails := checkout.PaymentCompletionDetails{ RedirectResult: common.PtrString("eyJ0cmFuc1N0YXR1cyI6IlkifQ=="), } paymentDetailsRequest := checkout.PaymentDetailsRequest{ Details: paymentCompletionDetails, } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsDetailsInput().IdempotencyKey("UUID").PaymentDetailsRequest(paymentDetailsRequest) res, httpRes, err := service.PaymentsApi.PaymentsDetails(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 = { "details": { "redirectResult": "eyJ0cmFuc1N0YXR1cyI6IlkifQ==" } } # Send the request result = adyen.checkout.payments_api.payments_details(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.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 = { :details => { :redirectResult => 'eyJ0cmFuc1N0YXR1cyI6IlkifQ==' } } # Send the request result = adyen.checkout.payments_api.payments_details(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.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 paymentCompletionDetails: Types.checkout.PaymentCompletionDetails = { redirectResult: "eyJ0cmFuc1N0YXR1cyI6IlkifQ==" }; const paymentDetailsRequest: Types.checkout.PaymentDetailsRequest = { details: paymentCompletionDetails }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.paymentsDetails(paymentDetailsRequest, { idempotencyKey: "UUID" }); ``` In the response note the following: * `resultCode`: use this to present the result to your shopper. * `pspReference`: our unique identifier for the transaction. **Example /payments/details response** ```json { "resultCode": "Authorised", "pspReference": "V4HZ4RBFJGXXGN82" } ``` ### QR code flow The following example shows how to make a payment request for 10 EUR, requesting the QR code flow. **Example /payments request for IRIS using QR code flow** #### 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 '{ "merchantAccount":"ADYEN_MERCHANT_ACCOUNT", "reference":"YOUR_ORDER_NUMBER", "amount":{ "currency":"EUR", "value":1000 }, "paymentMethod":{ "type":"iris" }, "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy.." }' ``` #### Java ```java // Adyen Java API Library v40.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); PaymentDetails paymentDetails = new PaymentDetails() .type(PaymentDetails.TypeEnum.IRIS); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_ORDER_NUMBER") .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .paymentMethod(new CheckoutPaymentMethod(paymentDetails)) .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("iris"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setPaymentMethod($checkoutPaymentMethod) ->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 v32.2.1 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 }; PaymentDetails paymentDetails = new PaymentDetails { Type = PaymentDetails.TypeEnum.Iris }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", PaymentMethod = new CheckoutPaymentMethod(paymentDetails), 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.0.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 = { merchantAccount: "ADYEN_MERCHANT_ACCOUNT", reference: "YOUR_ORDER_NUMBER", amount: { currency: "EUR", value: 1000 }, paymentMethod: { type: "iris" }, returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.1.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, } paymentDetails := checkout.PaymentDetails{ Type: common.PtrString("iris"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_ORDER_NUMBER", Amount: amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", PaymentMethod: checkout.PaymentDetailsAsCheckoutPaymentMethod(&paymentDetails), 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 = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "amount": { "currency": "EUR", "value": 1000 }, "paymentMethod": { "type": "iris" }, "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.." } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.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 = { :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :reference => 'YOUR_ORDER_NUMBER', :amount => { :currency => 'EUR', :value => 1000 }, :paymentMethod => { :type => 'iris' }, :returnUrl => 'https://your-company.com/checkout?shopperOrder=12xy..' } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.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 paymentDetails: Types.checkout.PaymentDetails = { type: Types.checkout.PaymentDetails.TypeEnum.Iris }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_ORDER_NUMBER", amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", paymentMethod: paymentDetails, returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` In the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response, note the `action` object. This contains the information needed to generate the QR code. **Example response** ```json { "pspReference": "BCMSN9N347C68775", "resultCode":"Pending", "action":{ "paymentData": "Ab02b4c0!BQABAgCpM2q6...==", "paymentMethodType":"iris", "method":"GET", "qrCodeData":"IRISCOMf1443214-1cec-4ffa-8378-5a1d6a60cfef", "type":"qrCode" } } ``` After initiating the payment, the shopper has 10 minutes to complete the transaction. We recommend that you show this timer to the shopper. #### Present the QR code Follow these steps to render the QR code on your checkout page: 1. Use the `qrCodeData` from the `action` object to render the QR code on your checkout page. 2. After the shopper scans the QR code and completes the payment, we send a webhook informing you of the payment result. 3. Present the payment result to your shopper. ## Present the payment result Use the `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, or wait for a webhook to know the outcome of the payment. The `resultCode` values you can receive for IRIS payments are: | resultCode | Description | Action to take | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Authorised | The shopper completed their payment, and it has been sent to the bank for processing. In most cases, this means that you will receive the funds. | Inform the shopper that the payment has been successful. | | Cancelled | The shopper cancelled the payment while on their bank's website. | 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. You will receive the final result of the payment in an [AUTHORISATION webhook](https://docs.adyen.com/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. | The [webhooks](https://docs.adyen.com/development-resources/webhooks/webhook-types) you can receive for IRIS 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. | In the QR code flow, you have to wait for [webhooks](https://docs.adyen.com/development-resources/webhooks/webhook-types) to know the outcome of the payment. This also applies to the Issuer redirect flow, if the shopper failed to return to your website or app. ## Test and go live Before you accept live payments, test your integration using Adyen’s IRIS simulator. In this simulator, the payment outcome (**Successful**, **Refused**, or **Cancelled**) can be selected on an Adyen-hosted page. This page will load depending on the IRIS flow: * Issuer redirect flow: the page URL is in the redirect link in Adyen’s /payments response. * QR code (Ecommerce and In-person Payments): the page URL is encoded in the QR code, which can be opened with any smartphone camera. Check the status of IRIS test payments in your [Customer Area](https://ca-test.adyen.com/) > **Transactions** > **Payments**. Before you go live, go through the onboarding steps with your Greek bank, and enable IRIS payment method for your live merchant account on [Customer Area](https://ca-live.adyen.com/). ## See also * [API-only integration guide](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only)