Ibrahim
Ibrahim

Reputation: 201

How to integrate Mollie Payment on a Vue.js (frontend) and .NET Web API (backend)

I have build a web application with Vue.js and .NET web API and I want to integrate Mollie Payment into the application, with their hosted checkout.

I tried using the provided repository https://github.com/Viincenttt/MollieApi but I do not understand how to start and how the whole infrastructure of the payment implementation works. Is this something that has to be done fully on the backend or fully on the frontend or both? How do payments need to be set-up to work? Are new controllers or other new files needed? How are the is API key from Mollie used?

Any help or advice would be highly appreciated!

Upvotes: 0

Views: 694

Answers (1)

Amade
Amade

Reputation: 3998

You do not need any custom front-end implementation to handle the payment (this is optional). A good starting point for reading is this documentation page:

https://docs.mollie.com/payments/accepting-payments

What you need is:

  1. A place from which you can redirect the user to Mollie-hosted checkout page (like a page with "Pay €123.34" button
  2. A place where Mollie can redirect a user after successful payment or payment failure
  3. A webhook endpoint, where Mollie can notify you about updates to payment

The basic workflow is like this:

  1. You create a Payment Intent object on the backend (it's called Payment in Mollie)
  2. You redirect the user to the checkout URL which you get from the created Payment Intent
  3. Then, you just need that working endpoint which Mollie can call to notify you about what happened with the payment.

You should also make sure that you have a way to handle refunds and chargebacks on your endpoint. Technically, you don't even need to implement "making refunds" functionality in your app right away - you can trigger them from Mollie's admin panel, and handle the incoming webhook calls to get notified about them.

Upvotes: 2

Related Questions