Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseUse Managed Payments
Use Payment Links
Use a prebuilt checkout page
Build a custom integration with Elements
Build an in-app integration
Payment methods
Add payment methods
    Overview
    Payment method integration options
    Manage default payment methods in the Dashboard
    Payment method types
    Cards
    Pay with Stripe balance
    Stablecoin payments
    Bank debits
    Bank redirects
      Bancontact
        Accept a payment
        Save bank details during payment
        Set up future payments
      BLIK
      EPS
      FPX
      iDEAL
      Przelewy24
      SOFORT
      TWINT
      Wero
    Bank transfers
    Credit transfers (Sources)
    Buy now, pay later
    Real-time payments
    Vouchers
    Wallets
    Enable local payment methods by country
    Custom payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Payments
Payment scenarios
Handle multiple currencies
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Beyond payments
Incorporate your company
Crypto
Agentic commerce
Financial Connections
Climate
Understand fraud
Radar fraud protection
Manage disputes
Verify identities
United States
English (United States)
HomePaymentsAdd payment methodsBank redirectsBancontact

Accept a Bancontact payment

Learn how to accept Bancontact, a common payment method in Belgium.

Bancontact with Sources

We recommend using PaymentIntents or Checkout to accept Bancontact payments. If you’re using the Sources API, see Bancontact payments with Sources.

Bancontact is a single use payment method where customers are required to authenticate their payment. Customers pay with Bancontact by redirecting from your app, authenticating the payment, then returning to your app where you get immediate notification on whether the payment succeeded or failed.

Note

Your use of Bancontact must be in accordance with the Bancontact Terms of Service.

Set up Stripe
Server-side

First, you need a Stripe account. Register now.

Use our official libraries for access to the Stripe API from your application:

Create a PaymentIntent
Server-side

A PaymentIntent is an object that represents your intent to collect payment from a customer and tracks the lifecycle of the payment process through each stage.

Create a PaymentIntent on your server and specify the amount to collect and the eur currency (Bancontact does not support other currencies). If you have an existing Payment Intents integration, add bancontact to the list of payment method types.

The default language of the Bancontact authorization page is English (en). You can match the preferred language of your customer by setting preferred_language to fr, nl, or de.

Retrieve the client secret

The PaymentIntent includes a client secret that the client side uses to securely complete the payment process. You can use different approaches to pass the client secret to the client side.

Collect payment method details
Client-side

Create a payment form on your client to collect the required billing details from the customer:

FieldValue
nameThe full name (first and last) of the customer.

Submit the payment to Stripe
Client-side

Create a payment on the client side with the client secret of the PaymentIntent. The client secret is different from your API keys that authenticate Stripe API requests. It should be handled carefully because it can complete the charge. Do not log it, embed it in URLs, or expose it to anyone but the customer.

When a customer clicks to pay with Bancontact, use Stripe.js to submit the payment to Stripe. Stripe.js is the foundational JavaScript library for building payment flows. It automatically handles complexities like the redirect described below, and enables you to extend your integration to other payment methods. Include the Stripe.js script on your checkout page by adding it to the head of your HTML file.

Create an instance of Stripe.js with the following JavaScript on your checkout page.

Call stripe.confirmBancontactPayment to redirect your customer to Bancontact’s website or app to complete the payment. Include a return_url to redirect your customer after they complete the payment. You must also provide the customer’s full name in billing_details.

Handling the redirect

The following URL query parameters are provided when Stripe redirects the customer to the return_url.

ParameterDescription
payment_intentThe unique identifier for the PaymentIntent.
payment_intent_client_secretThe client secret of the PaymentIntent object.

You may also append your own query parameters when providing the return_url. They persist throughout the redirect process. The return_url should correspond to a page on your website that provides the status of the payment. You should verify the status of the PaymentIntent when rendering the return page. You can do so by using the retrievePaymentIntent function from Stripe.js and passing in the payment_intent_client_secret.

Bank account details

You can find details about the bank account the customer used to complete the payment on the resulting charge under payment_method_details.

OptionalHandle post-payment events

Stripe sends a payment_intent.succeeded event when the payment completes. Use the Dashboard, a custom webhook, or a partner solution to receive these events and run actions, like sending an order confirmation email to your customer, logging the sale in a database, or starting a shipping workflow.

Listen for these events rather than waiting on a callback from the client. On the client, the customer could close the browser window or quit the app before the callback executes, and malicious clients could manipulate the response. Setting up your integration to listen for asynchronous events also helps you accept more payment methods in the future. Learn about the differences between all supported payment methods.

  • Handle events manually in the Dashboard

    Use the Dashboard to View your test payments in the Dashboard, send email receipts, handle payouts, or retry failed payments.

  • Build a custom webhook

    Build a custom webhook handler to listen for events and build custom asynchronous payment flows. Test and debug your webhook integration locally with the Stripe CLI.

  • Integrate a prebuilt app

    Handle common business events, such as automation or marketing and sales, by integrating a partner application.

OptionalHandle the Bancontact redirect manually

We recommend relying on Stripe.js to handle Bancontact redirects and payments client-side with confirmBancontactPayment. Using Stripe.js helps extend your integration to other payment methods. However, you can also manually redirect your customers on your server by following these steps:

  1. Create and confirm a PaymentIntent of type bancontact. You must provide the payment_method_data.billing_details.name property, which you should collect from your customer. Note that, by specifying payment_method_data, a PaymentMethod is created and immediately used with this PaymentIntent.

    You must also provide the URL where your customer is redirected to after they complete their payment in the return_url field. You may optionally provide your own query parameters in this URL. These parameters will be included in the final URL upon completing the redirect flow.

  1. Check that the PaymentIntent has a status of requires_action and the type for next_action is redirect_to_url.
  1. Redirect the customer to the URL provided in the next_action.redirect_to_url.url property. This code example is approximate—the redirect method might be different in your web framework.

Your customer is redirected to the return_url when they complete the payment process. The payment_intent and payment_intent_client_secret URL query parameters are included along with any of your own query parameters. Stripe recommends setting up a webhook endpoint to programmatically confirm the status of a payment.

Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc