Search

Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

Bancontact card for API only

Accept Bancontact with raw card data, and build your own UI to have full control over the look and feel of your checkout page.

A Bancontact card payment is like a regular card payment, except that there is no security code, and 3D Secure 1 is mandatory.

This page explains how to accept Bancontact card card payments with raw card data.

To collect raw card data, you need to be fully PCI compliant.

If you're not fully PCI compliant, use our Bancontact card Component for Web or Android instead.

Before you begin

These instructions explain how to add Bancontact card 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.

Before starting your integration:

  1. Make sure that you have set up your back end implementation.
  2. Add Bancontact card in your test Customer Area.

Build your payment form for Bancontact card

When making a Bancontact card payment, collect the following shopper details:

Card details Example input Required
The card number "6703444444444449" -white_check_mark-
The card expiry month "03" -white_check_mark-
The card expiry year "30" -white_check_mark-
The card holder's name "S.Hopper"

Bancontact cards have no security code.

You can also get the required fields from the /paymentMethods response, as explained in our API-only integration guide. In your call, specify:

The required input fields are included in the object with type: bcmc.

We provide a Bancontact card logo which you can use in your payment form. For more information, refer to Downloading logos.

Make a payment

From your server, make a /payments request, specifying:

  • paymentMethod.typebcmc.
  • paymentMethod.number: The card number (without separators).
  • paymentMethod.expiryMonth: The card expiry month.
  • paymentMethod.expiryYear: The card expiry year.
  • paymentMethod.holderName: (optional) The card holder's name.
  • browserInfo: The shopper's browser information.

    The browserInfo is required for web-based integration.

  • returnURL: The URL where the shopper will be redirected back to after completing the 3D Secure authentication.

Sample /payments request for web-based implementation:

curl https://checkout-test.adyen.com/v52/payments \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
      "amount":{
        "currency":"EUR",
        "value":1000
      },
      "reference":"YOUR_ORDER_NUMBER",
      "paymentMethod": {
        "type": "bcmc",
        "number": "6703000000000000003",
        "expiryMonth": "10",
        "expiryYear": "2020",
        "holderName": "S.Hopper"
      },
      "browserInfo":{
        "userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) appleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "acceptHeader":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8"
      },
      "returnUrl":"https://your-company.com/checkout?shopperOrder=12xy..",
      "merchantAccount":"YOUR_MERCHANT_ACCOUNT"
}'
# Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen::Client.new
adyen.api_key = "YOUR_X-API-KEY"
 
response = adyen.checkout.payments({
  :amount => {
    :currency => "EUR",
    :value => 1000
  },
  :reference => "YOUR_ORDER_NUMBER",
  :paymentMethod => {
    :type => "bcmc",
    :number => "6703000000000000003",
    :expiryMonth => "10",
    :expiryYear => "2020"
  },
  :returnUrl => "https://your-company.com/...",
  :merchantAccount => "YOUR_MERCHANT_ACCOUNT"
})
// Set your X-API-KEY with the API key from the Customer Area.
Client client = new Client(xApiKey,Environment.TEST);

Checkout checkout = new Checkout(client);
PaymentsRequest paymentsRequest = new PaymentsRequest();
paymentsRequest.setMerchantAccount("YOUR_MERCHANT_ACCOUNT");
Amount amount = new Amount();
amount.setCurrency("EUR");
amount.setValue(1000L);
paymentsRequest.setAmount(amount);
String number = "6703000000000000003";
String expiryMonth = "10";
String expiryYear = "2020";
paymentsRequest.setReference("YOUR_ORDER_NUMBER");
paymentsRequest.addCardData(number,expiryMonth, expiryYear);
paymentsRequest.setReturnUrl("https://your-company.com/...");
PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);
// Set your X-API-KEY with the API key from the Customer Area.
$client = new \Adyen\Client();
$client->setXApiKey("YOUR_X-API-KEY");
$service = new \Adyen\Service\Checkout($client);

