If you are using Android Drop-in v5.0.0 or later:
This payment method requires no additional configuration.
Follow the Drop-in integration guide.
A Bancontact card payment is like a regular card payment, except for the following:
- There is no CVC. For co-badged cards, the CVC field can still appear.
- 3D Secure authentication is mandatory.
- Separate captures are not supported.
Our Android Drop-in renders the Bancontact card in your payment form, securely collects sensitive card information, and redirects the shopper to the issuer's website to perform 3D Secure authentication.
When making a Bancontact payment, you need to handle the redirect result when the shopper returns back to your website after performing 3D Secure authentication.
Requirements
Requirement | Description |
---|---|
Integration type | Make sure that you have built an Advanced flow Android Drop-in integration. |
Setup steps | Before you begin, add Bancontact card in your Customer Area. |
Show Bancontact card in your payment form
To show Bancontact card in your payment form, specify in your /paymentMethods request:
- countryCode: BE
- amount.currency: EUR
Optional configuration
When creating an instance of Drop-in, you can optionally include a
BcmcConfiguration
object to add custom configuration for Bancontact in your payment form.
The following example shows how to configure Drop-in to make the cardholder name for Bancontact required :
// Optional. You can add this if you need any custom configuration for the component.
val bcmcConfiguration = BcmcConfiguration.Builder(context, "YOUR_CLIENT_KEY")
// When you are ready to accept live payments, change the value to one of our live environments.
.setEnvironment(Environment.TEST)
.build()
val dropInConfiguration = DropInConfiguration.Builder(context, YourDropInService::class.java, "YOUR_CLIENT_KEY")
// When you are ready to accept live payments, change the value to one of our live environments.
.setEnvironment(Environment.TEST)
.addBcmcConfiguration(bcmcConfiguration)
.build()
Make a payment
When the shopper proceeds to pay, Drop-in returns the paymentComponentData.paymentMethod
.
- Pass the
paymentComponentData
to your server. - From your server, make a /payments request, specifying:
paymentMethod
: ThepaymentComponentData.paymentMethod
from your client app.channel
: AndroidreturnURL
: The URL where the shopper will be redirected back to after completing 3D Secure 1 authentication. Get this URL from Drop-in in theRedirectComponent.getReturnUrl(context)
.
The /payments response contains an action
object with type
: redirect.
If your integration is set up correctly, the action
object is passed from your server to the client.
Handle the redirect
Drop-in redirects the shopper to complete the payment. When the shopper returns back to your app, Drop-in provides the actionComponentData
object.
From your server, make a POST /payments/details request providing:
details
: TheactionComponentData.details
object from Drop-in.
You receive a response containing:
resultCode
: Use this to present the payment result to your shopper.pspReference
: Our unique identifier for the transaction.
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 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
Bancontact recurring payments are not available in the test environment. To test your integration, do a penny test in the live environment instead.
We support recurring transactions for Bancontact through SEPA Direct Debit. To make recurring payments, you need to:
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 /sessions or /payments request:
storePaymentMethod
: true- shopperReference: Your unique identifier for the shopper (minimum length three characters).
When the payment has been settled, you receive a webhook containing:
eventCode
: RECURRING_CONTRACToriginalReference
: ThepspReference
of the initial payment.pspReference
: This is the token that you need to make recurring payments for this shopper.
Make sure that your server is able to receive RECURRING_CONTRACT as part of your standard webhooks. You can enable the RECURRING_CONTRACT event code in the webhook settings page.
Make a payment with a token
To make a payment with the token, include in your /payments request:
paymentMethod.storedPaymentMethodId
: ThepspReference
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.shopperInteraction
: ContAuth.recurringProcessingModel
: Subscription or UnscheduledCardOnFile.
For more information about the shopperInteraction
and recurringProcessingModel
fields, refer to Tokenization.
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 |
1 Depending on your payment method setup, transactions with this test card are routed to Bancontact or Visa.
You can force a decline using these credentials with "holderName": "DECLINED"
.
"paymentMethod": {
"type": "bcmc",
"number": "4871049999999910",
"holderName": "DECLINED",
"expiryMonth": "03",
"expiryYear": "2030"
}
This gets the following response:
"refusalReason": "Refused",
"resultCode": "Refused",
You can check the status of test payments in your Customer Area > Transactions > Payments.
Add Bancontact card in your live Customer Area.
- Configure the Drop-in using the Client Encryption Public Key from your live Customer Area.