- There is no CVC. For co-badged cards, the CVC field can still appear.
- 3D Secure authentication is mandatory.
- Separate captures are not supported.
Requirements
Select the server-side flow that your integration uses:- Sessions flow
- Advanced flow
| Requirement | Description |
|---|---|
| Integration type | Make sure that you have built a Sessions flow Web Components integration. |
| Setup steps | Before you begin, add Bancontact card in your Customer Area. |
| Requirement | Description |
|---|---|
| Integration type | Make sure that you have built an Advanced flow Web Components integration. |
| Setup steps | Before you begin, add Bancontact card in your Customer Area. |
Import resources for v6
If you are using Web Components v6, import the Component that you need for Bancontact card:import { AdyenCheckout, Bancontact } from '@adyen/adyen-web'
API reference
You do not need to send additional fields for Bancontact card. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:- /sessions: This is the default with Components v5.0.0 or later.
- /payments: If you implemented an additional use case.
Component configuration
Step 1: Create a DOM element
Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered: <div id="bcmc-container"></div>
Step 2: Create an instance of the Component
v6.0.0 or later
Create an instance of the Component, passing:- Your instance of
AdyenCheckout.
const bcmc = new Bancontact(checkout).mount('#bcmc-container');
v5.x.x or earlier
Use thecreate method of your AdyenCheckout instance, in this case checkout, to create the Component:const bcmcComponent = checkout.create('bcmc').mount('#bcmc-container');
Optional configuration
If you want to add optional configuration, include this in a configuration object.| Parameter name | Description | Default |
|---|---|---|
enableStoreDetails | Set to true to show the checkbox for saving the card details for recurring payments. | false |
hasHolderName | Set to true to show the input field for the cardholder name. | false |
holderNameRequired | Set to true to make the cardholder name a required field. To show the field, you also need to set hasHolderName to true. | false |
holderName | String that is used to prefill the cardholder name field. | Empty |
positionHolderNameOnTop Added in v4.2.0 | Renders the cardholder name field at the top of the payment form. | false |
name | String that is used to display the payment method name to the shopper. | Depends on the shopperLocale specified in /paymentMethods request. |
styles | Set a style object to customize the card input fields. For a list of supported properties, refer to Styling card input fields. | |
minimumExpiryDate | v 4.3.0If a shopper enters a date that is earlier than specified here, they will see the following error: “Your card expires before check out date.” Format: mm/yy | |
brands | Array of card brands that will be recognized. | ['bcmc','maestro','visa'] |
brandsConfiguration Added in v4.5.0 | Object where you can customize the icons for different brands. For example, to customize the icon for Visa, include inside the brandsConfiguration: visa: { icon: 'https://...' } | |
showBrandIcon | Set to false to not show the brand logo when the card brand has been recognized. | true |
showBrandsUnderCardNumber Added in v5.12.0 | Shows brand logos under the card number field when the shopper selects the card payment method. | true |
billingAddressRequired Added in v3.5.0 | Set to true to collect the shopper’s billing address. | false |
billingAddressAllowedCountries | Specify allowed country codes for the billing address. For example, ['US', 'CA', 'BR']. | The Country field dropdown menu shows a list of all countries/regions. |
data | Object that contains placeholder information that you can use to prefill fields. For example: - holderName: Placeholder for the cardholder name field. - billingAddress: Object that contains placeholder information for the billing address such as street, postalCode, city, country, and stateOrProvince. | Empty |
autoFocus | Automatically move the focus to the date field when the entered card number reaches the expected length. Added in v5.8.0: the focus also moves to the date field when the entered card number reaches the expected length. | true |
SRConfig | Object for configuring screen reader behavior. Does not affect what gets rendered in the checkout form. | |
SRConfig.collateErrors | Indicates if all errors in the form are read out after each validation. For example, if there is an error in the card number field, the error is read out after validating each of the other fields, until the error is fixed. | true |
SRConfig.moveFocus | Indicates if focus automatically switches to the first field with an error when the shopper selects the Pay button. Can only be set if SRConfig.collateErrors is true. | false |
const bcmcConfiguration = {
hasHolderName: true,
holderNameRequired: true,
enableStoreDetails: true,
name: 'Bancontact card'
};
v6.0.0 or later
Create an instance of the Component, passing:- Your instance of
AdyenCheckout. - The payment method-specific configuration.
const bcmcComponent = new Bancontact(checkout, bcmcConfiguration).mount('#bcmc-container');
v5.x.x or earlier
Use thecreate method of your AdyenCheckout instance, in this case checkout, to create an instance of the Component. Add the configuration object if you created one.const bcmcComponent = checkout.create('bcmc', bcmcConfiguration).mount('#bcmc-container');
Include Bancontact card in the list of other cards
You can add Bancontact card to the list of other cards when creating a configuration object for the Cards Web Component. To do so, include bcmc in thebrands array:const cardConfiguration = {
hasHolderName: true,
holderNameRequired: true,
billingAddressRequired: true, // Set to true to show the billing address input fields.
enableStoreDetails: true,
brands: ['mc','visa','amex', 'bcmc']
};
Recurring
Bancontact supports tokenization for recurring payments.We strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring payments.You can use recurring transactions through the Bancontact Wallet Initiated Program (WIP).Bancontact Wallet Initiated Program
The Bancontact Wallet Initiated Program (WIP) is a service that streamlines checkout and supports subscription-based billing. It offers the following:- Bancontact One-Click Pay to speed up checkout and boost conversion rates
- Bancontact Recurring to support merchant-initiated recurring or subscription payments
Make a recurring payment
To make recurring payments, you need to:To test recurring payments, contact our Support Team to configure your test environment.Create a token
To create a token, include in your /sessions or /payments request:storePaymentMethod: true- shopperReference: Your unique identifier for the shopper (minimum length three characters).
type: recurring.token.createdshopperReference: your unique identifier for the shopper.eventId: ThepspReferenceof the initial payment.storedPaymentMethodId: This is the token that you need to make recurring payments for this shopper.
Make a payment with a token
To make a payment with the token, include in your /payments request:paymentMethod.storedPaymentMethodId: ThestoredPaymentMethodIdfrom the recurring.token.created webhook. You can also get this value by using the /listRecurringDetails endpoint.shopperReference: The unique shopper identifier that you specified when creating the token.shopperInteraction: ContAuth.recurringProcessingModel: Subscription or UnscheduledCardOnFile.
shopperInteraction and recurringProcessingModel fields, refer to Tokenization.The following example shows a recurring Subscription payment using WIP.curl https://checkout-test.adyen.com/v72/payments \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-d '{
"amount":{
"value":1000,
"currency":"EUR"
},
"paymentMethod":{
"type":"bcmc",
"storedPaymentMethodId":"7219687191761347"
},
"reference":"YOUR_ORDER_NUMBER",
"merchantAccount":"YOUR_MERCHANT_ACCOUNT",
"shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"shopperInteraction":"ContAuth",
"recurringProcessingModel": "Subscription"
}'
// Adyen Java API Library v39.3.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);
CardDetails cardDetails = new CardDetails()
.storedPaymentMethodId("7219687191761347")
.type(CardDetails.TypeEnum.BCMC);
PaymentRequest paymentRequest = new PaymentRequest()
.reference("YOUR_ORDER_NUMBER")
.amount(amount)
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
.recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.SUBSCRIPTION)
.paymentMethod(new CheckoutPaymentMethod(cardDetails))
.shopperInteraction(PaymentRequest.ShopperInteractionEnum.CONTAUTH)
.shopperReference("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j");
// Send the request
PaymentsApi service = new PaymentsApi(client);
PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID"));
<?php
// Adyen PHP API Library v28.2.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Checkout\Amount;
use Adyen\Model\Checkout\CheckoutPaymentMethod;
use Adyen\Model\Checkout\PaymentRequest;
use Adyen\Service\Checkout\PaymentsApi;
$client = new Client();
$client->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
->setStoredPaymentMethodId("7219687191761347")
->setType("bcmc");
$paymentRequest = new PaymentRequest();
$paymentRequest
->setReference("YOUR_ORDER_NUMBER")
->setAmount($amount)
->setMerchantAccount("YOUR_MERCHANT_ACCOUNT")
->setRecurringProcessingModel("Subscription")
->setPaymentMethod($checkoutPaymentMethod)
->setShopperInteraction("ContAuth")
->setShopperReference("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j");
$requestOptions['idempotencyKey'] = 'UUID';
// Send the request
$service = new PaymentsApi($client);
$response = $service->payments($paymentRequest, $requestOptions);
// Adyen .net API Library v32.1.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
};
CardDetails cardDetails = new CardDetails
{
StoredPaymentMethodId = "7219687191761347",
Type = CardDetails.TypeEnum.Bcmc
};
PaymentRequest paymentRequest = new PaymentRequest
{
Reference = "YOUR_ORDER_NUMBER",
Amount = amount,
MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.Subscription,
PaymentMethod = new CheckoutPaymentMethod(cardDetails),
ShopperInteraction = PaymentRequest.ShopperInteractionEnum.ContAuth,
ShopperReference = "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"
};
// Send the request
var service = new PaymentsService(client);
var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"});
// Adyen Node API Library v29.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 = {
amount: {
value: 1000,
currency: "EUR"
},
paymentMethod: {
type: "bcmc",
storedPaymentMethodId: "7219687191761347"
},
reference: "YOUR_ORDER_NUMBER",
merchantAccount: "YOUR_MERCHANT_ACCOUNT",
shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
shopperInteraction: "ContAuth",
recurringProcessingModel: "Subscription"
}
// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
// Adyen Go API Library v21.0.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,
}
cardDetails := checkout.CardDetails{
StoredPaymentMethodId: common.PtrString("7219687191761347"),
Type: common.PtrString("bcmc"),
}
paymentRequest := checkout.PaymentRequest{
Reference: "YOUR_ORDER_NUMBER",
Amount: amount,
MerchantAccount: "YOUR_MERCHANT_ACCOUNT",
RecurringProcessingModel: common.PtrString("Subscription"),
PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&cardDetails),
ShopperInteraction: common.PtrString("ContAuth"),
ShopperReference: common.PtrString("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"),
}
// Send the request
service := client.Checkout()
req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest)
res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)
# Adyen Python API Library v13.6.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": {
"value": 1000,
"currency": "EUR"
},
"paymentMethod": {
"type": "bcmc",
"storedPaymentMethodId": "7219687191761347"
},
"reference": "YOUR_ORDER_NUMBER",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"shopperInteraction": "ContAuth",
"recurringProcessingModel": "Subscription"
}
# Send the request
result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID")
# Adyen Ruby API Library v10.4.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 => {
:value => 1000,
:currency => 'EUR'
},
:paymentMethod => {
:type => 'bcmc',
:storedPaymentMethodId => '7219687191761347'
},
:reference => 'YOUR_ORDER_NUMBER',
:merchantAccount => 'YOUR_MERCHANT_ACCOUNT',
:shopperReference => 'YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j',
:shopperInteraction => 'ContAuth',
:recurringProcessingModel => 'Subscription'
}
# Send the request
result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' })
// Adyen Node API Library v29.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 cardDetails: Types.checkout.CardDetails = {
storedPaymentMethodId: "7219687191761347",
type: Types.checkout.CardDetails.TypeEnum.Bcmc
};
const paymentRequest: Types.checkout.PaymentRequest = {
reference: "YOUR_ORDER_NUMBER",
amount: amount,
merchantAccount: "YOUR_MERCHANT_ACCOUNT",
recurringProcessingModel: Types.checkout.PaymentRequest.RecurringProcessingModelEnum.Subscription,
paymentMethod: cardDetails,
shopperInteraction: Types.checkout.PaymentRequest.ShopperInteractionEnum.ContAuth,
shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"
};
// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
Test and go live
Before making live payments, use the following credentials to test your integration:| Card number | Card type | CVV2/CVC2 | Username | Password | Issuing country/region | Expiry date |
|---|---|---|---|---|---|---|
| 5127 8809 9999 9990 | BCMC / Mastercard Debit | BCMC: None Mastercard: 737 | user | password | BE | 03/2030 |
| 6703 4444 4444 4449 | BCMC / Maestro | None | user | password | BE | 03/2030 |
| 4871 0499 9999 9910 1 | BCMC / Visa Debit | BCMC: None Visa: 737 | user | password | BE | 03/2030 |
"holderName": "DECLINED". "paymentMethod": {
"type": "bcmc",
"number": "4871049999999910",
"holderName": "DECLINED",
"expiryMonth": "03",
"expiryYear": "2030"
}
"refusalReason": "Refused",
"resultCode": "Refused",