$params = array(
  "amount" => array(
    "currency" => "EUR",
    "value" => 1000
  ),
  "reference" => "YOUR_ORDER_NUMBER",
  "paymentMethod" => array(
    "type" => "bcmc",
    "number" => "6703000000000000003",
    "enxpiryMonth" => "10",
    "expiryYear" => "2020"
  ),
  "returnUrl" => "https://your-company.com/...",
  "merchantAccount" => "YOUR_MERCHANT_ACCOUNT"
);
$result = $service->payments($params);
#Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen.Adyen()
adyen.client.xapikey = 'YOUR_X-API-KEY'

result = adyen.checkout.payments({
   'amount': {
      'value': 1000,
      'currency': 'EUR'
   },
   'reference': 'YOUR_ORDER_NUMBER',
   'paymentMethod': {
      'type': 'bcmc',
      'number': '6703000000000000003',
      'expiryMonth': '10',
      'expiryYear': '2020'
   },
   'returnUrl': 'https://your-company.com/...',
   'merchantAccount': 'YOUR_MERCHANT_ACCOUNT'
})
// Set your X-API-KEY with the API key from the Customer Area.
var client = new Client ("YOUR_X-API-KEY", Environment.Test);
var checkout = new Checkout(client);

var amount = new Model.Checkout.Amount("EUR", 1000);
var details = new Model.Checkout.DefaultPaymentMethodDetails{
  Type = "bcmc",
  number = "6703000000000000003",
  expiryMonth = "10",
  expiryYear = "2020"
};
var paymentRequest = new Adyen.Model.Checkout.PaymentRequest
{
  Reference = "YOUR_ORDER_NUMBER",
  Amount = amount,
  ReturnUrl = @"https://your-company.com/...",
  MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
  PaymentMethod = details
};

var paymentResponse = checkout.Payments(paymentsRequest);
// Set your X-API-KEY with the API key from the Customer Area.
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 = '[API_KEY]';
config.merchantAccount = '[YOUR_MERCHANT_ACCOUNT]';
const client = new Client({ config });
client.setEnvironment("TEST");
const checkout = new CheckoutAPI(client);
checkout.payments({
    amount: { currency: "EUR", value: 1000 },
    paymentMethod: {
        type: 'bcmc',
        number: "6703000000000000003",
        expiryMonth: "10",
        expiryYear: "2020"
    },
    reference: "YOUR_ORDER_NUMBER",
    merchantAccount: config.merchantAccount,
    returnUrl: "https://your-company.com/..."
}).then(res => res);

The /payments response contains:

  • resultCode: RedirectShopper
  • action.data: The parameters that you should send as form data.
  • action.method: POST. The HTTP request method that you should use to redirect the shopper. After the shopper completes the payment, they are redirected back to your returnURL using the same method.
  • action.paymentData: Store this value on your server — you need to submit this in your /payments/details request when handling the redirect result.
  • action.url: Link to where you should redirect your shopper.
  • details: Array that contains the key parameter names and the corresponding data type that you should expect when the shopper is redirected back to your returnURL. These are also the parameters that you need to submit in your /payments/details when handling the redirect.

/payments response
  {
     "resultCode": "RedirectShopper",
     "action": {
         "data": {
             "MD": "OEVudmZVMUlkWjd0MDNwUWs2bmhSdz09...",
             "PaReq": "eNpVUttygjAQ/RXbDyAXBYRZ00HpTH3wUosPfe...",
             "TermUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
         },
         "method": "POST",
         "paymentData": "Ab02b4c0!BQABAgA4e3wGkhVah4CJL19qdegdmm9E...",
         "paymentMethodType": "bcmc",
         "type": "redirect",
         "url": "https://test.adyen.com/hpp/3d/validate.shtml"
     },
     "details": [
         {
             "key": "MD",
             "type": "text"
         },
         {
             "key": "PaRes",
             "type": "text"
         }
     ],
     ...
  }

