- To import the module: bcmc
- To launch and show the Component: BcmcComponent
- 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
Show Bancontact card in your payment form
To show the Bancontact card in your payment form, you need to:-
Specify in your /paymentMethods request:
countryCode: BEamount.currency: EUR.
-
Deserialize the /paymentMethods response. Put the object with
type: bcmc in aPaymentMethodobject. -
Add the Bancontact card Component:
a. Import the Card Component to your
build.gradlefile.For the latest version, refer to our GitHub. b. Create aBcmcConfigurationobject, and pass your client key. You can also include optional configuration, for example to make the cardholder name required.c. Initialize the Bancontact card Component. Pass the following:- your context (for example,
this@YourActivity) - the object from the /paymentMethods response (for example,
paymentMethod) - the
BcmcConfigurationobject (for example,bcmcConfiguration)
d. Add the Bancontact card Component view to your layout.e. Attach the Component to the view to start getting your shopper’s payment details.f. When shoppers enter their payment details, you start receiving updates. IfisValidis true, and the shopper proceeds to pay, pass thepaymentComponentState.data.paymentMethodto your server and make a payment request. - your context (for example,
Make a payment
When the shopper proceeds to pay, the Component returns thepaymentComponentState.data.paymentMethod.
-
Pass the
paymentComponentState.datato your server. -
From your server, make a /payments request, specifying:
paymentMethod: ThepaymentComponentState.data.paymentMethodfrom 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).
action object with type: redirect.
/payments response
Handle the redirect
Use the Redirect Component to redirect the shopper to complete the 3D Secure authentication. After the shopper returns to your app, make a POST /payments/details request from your server, providing:details: TheactionComponentData.detailsobject from the Redirect Component.
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 followingresultCode values:
Recurring payments
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.
Test and go live
Before making live payments, use the following credentials to test your integration:
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".
- Configure the Component using the Client Encryption Public Key from your live Customer Area.