As discussed at the gathering: Global Gathering 2019 - Day 8 - Pipe Prioritisation - DEV PIPE
We agree to do a spike on how much it would take to provide Bancontact as a payment method.
Bancontact (ex Mister Cash) is the leading payment method used in Belgium / Netherlands / Luxembourg (Benelux).
The goals of the spike were:
- know the best way to integrate bancontact : through stripe https://stripe.com/docs/sources/bancontact or in another form
- Estimate the size of the work to be done and the main steps and their complexity
The scope of this spike excludes Subscription / recurring payment.
To get bancontact to process recurrent payments without authorization through Stripe is another story that is possible and supported but will require some work on the stripe integration at least: https://stripe.com/docs/sources/bancontact/recurring
@luisramos0 did the spike and @maikel reviewed it here:https://github.com/openfoodfoundation/openfoodnetwork/issues/3901
The following of this post is mostly a copy-paste of the content in Github so that we can pursue the discussion here. Luis, Maikel, if I changed anything from what you did, please tell me so.
How Bancontact works
- Bancontact does not have an open API that we can use directly. Every business has to go through one of their partners to actually handle payments. That could be Mollie, Stripe or some other listed partner: https://www.bancontact.com/en/professional/payment-button
- Customers want to pay with the Bancontact app instead of a credit card. While Stripe and Paypal both take credit card payments and a business can choose with which payment provider they want to accept cards, Bancontact is a different way of paying. The idea was that a customer connects their bank account to Bancontact and can then make easy transfers through a smartphone app.
- Bancontact is more similar to a type of credit card than a type of payment gateway. We now have to find the best payment service provider accepting Bancontact payments.
Payment authorization with Redirect
In this payment method, Bancontact, we need to redirect the user to an external website that will then redirect back to OFN.
This payment workflow will require some rework of the stripe gateway (maybe we create a separate stripe gateway for this type of integration).
An important point apart from implementing the redirect logic is that this will require us to have some sort of webhooks that receive info from stripe when the payment is authorized: the user is redirected to the payment website and then back to OFN but the authorization in the payment system is asyncronous and OFN will need a webhook to receive a call from the payment system, after the user is redirected back, stating whether the payment was authorized or not.
This will require some work to create the webhook.
Stripe sources or other payment gateways?
To get this integration working with Stripe we would need:
- find out how to configure stripe for this
- create payment method and it’s custom details in the backoffice
- develop code to call stripe with appropriate details (source)
- develop webhook to take response from stripe
- developer code to wait for webhook call, validate and show user appropriate feedback
Overall, this looks like a straight forward problem but there are quite a few things to do and test.
The work done to make this work with Stripe will be reusable for other payment methods. Of course stripe fees will be an important point (see below).
This redirect logic might also be useful for PSD2 #3927
Apart from Stripe, there are many other payment gateways that integrate with bancontact.
One of the providers is a Belgium provider https://www.mollie.com/en/pricing/ that integrates with bancontact and has a spree plugin that works with Spree v3.
Fees
Lets look at some example data. A wholesaler may have 120 orders per month with an average order of €100. A food hub may have 200 orders per month with an average order of €30.
Provider | Fee | hub fees | wholesaler fees |
---|---|---|---|
Stripe | 1.4% + €0.25 | €134 | €198 |
Mollie | €0.39 | €78 | €47 |
Well, looking at the numbers mathematically, Stripe is only cheaper if the average order is less than €10. That’s very rare. In Australia, many food hubs would say that they can’t afford Stripe. Is that the same in Belgium? No separate pricing about Bancontact via Stripe was found.
Robust implementation and maintainability
Stripe is very capable of implementing robust solutions. Mollie may not have the same standard of service but all payment providers are pretty good. The Spree payment gateway looks okay. It has recent commits. Both seem to have an easy API.
Conclusion
Integrating a new payment gateway into OFN is a long-term investment. Main criteria are fees for the enterprise and maintainability.
Stripe | Mollie | |
---|---|---|
Pros | Quicker to implement | Cheaper + We would win access to a new provider as alternative to Stripe and Paypal. That reduces dependency. |
Cons | Dependency and price | Mollie will not have the same service/docs/etc of Stripe Implementing bancontact with mollie will take longer than doing it with Stripe because it will be a new gateway that will require setup (that will mostly be already done in Stripe) |
Maybe we want both? First implement Stripe to have a quick solution and then make it great by implementing Mollie or similar?
Estimated amount of time to implement through Stripe
List of tasks above, webhook and validation part being the most novel thing to do. Luis estimate is L, guessing that a dev would take at least 40 hours to do this.
Remaining questions for the community
Is there another payment gateway like stripe that we would like to integrate with?
Were there any plans to integrate with another gateway in the past? This could be a good opportunity to build that integration as long as that new payment gateway integrates with bancontact.
What should be our next steps?
ping @Theodore @Kirsten @danielle @MyriamBoure @sauloperez @lin_d_hop @Matt-Yorkley @NickWeir