Handle the redirect

To complete the payment, redirect the shopper to perform 3D Secure authentication. After the shopper is redirected back to your website or app, submit the 3D Secure authentication results by making a /payments/details request.

For more information and detailed instructions, refer to HTTP POST redirects.

Present the payment result

Use the resultCode from the /payments/details response to present the payment result to your shopper. You will also receive the outcome of the payment asynchronously in a notification webhook.

For Bancontact card payments, you can receive the following resultCode values:

resultCode Description Action to take
Authorised The payment was successful. Inform the shopper that the payment was successful.
Cancelled The shopper cancelled the payment. 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. For more information, check the refusalReason field. Inform the shopper that there was an error processing their payment.
Refused The payment was refused. For more information, check the refusalReason field. Ask the shopper to try the payment again using a different payment method.

Recurring payments

We support recurring transactions for Bancontact through SEPA Direct Debit. To make recurring payments, you need to:

  1. Create a shopper token.
  2. Use the token to make future payments for the shopper.

Create a token

We strongly recommend that you request explicit permission from the shopper if you intend to make recurring SEPA payments. Being transparent about the payment schedule and the charged amount reduces the risk of chargebacks.

To create a token, include in your /payments request:

  • storePaymentMethod: true
  • shopperReference: Your unique identifier for the shopper.

When the payment has been settled, you receive a notification webhook containing:

  • eventCode: RECURRING_CONTRACT
  • originalReference: The pspReference of the initial payment.
  • pspReference: 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: The pspReference from the RECURRING_CONTRACT.
You can also get this value by using the /listRecurringDetails endpoint.
  • shopperReference: The unique shopper identifier that you specified when creating the token.
  • shopperInteractionContAuth.
  • recurringProcessingModel: Subscription or UnscheduledCardOnFile.

For more information about the shopperInteraction and recurringProcessingModel fields, refer to Recurring transaction types.

curl https://checkout-test.adyen.com/v52/payments \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
       "amount":{
          "value":1000,
          "currency":"EUR"
       },
       "paymentMethod":{
          "type":"sepadirectdebit",
          "recurringDetailReference":"7219687191761347"
       },
       "reference":"YOUR_ORDER_NUMBER",
       "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
       "shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
       "shopperInteraction":"ContAuth",
       "recurringProcessingModel": "Subscription"
}'
# Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen::Client.new
adyen.api_key = "YOUR_X-API-KEY"
 
response = adyen.checkout.payments({
  :amount => {
    :currency => "EUR",
    :value => 1000
  },
  :reference => "YOUR_ORDER_NUMBER",
  :paymentMethod => {
    :type => "sepadirectdebit",
    :recurringDetailReference => "7219687191761347"
  },
  :returnUrl => "https://your-company.com/checkout?shopperOrder=12xy..",
  :shopperReference => "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
  :merchantAccount => "YOUR_MERCHANT_ACCOUNT",
  :shopperInteraction => "ContAuth",
  :recurringProcessingModel => "Subscription"
})
// Set YOUR_X-API-KEY with the API key from the Customer Area.
// Change to Environment.LIVE and add the Live URL prefix when you're ready to accept live payments.
Client client = new Client("YOUR_X-API-KEY", Environment.TEST);
Checkout checkout = new Checkout(client);

PaymentsRequest paymentsRequest = new PaymentsRequest();

String merchantAccount = "YOUR_MERCHANT_ACCOUNT";
paymentsRequest.setMerchantAccount(merchantAccount);

Amount amount = new Amount();
amount.setCurrency("EUR");
amount.setValue(15000L);
paymentsRequest.setAmount(amount);

DefaultPaymentMethodDetails paymentMethodDetails = new DefaultPaymentMethodDetails();
paymentMethodDetails.setRecurringDetailReference("7219687191761347");
paymentMethodDetails.setType("sepadirectdebit");
paymentsRequest.setPaymentMethod(paymentMethodDetails);

