Why can't I implement the API in jQuery?

Our API is intended for implementation into your backend. After all, your API key must remain secret, so that nobody else can use it to make API calls.

Therefore we advise against creating the payment via jQuery. Your visitors can easily retrieve your API key from the client-side source code, for instance by monitoring the API calls via the inspector's network tab in the browser. Also, the check on whether payment was successful can easily be skipped by adjusting the JavaScript code.

You can, however, use jQuery to make an AJAX call to your own backend. Your backend creates the payment and sends the paymentURL back to the customer. The customer then redirects the user to the payment URL. This way, you can integrate our API in a single page website.

See the explanation about the Mollie API for a full payment flow.