Accept open banking payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.
Before you begin
These instructions explain how to add open banking to your existing API-only integration. The API-only integration works the same way for all payment methods. If you haven't done this integration yet, refer to our API-only integration guide.
This page assumes you've already:
- Make sure that you have set up your back end implementation.
- Contact our Support Team to add open banking in your test Customer Area..
Build your payment form for open banking
To show open banking in your payment form, you need to:
- Show a list of available banks to your shopper.
- After the shopper selects a bank, pass the corresponding issuer ID to your server. You'll need this to make a payment.
List of issuer IDs
The available banks for open banking are different in the test and live environment:
Bank name | Issuer ID |
---|---|
Demo Open Banking Redirect (Temporary Error) | uk-test-open-banking-redirect-temporary-error |
Demo Open Banking Redirect (failing - cancelled) | uk-test-open-banking-redirect-cancelled |
Demo Open Banking Redirect (failing - failed) | uk-test-open-banking-redirect-failed |
Demo Open Banking Redirect (no accounts returned) | uk-test-open-banking-redirect-no-accounts-returned |
Demo Open Banking Redirect (payment cancelled) | uk-test-open-banking-redirect-payment-cancelled |
Demo Open Banking Redirect (payment failed) | uk-test-open-banking-redirect-payment-failed |
Demo Open Banking Redirect (payment successful) | uk-test-open-banking-redirect |
Demo Open Banking Redirect - configurable session expiry | uk-test-open-banking-redirect-configurable-session-expiry |
Demo Open Banking Redirect - Business | uk-test-open-banking-business-redirect |
Tink Demo Bank | uk-demobank-open-banking-decoupled |
Tink Demo Bank | uk-demobank-open-banking-embedded |
Tink Demo Bank | uk-demobank-open-banking-handoff |
Tink Demo Bank | uk-demobank-open-banking-handoff-starling |
Tink Demo Bank | uk-demobank-open-banking-redirect |
Tink Demo Bank | uk-demobank-open-banking-uk-demobank-open-banking-redirect-aispis |
Tink Demo Bank | uk-demobank-open-banking-embedded-extendable |
Tink Demo Bank - Business | uk-demobank-open-banking-embedded-extendable |
We provide logos for open banking and the issuing banks, which you can use on your payment form. For more information, refer to Downloading logos.
You can also get the issuer list from the /paymentMethods response, as explained in the API-only integration guide.
In your /paymentMethods request, specify:
- countryCode: GB
- amount.currency: GBP
- amount.value: The value of the payment.
The list of issuing banks are included in the object with type
: paybybank.
Make a payment
In your /payments request, specify:
paymentMethod.type
: paybybankpaymentMethod.issuer
: The issuer ID of the shopper's selected bank.- returnUrl: The URL where the shopper will be redirected back to after they complete the payment. This URL can have a maximum of 1024 characters.
curl https://checkout-test.adyen.com/v69/payments \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
"merchantAccount":"YOUR_MERCHANT_ACCOUNT",
"reference":"YOUR_ORDER_NUMBER",
"amount":{
"currency":"GBP",
"value":1000
},
"paymentMethod":{
"type":"paybybank",
"issuer":"uk-test-open-banking-redirect"
},
"returnUrl":"https://your-company.com/checkout?shopperOrder=12xy.."
}'
require 'adyen-ruby-api-library'
# Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen::Client.new
adyen.env = :test
adyen.api_key = "YOUR_X-API-KEY"
response = adyen.checkout.payments({
:countryCode => "GB",
:paymentMethod => {
:type => "paybybank",
:issuer => "uk-test-open-banking-redirect",
},
:amount => {
:currency => "GBP",
:value => 1000
},
:reference => "YOUR_ORDER_NUMBER",
:shopperLocale => "en-GB",
:shopperEmail => "s.hopper@example.com",
:shopperReference => "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
:returnUrl => "https://your-company.com/checkout?shopperOrder=12xy..",
:merchantAccount => "YOUR_MERCHANT_ACCOUNT"
})
# Check if further action is needed.
if response.body.has_key(:action)
# Pass the action object to your front end
# response.body[:action]
else
# No further action needed, pass the resultCode object to your front end
# response.body[:resultCode]
end
// Set your X-API-KEY with the API key from the Customer Area.
$client = new \Adyen\Client();
$client->setEnvironment(\Adyen\Environment::TEST);
$client->setXApiKey("YOUR_X-API-KEY");
$service = new \Adyen\Service\Checkout($client);
$params = array(
"countryCode" => "GB",
"paymentMethod" => [
"type" => "paybybank",
"issuer" => "uk-test-open-banking-redirect",
],
"amount" => array(
"currency" => "GBP",
"value" => 1000
),
"reference" => "YOUR_ORDER_NUMBER",
"shopperLocale" => "en-GB",
"shopperEmail" => "s.hopper@example.com",
"shopperReference" => "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"returnUrl" => "https://your-company.com/checkout?shopperOrder=12xy..",
"merchantAccount" => "YOUR_MERCHANT_ACCOUNT"
);
$result = $service->payments($params);
// Check if further action is needed
if (array_key_exists("action", $result)){
// Pass the action object to your front end
// $result["action"]
}
else {
// No further action needed, pass the resultCode to your front end
// $result['resultCode']
}
# Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen.Adyen()
adyen.payment.client.platform = "test"
adyen.client.xapikey = 'YOUR_X-API-KEY'
result = adyen.checkout.payments({
"countryCode": "GB",
"paymentMethod": {
"type": "paybybank",
"issuer": "uk-test-open-banking-redirect",
},
"amount": {
"value": 1000,
"currency": "GBP"
},
"reference": "YOUR_ORDER_NUMBER",
"shopperLocale": "en-GB",
"shopperEmail": "s.hopper@example.com",
"shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy..",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
})
# Check if further action is needed
if 'action' in result.message:
# Pass the action object to your front end# result.message['action']
pass
else:
# No further action needed, pass the resultCode to your front end
# result.message['resultCode']
pass
const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
const config = new Config();
// Set your X-API-KEY with the API key from the Customer Area.
config.apiKey = '[YOUR_X-API-KEY]';
config.merchantAccount = 'YOUR_MERCHANT_ACCOUNT';
const client = new Client({ config });
client.setEnvironment("TEST");
const checkout = new CheckoutAPI(client);
checkout.payments({
merchantAccount: config.merchantAccount,
countryCode: "GB",
paymentMethod: {
type: "paybybank",
issuer: "uk-test-open-banking-redirect",
},
amount: { currency: "GBP", value: 1000, },
reference: "YOUR_ORDER_NUMBER",
shopperLocale: "en-GB",
shopperEmail: "s.hopper@example.com",
shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
returnUrl: "https://your-company.com/checkout?shopperOrder=12xy..",
}).then(res => res);
The /payments response contains an action
object with the information needed to redirect the shopper.
Handle the redirect
- To complete the payment, redirect the shopper to the
action.url
returned in the /payments response.
When using the HTTP GET method:
For security reasons, when displaying the redirect in the app, we recommend that you use SFSafariViewController for iOS or Chrome Custom Tabs for Android, instead of WebView objects. Also refer to the security best practices for WebView.
-
After the shopper is redirected back to your website, check the payment result by making a POST /payments/details request, specifying:
details
: Object that contains the URL-decodedredirectResult
returned when the shopper was redirected back to your site.
You receive a response containing:
resultCode
: Use this to present the result to your shopper.-
pspReference
: Our unique identifier for the transaction.
Present the payment result
Use the resultCode that you received in the /payments/details response to present the payment result to your shopper.
The resultCode
values you can receive for open banking 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 2-3 days. |
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. It may take minutes or hours to confirm this. | Inform the shopper that you've 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. If the transaction is not authorised within 30 minutes, the offer will close. Optionally, you can be informed of this through an OFFER_CLOSED webhook. |
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 closed the browser and failed to return to your website, wait for webhooks to know the outcome of the payment:
eventCode | success field | Description | Action to take |
---|---|---|---|
AUTHORISATION | false | The payment 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. |
Test and go live
We provide different test issuers for testing open banking payments, including testing for failed or cancelled payments. Select the corresponding test issuer name, for example Demo Open Banking Redirect (payment cancelled), to simulate a cancelled payment scenario.
We recommend that you test each scenario before you go live.
Check the status of test payments in your Customer Area > Transactions > Payments.
Before you can accept live open banking payments, contact our Support Team to add open banking in your test Customer Area.