paymentsRequest.setReference("YOUR_ORDER_NUMBER");
paymentsRequest.setReturnUrl("https://your-company.com/checkout?shopperOrder=12xy..");
paymentsRequest.setShopperInteraction("ContAuth");
paymentsRequest.setRecurringProcessingModel("Subscription");

PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);
// Set your X-API-KEY with the API key from the Customer Area.
$client = new \Adyen\Client();
$client->setXApiKey("YOUR_X-API-KEY");
$service = new \Adyen\Service\Checkout($client);

$params = array(
  "amount" => array(
    "currency" => "EUR",
    "value" => 1000
  ),
  "reference" => "YOUR_ORDER_NUMBER",
  "paymentMethod" => array(
    "type" => "sepadirectdebit",
    "recurringDetailReference" => "7219687191761347"
  ),
  "returnUrl" => "https://your-company.com/checkout?shopperOrder=12xy..",
  "shopperReference" => "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
  "recurringProcessingModel" => "Subscription",
  "shopperInteraction" => "ContAuth",
  "merchantAccount" => "YOUR_MERCHANT_ACCOUNT"
);
$result = $service->payments($params);
#Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen.Adyen()
adyen.client.xapikey = 'YOUR_X-API-KEY'

result = adyen.checkout.payments({
   'amount': {
      'value': 1000,
      'currency': 'EUR'
   },
   'reference': 'YOUR_ORDER_NUMBER',
   'paymentMethod': {
      'type': 'sepadirectdebit',
      'recurringDetailReference': '7219687191761347'
   },
   'returnUrl': 'https://your-company.com/checkout?shopperOrder=12xy..',
   'shopperReference': 'YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j'
   'merchantAccount': 'YOUR_MERCHANT_ACCOUNT',
   'shopperInteraction':'ContAuth',
   'recurringProcessingModel': 'Subscription'
})
// Set your X-API-KEY with the API key from the Customer Area.
var client = new Client ("YOUR_X-API-KEY", Environment.Test);
var checkout = new Checkout(client);

var amount = new Model.Checkout.Amount("EUR", 1000);
var details = new Model.Checkout.DefaultPaymentMethodDetails{
  Type = "sepadirectdebit",
  RecurringDetailReference = "7219687191761347"
};
var paymentsRequest = new Model.Checkout.PaymentRequest
{
  Reference = "YOUR_ORDER_NUMBER",
  Amount = amount,
  ReturnUrl = @"https://your-company.com/checkout?shopperOrder=12xy..",
  MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
  ShopperReference = "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
  RecurringProcessingModel = "Subscription",
  ShopperInteraction = "ContAuth",
  PaymentMethod = details
};

var paymentResponse = checkout.Payments(paymentsRequest);
// Set your X-API-KEY with the API key from the Customer Area.
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 = '[API_KEY]';
config.merchantAccount = '[YOUR_MERCHANT_ACCOUNT]';
const client = new Client({ config });
client.setEnvironment("TEST");
const checkout = new CheckoutAPI(client);
checkout.payments({
    amount: { currency: "EUR", value: 1000 },
    paymentMethod: {
        type: 'sepadirectdebit',
        recurringDetailReference: "7219687191761347"
    },
    reference: "YOUR_ORDER_NUMBER",
    merchantAccount: config.merchantAccount,
    shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
    returnUrl: "https://your-company.com/checkout?shopperOrder=12xy..",
    shopperInteraction: "ContAuth",
    recurringProcessingModel: "Subscription"
}).then(res => res);

Test and go live

Before making live payments:

  1. Use the following credentials to test your integration:
    Test card number Expiry date
    6703 4444 4444 4449 10/2020, or 03/2030
    6703 0000 0000 0000 003 10/2020, or 03/2030
    You can check the status of test payments in your Customer Area > Transactions > Payments.
  2. Add Bancontact card in your live Customer Area.

See also